@Singleton public class FormFactory extends Object
Constructor and Description |
---|
FormFactory(MessagesApi messagesApi,
Formatters formatters,
javax.validation.ValidatorFactory validatorFactory,
com.typesafe.config.Config config) |
Modifier and Type | Method and 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) |
@Inject public FormFactory(MessagesApi messagesApi, Formatters formatters, javax.validation.ValidatorFactory validatorFactory, com.typesafe.config.Config config)
public DynamicForm form()
public <T> Form<T> form(Class<T> clazz)
T
- the type of value in the form.clazz
- the class to map to a form.public <T> Form<T> form(String name, Class<T> clazz)
T
- the type of value in the form.name
- the form's name.clazz
- the class to map to a form.public <T> Form<T> form(String name, Class<T> clazz, Class<?>... groups)
T
- the type of value in the form.name
- the form's nameclazz
- the class to map to a form.groups
- the classes of groups.