public class BeanBindingStrategy extends Object implements BindingStrategy
An implementation of the BindingStrategy
interface that operates on
Java beans.
This implementation uses Commons Beanutils for reading and writing properties of Java bean components. The names of form fields are mapped to corresponding names of bean properties. That way data exchange can be performed in both directions.
Constructor and Description |
---|
BeanBindingStrategy() |
Modifier and Type | Method and Description |
---|---|
Object |
readProperty(Object model,
String propertyName)
Reads a property from a model object.
|
void |
writeProperty(Object model,
String propertyName,
Object value)
Writes a property to a model object.
|
public Object readProperty(Object model, String propertyName)
FormRuntimeException
.readProperty
in interface BindingStrategy
model
- the model objectpropertyName
- the name of the property to readFormRuntimeException
- if an exception occurspublic void writeProperty(Object model, String propertyName, Object value)
FormRuntimeException
.writeProperty
in interface BindingStrategy
model
- the model objectpropertyName
- the name of the property to readvalue
- the new value of this propertyFormRuntimeException
- if an exception occursCopyright © 2016 The JGUIraffe Team. All rights reserved.