|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ConfigurableFormModel
Sub-interface implemented by form models that allow for configuration of the form's value models, id etc..
Field Summary |
---|
Fields inherited from interface org.springframework.binding.form.FormModel |
---|
COMMITTABLE_PROPERTY, DIRTY_PROPERTY, ENABLED_PROPERTY, READONLY_PROPERTY |
Method Summary | |
---|---|
ValueModel |
add(String propertyName)
Add a valueModel for the given property. |
ValueModel |
add(String propertyName,
ValueModel valueModel)
Add the given valueModel as wrapper for the given property. |
ValueModel |
add(String propertyName,
ValueModel valueModel,
FieldMetadata fieldMetadata)
Add the given valueModel as wrapper for the given property. |
ValueModel |
addMethod(String propertyMethodName,
String derivedFromProperty)
Add a valueModel that holds a derived value computed by invoking the given method with the given property as argument on the formModel. |
ValueModel |
addMethod(String propertyMethodName,
String[] derivedFromProperties)
Add a valueModel that holds a derived value computed by invoking the given method with a number of other properties as arguments on the formModel. |
void |
setEnabled(boolean enabled)
Set the enabled state of this formModel. |
void |
setId(String id)
An id to identify this formModel. |
void |
setReadOnly(boolean readOnly)
Set the readOnly state of this formModel. |
Methods inherited from interface org.springframework.binding.form.FormModel |
---|
addCommitListener, commit, getFieldFace, getFieldMetadata, getFieldNames, getFormObject, getFormObjectHolder, getId, getValueModel, getValueModel, hasValueModel, isBuffered, isCommittable, isDirty, isEnabled, isReadOnly, registerPropertyConverter, removeCommitListener, reset, revert, setFormObject |
Methods inherited from interface org.springframework.binding.value.PropertyChangePublisher |
---|
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener |
Method Detail |
---|
void setId(String id)
id
- void setEnabled(boolean enabled)
Set the enabled state of this formModel. All fieldMetaData should take the enabled state of the formModel into account but should not alter their own enclosed enabled state.
A disabled formModel can be compared to a visual component which doesn't respond to any user interaction (grey-out).
enabled
- set to true
if the formModel should be
enabled. Set to false
if all fields should be disabled.void setReadOnly(boolean readOnly)
Set the readOnly state of this formModel. All fieldMetaData should take the readOnly state of the formModel into account but should not alter their own enclosed readOnly state.
A formModel in readOnly state can be seen as visual component in which the user can navigate but not alter any values. (Eg editable TextFields)
readOnly
- set to true
if all fields should be set
readOnly.ValueModel add(String propertyName)
propertyName
- the property to create a valueModel for.
ValueModel add(String propertyName, ValueModel valueModel)
propertyName
- the property.valueModel
- the valueModel to access the property.
ValueModel add(String propertyName, ValueModel valueModel, FieldMetadata fieldMetadata)
This adds another dimension to the formModel as this makes it possible to provide your own property that is not present on the formObject but does have a valueModel and metadata to bind fields and listen to.
propertyName
- the property, possibly not bound to the formObject.valueModel
- the valueModel to access the property.fieldMetadata
- the metadata for this valueModel.
DerivedValueModel
,
AbstractDerivedValueModel
,
MessageFormatValueModel
ValueModel addMethod(String propertyMethodName, String derivedFromProperty)
propertyMethodName
- method to invoke.derivedFromProperty
- property to use as argument.
ValueModel addMethod(String propertyMethodName, String[] derivedFromProperties)
propertyMethodName
- method to invoke.derivedFromProperties
- a number of properties to use as arguments
on the method.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |