Package play.data
Class FormFactory
- Object
-
- play.data.FormFactory
-
@Singleton public class FormFactory extends Object
Helper to create HTML forms.
-
-
Constructor Summary
Constructors Constructor Description FormFactory(MessagesApi messagesApi, Formatters formatters, javax.validation.ValidatorFactory validatorFactory, com.typesafe.config.Config config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DynamicForm
form()
<T> Form<T>
form(Class<T> clazz)
<T> Form<T>
form(Class<T> clazz, Class<?>... groups)
<T> Form<T>
form(String name, Class<T> clazz)
<T> Form<T>
form(String name, Class<T> clazz, Class<?>... groups)
-
-
-
Constructor Detail
-
FormFactory
@Inject public FormFactory(MessagesApi messagesApi, Formatters formatters, javax.validation.ValidatorFactory validatorFactory, com.typesafe.config.Config config)
-
-
Method Detail
-
form
public DynamicForm form()
- Returns:
- a dynamic form.
-
form
public <T> Form<T> form(Class<T> clazz)
- Type Parameters:
T
- the type of value in the form.- Parameters:
clazz
- the class to map to a form.- Returns:
- a new form that wraps the specified class.
-
form
public <T> Form<T> form(String name, Class<T> clazz)
- Type Parameters:
T
- the type of value in the form.- Parameters:
name
- the form's name.clazz
- the class to map to a form.- Returns:
- a new form that wraps the specified class.
-
form
public <T> Form<T> form(String name, Class<T> clazz, Class<?>... groups)
- Type Parameters:
T
- the type of value in the form.- Parameters:
name
- the form's nameclazz
- the class to map to a form.groups
- the classes of groups.- Returns:
- a new form that wraps the specified class.
-
-