0

So in JavaForms section of Play 2.1.1 documentation, there is a line of code:

Form<User> userForm = form(User.class);

Where does this "form(User.class)" function come from?

http://www.playframework.com/documentation/2.1.1/JavaForms

Thanks in advance.

asked May 15, 2013 at 3:28

1 Answer 1

2

form(...) is a static method of the play.data.Form class.

If you import play.data.Form, you can use Form.form(User.class) or you can do a static import to use only the form(User.class) syntax : import static play.data.Form.form;

answered May 15, 2013 at 6:03
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.