public class PropertyModel
extends Object
implements NestedValueModel, ValueModel
Exposes a named property of another ValueModel as its own value model.
| Constructor and description |
|---|
PropertyModel(ValueModel sourceModel, String property)Creates a writable property model with Object as its declared type. |
PropertyModel(ValueModel sourceModel, String property, Class type)Creates a writable property model with an explicit declared type. |
PropertyModel(ValueModel sourceModel, String property, Class type, boolean editable)Creates a property model with explicit type and editability. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public String |
getProperty()Returns the property name represented by this model. |
|
public ValueModel |
getSourceModel()Returns the model that supplies the owning object for the bound property. |
|
public Class |
getType()Returns the declared property type. |
|
public Object |
getValue()Reads the current property value from the source object. |
|
public boolean |
isEditable()Indicates whether writes should be forwarded to the source property. |
|
public void |
setValue(Object value)Writes a new value to the property on the current source object. |
Creates a writable property model with Object as its declared type.
sourceModel - the model that supplies the owning objectproperty - the property name to accessCreates a writable property model with an explicit declared type.
sourceModel - the model that supplies the owning objectproperty - the property name to accesstype - the declared property typeCreates a property model with explicit type and editability.
sourceModel - the model that supplies the owning objectproperty - the property name to accesstype - the declared property typeeditable - whether writes should be forwarded to the source propertyReturns the property name represented by this model.
Returns the model that supplies the owning object for the bound property.
Returns the declared property type.
Reads the current property value from the source object.
null when the source object is nullIndicates whether writes should be forwarded to the source property.
true when the property model is writableWrites a new value to the property on the current source object.
value - the new property valueCopyright © 2003-2026 The Apache Software Foundation. All rights reserved.