|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object play.data.Form<DynamicForm.Dynamic> play.data.DynamicForm
public class DynamicForm
A dynamic form. This form is backed by a simple HashMap<String,String>
Nested Class Summary | |
---|---|
static class |
DynamicForm.Dynamic
Simple data structure used by DynamicForm . |
Nested classes/interfaces inherited from class play.data.Form |
---|
Form.Display, Form.Field |
Constructor Summary | |
---|---|
DynamicForm()
Creates a new empty dynamic form. |
|
DynamicForm(java.util.Map<java.lang.String,java.lang.String> data,
java.util.Map<java.lang.String,java.util.List<ValidationError>> errors,
F.Option<DynamicForm.Dynamic> value)
Creates a new dynamic form. |
Method Summary | |
---|---|
DynamicForm |
bind(java.util.Map<java.lang.String,java.lang.String> data)
Binds data to this form - that is, handles form submission. |
DynamicForm |
bindFromRequest()
Binds request data to this form - that is, handles form submission. |
Form.Field |
field(java.lang.String key)
Retrieves a field. |
java.lang.String |
get(java.lang.String key)
Gets the concrete value if the submission was a success. |
Methods inherited from class play.data.Form |
---|
apply, bind, bind, bindFromRequest, data, error, errors, errorsAsJson, errorsAsJson, fill, get, globalError, globalErrors, hasErrors, hasGlobalErrors, name, reject, reject, reject, reject, reject, requestData, toString, value |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DynamicForm()
public DynamicForm(java.util.Map<java.lang.String,java.lang.String> data, java.util.Map<java.lang.String,java.util.List<ValidationError>> errors, F.Option<DynamicForm.Dynamic> value)
data
- the current form data (used to display the form)errors
- the collection of errors associated with this formvalue
- optional concrete value if the form submission was successfulMethod Detail |
---|
public java.lang.String get(java.lang.String key)
public DynamicForm bindFromRequest()
public DynamicForm bind(java.util.Map<java.lang.String,java.lang.String> data)
data
- data to submit
public Form.Field field(java.lang.String key)
field
in class Form<DynamicForm.Dynamic>
key
- field name
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |