|[2.1-RC2-java] Problem with form types after migrating from 2.0.4||Jørgen Borgesen||1/21/13 7:26 AM|
I have updated my controllers with to use play.data.Form.form() method instead of Controller.form(). When I try to run my application I get errors like:
error: method render in class create_user cannot be applied to given types;
required: String, play.api.data.Form, User found: String, play.data.Form, User
It looks like the my templates expect to get play.api.data.Form instead of play.data.Form. Is there suppost to be any implicit conversion or should I update my templates to use play.data.Form?
If I'm using play.data.Form in my templates I am missing out on some of the features of play.api.data.Form, like the ability to request parameters through the apply method ( ex: createUserForm("username") )
|Re: [play-framework] [2.1-RC2-java] Problem with form types after migrating from 2.0.4||Guillaume Bort||1/21/13 7:29 AM|
Have you migrated you Build.scala file?
It should now use play.Project instead of PlayProject, and add at least javaCore as dependency.
Guillaume Bort, http://guillaume.bort.fr
|Re: [play-framework] [2.1-RC2-java] Problem with form types after migrating from 2.0.4||Jørgen Borgesen||1/22/13 12:40 AM|
Thank you! I forgot to add javaCore as a dependency.