Using Play 2.1 Java version
I have a simple form
<div class="row">
<div class="col-md-6">
@inputText(userForm("usercode"), args = 'placeholder -> "User Code",'class -> "form-control input-sm",'_label -> "User Code")
</div>
<div class="col-md-6">
@inputText(userForm("username"), args = 'placeholder -> "User Name",'class -> "form-control input-sm",'_label -> "User Name")
</div>
When the User submits the Form and if Errors Exists the Form inputted data is lost.
At my controller
Form<User> userForm= Form.form(User.class).bindFromRequest();
if (userForm.hasErrors()) {
Logger.info("Erros in Form");
return badRequest(
userAdd.render("Add User",userForm)
);
}
Question :
How to retrieve the values back to the form ?
Thanks