Class InstantUI
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateEditUI(PropertyBusinessObject bo, boolean autoCommit) Creates editing UI for the given business objectvoidexcludeProperties(PropertyBase... exclude) Excludes the properties from the generated UIvoidexcludeProperty(PropertyBase exclude) Excludes the property from the generated UIgetBindings(Container cnt) Returns the Binding object for the given container which allows us control over the widgets and their commit statusgetOrder()Returns the order of the properties or null if they should use their natural order as they were submitted to the index objectintThe text field constraint for the property.booleanisExcludedProperty(PropertyBase exclude) Returns true if the property was excluded from the GUIvoidsetComponentClass(PropertyBase p, Class cmpCls) The component class used to map this propertyvoidsetMultiChoiceLabels(PropertyBase p, String... labels) A property that's a multi-choice can use this API to define the options used e.g.:iui.setMultiChoiceLabels(c.gender, "Male", "Female", "Undefined"); iui.setMultiChoiceValues(c.gender, "M", "F", "U");voidsetMultiChoiceValues(PropertyBase p, Object... values) A property that's a multi-choice can use this API to define the options used, notice that this API won't work correctly withoutjava.lang.String...)voidsetOrder(PropertyBase... order) Sets the order of the properties, notice that this can also replace excludevoidsetTextFieldConstraint(PropertyBase p, int cons) Sets the text field constraint for the property explicitly, notice that some constraints are implicit unless set manually e.g.
-
Constructor Details
-
InstantUI
public InstantUI()
-
-
Method Details
-
excludeProperty
Excludes the property from the generated UI
Parameters
exclude: the property to exclude
-
excludeProperties
Excludes the properties from the generated UI
Parameters
exclude: the properties to exclude
-
isExcludedProperty
Returns true if the property was excluded from the GUI
Parameters
exclude: the property
Returns
true if the property was excluded from the GUI
-
setMultiChoiceLabels
A property that's a multi-choice can use this API to define the options used e.g.:
iui.setMultiChoiceLabels(c.gender, "Male", "Female", "Undefined"); iui.setMultiChoiceValues(c.gender, "M", "F", "U");Parameters
-
p: the property -
labels: label for each option
-
-
setMultiChoiceValues
A property that's a multi-choice can use this API to define the options used, notice that this API won't work correctly without
java.lang.String...)Parameters
-
p: the property -
values: actual values used for each label
-
-
setComponentClass
The component class used to map this property
Parameters
-
p: the property -
cmpCls: class of the component e.g.Button.class
-
-
setTextFieldConstraint
Sets the text field constraint for the property explicitly, notice that some constraints are implicit unless set manually e.g. numeric for numbers or password for fields with password in the name
Parameters
-
p: the property -
cons: the text field constraint
-
-
getTextFieldConstraint
The text field constraint for the property. notice that some constraints are implicit unless set manually e.g. numeric for numbers or password for fields with password in the name
Parameters
p: the property
Returns
the constraint matching this property
-
getOrder
Returns the order of the properties or null if they should use their natural order as they were submitted to the index object
Returns
the property order
-
setOrder
Sets the order of the properties, notice that this can also replace exclude
Parameters
order: the order of the properties
-
createEditUI
Creates editing UI for the given business object
Parameters
-
bo: the business object -
autoCommit: true if the bindings used should be auto-committed
Returns
a UI container that can be used to edit the business object
-
-
getBindings
Returns the Binding object for the given container which allows us control over the widgets and their commit status
Parameters
cnt: the container returned by the#createUI(boolean)method
Returns
a binding object
-