java - error: cannot find symbol login.render(form(Login.class)) -
i trying tutorial here: http://www.playframework.com/documentation/2.1.0/javaguide4
but after adding method "application.java" class, have problem, variable "login" cannot found:
public static result login() { return ok( login.render(form(login.class)) ); }
afters searching internet, might doing wrong, found several suggestions, might have forgotten create login view , in case called: "login.scala.html". maybe have named wrong?! don't know,
i tried "$ clean" command , "$ compile" command in play console, still while,trying compile project throws error message:
error: cannot find symbol: method form(class(login.class)) symbol: method form(class<login>) location: class appplication
any ideas might reason error?
you might need add "views.html" before "login.render..."
so right code should follows (if maintained proposed file structure play framework documentation):
public static result login() { return ok( view.html.login.render(form(login.class)) ); }
and add of course right imports (you noticed :) )
Comments
Post a Comment