|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.joseluismartin.gui.bind.AutoBinder<T>
public class AutoBinder<T>
Do an automatic binding of a view using reflection. Bind controls with name equals to property names in model.
Binder| Constructor Summary | |
|---|---|
AutoBinder(ModelHolder<T> view)
Create an AutoBinder for a View |
|
AutoBinder(Object view,
T model)
Create a Binder for view and model |
|
| Method Summary | |
|---|---|
void |
bind(String viewField,
String propertyName)
|
org.springframework.validation.BindingResult |
getBindingResult()
Return the Binding result |
ControlAccessorFactory |
getControlAccessorFactory()
|
Set<String> |
getIgnoredProperties()
|
T |
getModel()
Gets model |
void |
ignoreProperties(Collection<? extends String> c)
Add a Collection of property names to ignore on binding |
void |
ignoreProperty(String propertyName)
Add a property name to ignore on binding. |
void |
refresh()
Update Component from model |
void |
setControlAccessorFactory(ControlAccessorFactory controlAccessorFactory)
|
void |
setIgnoredProperties(Set<String> ignoredProperties)
|
void |
setModel(T model)
Sets model |
void |
update()
Update Model from Component |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AutoBinder(ModelHolder<T> view)
view - View to bind.
public AutoBinder(Object view,
T model)
view - model - | Method Detail |
|---|
public void bind(String viewField,
String propertyName)
throws UndefinedAccessorException
UndefinedAccessorExceptionpublic void refresh()
refresh in interface Binder<T>public void update()
update in interface Binder<T>public T getModel()
getModel in interface ModelHolder<T>public void setModel(T model)
setModel in interface ModelHolder<T>public ControlAccessorFactory getControlAccessorFactory()
public void setControlAccessorFactory(ControlAccessorFactory controlAccessorFactory)
controlAccessorFactory - the controlAccessorFactory to setpublic void ignoreProperty(String propertyName)
propertyName - property name to ignorepublic Set<String> getIgnoredProperties()
public void setIgnoredProperties(Set<String> ignoredProperties)
ignoredProperties - the ignoredProperties to setpublic void ignoreProperties(Collection<? extends String> c)
c - Collection of property names.public org.springframework.validation.BindingResult getBindingResult()
getBindingResult in interface Binder<T>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||