@Deprecated public class TabularFormBuilder extends GenericTableFormBuilder
FormBuilder.
This is a helper class to generate tabular forms. It lays out the form by creating
a table and adding labels and input controls in separate table cells in a row. If
nothing else is done this creates a form in the layout of:
| First name | |
| Last name | |
| Address |
ModelBindings instance containing the bindings of the
created components to their class instance and properties. After use you can discard the FormBuilder,
provided you retain the bindings if you need them.
A formbuilder is highly stateful during use.
There are ways to play around with the layout by using format directives before fields are added. Usually layout directives take effect for the next control that is added. There are two kinds of layout directives. Permanent ones change the settting, well, permanently until it is explicitly changed again. Permanent layout directives start with "set" in the call. There are also temporary layout directives, these have no "set" in their name. These take effect for the next the control or the next run of controls if they are added with a single call to the form builder, for instance using addProps(String... names). When the control or controls are added the layout directive returns to it's default setting.
LOG| Constructor and Description |
|---|
TabularFormBuilder()
Deprecated.
|
TabularFormBuilder(Class<T> clz,
IReadOnlyModel<T> mdl)
Deprecated.
|
TabularFormBuilder(T instance)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addContent(NodeBase label,
NodeBase[] control,
boolean editable)
Deprecated.
|
void |
addControl(NodeBase label,
NodeBase labelnode,
NodeBase[] list,
boolean mandatory,
boolean editable,
PropertyMetaModel<?> pmm)
Deprecated.
|
void |
addControl(String label,
NodeBase labelnode,
NodeBase[] list,
boolean mandatory,
boolean editable,
PropertyMetaModel<?> pmm)
Deprecated.
Adds a control plus a label at the current location.
|
protected IControl<?>[] |
addListOfProperties(boolean editable,
String... names)
Deprecated.
Handle placement of a list of property names, all obeying the current mode in effect.
|
TabularFormBuilder |
append()
Deprecated.
Append the next field, then return to the current mode.
|
TabularFormBuilder |
col(int x)
Deprecated.
Add the next fields in a set to the specified column.
|
TabularFormBuilder |
colspan(int cells)
Deprecated.
Sets the colspan for the next component set.
|
Label |
createLabel(String label,
NodeBase labelnode,
boolean mandatory,
boolean editable,
PropertyMetaModel<?> pmm)
Deprecated.
Control label factory method.
|
NodeContainer |
finish()
Deprecated.
Reset variables after finish.
|
TabularFormBuilder |
into()
Deprecated.
Add the next pair into the last cell of the last row added, then return to the
current mode.
|
TabularFormBuilder |
into(String separator)
Deprecated.
Add the next pair into the last cell of the last row added using the specified
string to separate them, then return to the current mode.
|
protected void |
modeAddAppend(NodeBase l,
NodeBase[] c,
boolean editable)
Deprecated.
This "appends" the new set to the "current" row.
|
protected void |
modeAddNormal(NodeBase l,
NodeBase[] c,
boolean editable)
Deprecated.
Adds a node normally.
|
protected void |
modeAppendInto(NodeBase l,
NodeBase[] c,
boolean editable)
Deprecated.
Appends the control to the last cell of the last row used.
|
TabularFormBuilder |
norm()
Deprecated.
Add the next field in "normal" mode, then return to the current
mode.
|
void |
onRowAdded(TR row)
Deprecated.
|
TabularFormBuilder |
setCol(int x)
Deprecated.
Make column(x) the "current" column where things are added to, until another call
is done.
|
void |
setModeAppend()
Deprecated.
|
void |
setModeAppendInto()
Deprecated.
|
void |
setModeAppendInto(String sepa)
Deprecated.
|
void |
setModeNorm()
Deprecated.
Sets the default mode to NORMAL, causing each field to occupy it's own row containing 2 cells
for label and input control.
|
addCell, addCell, addRow, addRowAndCell, addRowAndCell, getLastUsedRow, getTable, getTBody, internalClearLocation, newBody, onBodyAdded, onTableAdded, reset, row, selectRow, setLastUsedCell, setLastUsedRow, setTable, setTBody, table, tbodyaddContent, addContent, addContent, addDisplayProp, addDisplayProp, addDisplayProp, addDisplayProps, addLabelAndControl, addLabelAndControl, addProp, addProp, addProp, addProp, addProp, addProp, addProp, addProp, addPropertyAndControl, addPropertyControl, addPropscreateControlFor, getBindings, getBuilder, getClassMeta, getControlLabelFactory, getCurrentInputClass, getModel, resolveProperty, setBindings, setClassModel, setControlLabelFactory, setInstance, setMetaModel, updateReadOnlypublic TabularFormBuilder()
public TabularFormBuilder(Class<T> clz, IReadOnlyModel<T> mdl)
public TabularFormBuilder(T instance)
public NodeContainer finish()
finish in class GenericTableFormBuilderprotected IControl<?>[] addListOfProperties(boolean editable, String... names)
addListOfProperties in class GenericFormBuilderpublic void addControl(String label, NodeBase labelnode, NodeBase[] list, boolean mandatory, boolean editable, PropertyMetaModel<?> pmm)
addControl in class GenericFormBuilderlabel - labelnode - The node to connect the Label to (for=)mandatory - editable - T when the node is editable, needed by the label factorypublic Label createLabel(String label, NodeBase labelnode, boolean mandatory, boolean editable, PropertyMetaModel<?> pmm)
label - labelnode - mandatory - editable - pmm - public void addControl(NodeBase label, NodeBase labelnode, NodeBase[] list, boolean mandatory, boolean editable, PropertyMetaModel<?> pmm)
addControl in class GenericFormBuilderpublic void addContent(NodeBase label, NodeBase[] control, boolean editable)
addContent in class GenericFormBuilderpublic TabularFormBuilder norm()
public TabularFormBuilder append()
public TabularFormBuilder into()
public TabularFormBuilder into(String separator)
public TabularFormBuilder col(int x)
x - public TabularFormBuilder setCol(int x)
x - public TabularFormBuilder colspan(int cells)
cells - public void setModeNorm()
public void setModeAppend()
public void setModeAppendInto()
public void setModeAppendInto(String sepa)
protected void modeAddNormal(NodeBase l, NodeBase[] c, boolean editable)
l - c - protected void modeAddAppend(NodeBase l, NodeBase[] c, boolean editable)
l - c - protected void modeAppendInto(NodeBase l, NodeBase[] c, boolean editable)
l - c - public void onRowAdded(TR row)
onRowAdded in class GenericTableFormBuilderCopyright © 2017 etc.to. All rights reserved.