public class FormBuilder.FieldBuilder extends Object
Field
for a particular FormBuilder
.Modifier and Type | Method and Description |
---|---|
FormBuilder |
add()
Builds a new
Field using the values provided by this
FormBuilder.FieldBuilder and adds it to the linked FormBuilder . |
FormBuilder.FieldBuilder |
description(String description)
Sets this field's description.
|
FormBuilder.FieldBuilder |
displayName(String displayName)
Sets this field's display name.
|
FormBuilder.FieldBuilder |
id()
Marks this field as an ID field.
|
FormBuilder.FieldBuilder |
id(boolean id)
Sets this field's id flag.
|
FormBuilder.FieldBuilder |
readable(boolean readable)
Set's this field's readable flag.
|
FormBuilder.FieldBuilder |
required()
Marks this field as required.
|
FormBuilder.FieldBuilder |
required(boolean required)
Sets this field's required flag.
|
FormBuilder.FieldBuilder |
withAttribute(String name,
String value)
Sets an arbitrary attribute on this field.
|
FormBuilder.FieldBuilder |
withFieldValueProvider(FieldValueProvider fieldValueProvider)
Sets a field value provider for this field.
|
FormBuilder.FieldBuilder |
writable(boolean writable)
Set's this field's writable flag.
|
public FormBuilder.FieldBuilder required()
FormBuilder.FieldBuilder
being used to construct this
Field
public FormBuilder.FieldBuilder id()
FormBuilder.FieldBuilder
being used to construct this
Field
public FormBuilder.FieldBuilder id(boolean id)
id
- true
to mark this field as an ID field (default is
false
)FormBuilder.FieldBuilder
being used to construct this
Field
public FormBuilder.FieldBuilder required(boolean required)
required
- true
to mark this field as required (default
is false
)FormBuilder.FieldBuilder
being used to construct this
Field
public FormBuilder.FieldBuilder description(String description)
description
- the field's descriptionFormBuilder.FieldBuilder
being used to construct this
Field
public FormBuilder.FieldBuilder displayName(String displayName)
displayName
- the field's display nameFormBuilder.FieldBuilder
being used to construct this
Field
public FormBuilder.FieldBuilder readable(boolean readable)
readable
- false
to mark this field as unreadable
(default is true
)FormBuilder.FieldBuilder
being used to construct this
Field
public FormBuilder.FieldBuilder writable(boolean writable)
writable
- false
to mark this field as unwritable
(default is true
)FormBuilder.FieldBuilder
being used to construct this
Field
public FormBuilder.FieldBuilder withAttribute(String name, String value)
name
- the attribute's namevalue
- the attribute's valueFormBuilder.FieldBuilder
being used to construct this
Field
public FormBuilder.FieldBuilder withFieldValueProvider(FieldValueProvider fieldValueProvider)
fieldValueProvider
- the FieldValueProvider
for this fieldFormBuilder.FieldBuilder
being used to construct this
Field
public FormBuilder add()
Field
using the values provided by this
FormBuilder.FieldBuilder
and adds it to the linked FormBuilder
.FormBuilder