Hello,
probably this question has been asked before (but I didn't find any answer that would help me).
The problem is following: in Java controller I should use play.data.Form like:
public static Result loginForm() {
Form<LoginForm> form = Form.form(LoginForm.class);
return ok(loginForm.render(form));
}
And template is like:
@(f: Form[controllers.Application.LoginForm])
@import helper._
@main("Welcome to Play") {
@form(action = routes.Application.login()) {
@inputText(f("username"), 'id -> "username")
<br>
@inputPassword(f("password"))
<button>GO!</button>
}
}
The code is compiled and run via SBT but in my IDE (Intellij IDEA) I see reasonable compilation error:
'render(play.data.api.Form<controllers.Application.LoginForm>' in '' cannot be applied to play.data.Form<controllers.Application.LoginForm>How to resolve given mismatch? The project was created using play idea command.
Any help would be appreciated.
Vadim