public class DataBinder
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.String,CollectionItem> |
_collectionItemMap
Deprecated.
|
protected java.util.Map<java.lang.String,CollectionItem> |
_collectionOwnerMap
Deprecated.
|
static java.lang.String |
ARGS
Deprecated.
|
static java.lang.String |
LOAD_ON_SAVE_TRIGGER_COMPONENT
Deprecated.
|
static java.lang.String |
NULLIFY
Deprecated.
|
static java.lang.String |
TEMPLATE
Deprecated.
|
static java.lang.String |
TEMPLATEMAP
Deprecated.
|
static java.lang.String |
VARNAME
Deprecated.
|
Constructor and Description |
---|
DataBinder()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
addBinding(Component comp,
java.lang.String attr,
java.lang.String expr)
Deprecated.
Binding bean to UI component.
|
void |
addBinding(Component comp,
java.lang.String attr,
java.lang.String expr,
java.util.List<java.lang.String> loadWhenEvents,
java.util.List<java.lang.String> saveWhenEvents,
java.lang.String access,
java.lang.String converter)
Deprecated.
Binding bean to UI component.
|
void |
addBinding(Component comp,
java.lang.String attr,
java.lang.String expr,
java.util.List<java.lang.String> loadWhenEvents,
java.util.List<java.lang.String> saveWhenEvents,
java.lang.String access,
java.lang.String converter,
java.util.Map<java.lang.Object,java.lang.Object> args,
java.util.List<java.lang.String> loadAfterEvents,
java.util.List<java.lang.String> saveAfterEvents)
Deprecated.
Binding bean to UI component.
|
void |
addBinding(Component comp,
java.lang.String attr,
java.lang.String expr,
java.util.List<java.lang.String> loadWhenEvents,
java.lang.String saveWhenEvent,
java.lang.String access,
java.lang.String converter)
Deprecated.
Binding bean to UI component.
|
void |
addBinding(Component comp,
java.lang.String attr,
java.lang.String expr,
java.lang.String[] loadWhenEvents,
java.lang.String[] saveWhenEvents,
java.lang.String access,
java.lang.String converter)
Deprecated.
Binding bean to UI component.
|
void |
addBinding(Component comp,
java.lang.String attr,
java.lang.String expr,
java.lang.String[] loadWhenEvents,
java.lang.String saveWhenEvent,
java.lang.String access,
java.lang.String converter)
Deprecated.
Binding bean to UI component.
|
void |
addCollectionItem(java.lang.Class item,
java.lang.Class owner,
CollectionItem decor)
Deprecated.
Adds a CollectionItem for the specified item and owner component;
e.g.
|
void |
bindBean(java.lang.String beanid,
java.lang.Object bean)
Deprecated.
Bind a real bean object to the specified beanid.
|
boolean |
existBinding(Component comp,
java.lang.String attr)
Deprecated.
Whether this component and attribute associated with a binding.
|
boolean |
existsBindings(Component comp)
Deprecated.
Whether this component associated with any bindings.
|
java.util.Collection<Binding> |
getAllBindings()
Deprecated.
Return all Bindings covered by this DataBinder
|
Binding |
getBinding(Component comp,
java.lang.String attr)
Deprecated.
Given component and attr, return the associated
Binding . |
protected CollectionItem |
getBindingCollectionItem(Component comp)
Deprecated.
Returns a CollectionItem by the comp accordingly.
|
java.util.Collection<Binding> |
getBindings(Component comp)
Deprecated.
Given component, return the associated list of
Binding s. |
protected void |
init()
Deprecated.
|
boolean |
isDefaultConfig()
Deprecated.
Whether use the default binding configuration.
|
boolean |
isLoadOnSave()
Deprecated.
Returns whether this DataBinder shall do load-on-save automatically(default is true).
|
void |
loadAll()
Deprecated.
Load all value from data beans to UI components.
|
void |
loadAttribute(Component comp,
java.lang.String attr)
Deprecated.
Load value from the data bean property to a specified attribute of the UI component.
|
void |
loadComponent(Component comp)
Deprecated.
Load values from the data bean properties to all attributes of a specified UI component.
|
protected java.lang.Object[] |
loadPropertyAnnotation(Component comp,
java.lang.String propName,
java.lang.String bindName)
Deprecated.
|
void |
removeBinding(Component comp,
java.lang.String attr)
Deprecated.
Remove the binding associated with the attribute of the component.
|
void |
saveAll()
Deprecated.
Save all values from UI components to beans.
|
void |
saveAttribute(Component comp,
java.lang.String attr)
Deprecated.
Save value from a specified attribute of the UI component to a data bean property.
|
void |
saveComponent(Component comp)
Deprecated.
Save values from all attributes of a specified UI component to data bean properties.
|
void |
setDefaultConfig(boolean b)
Deprecated.
Whether use the default binding configuration.
|
void |
setLoadOnSave(boolean b)
Deprecated.
Sets whether this DataBinder shall do load-on-save automatically.
|
void |
setupTemplateComponent(Component comp,
java.lang.Object owner)
Deprecated.
Sets up the specified comp and its descendants to be as template (or not)
|
public static final java.lang.String LOAD_ON_SAVE_TRIGGER_COMPONENT
public static final java.lang.String NULLIFY
public static final java.lang.String ARGS
public static final java.lang.String VARNAME
public static final java.lang.String TEMPLATEMAP
public static final java.lang.String TEMPLATE
protected java.util.Map<java.lang.String,CollectionItem> _collectionItemMap
protected java.util.Map<java.lang.String,CollectionItem> _collectionOwnerMap
public void setLoadOnSave(boolean b)
b
- true to have this DataBinder shall do load-on-save automatically.public boolean isLoadOnSave()
public void addBinding(Component comp, java.lang.String attr, java.lang.String expr)
comp
- The component to be associated.attr
- The attribute of the component to be associated.expr
- The expression to associate the data bean.public void addBinding(Component comp, java.lang.String attr, java.lang.String expr, java.lang.String[] loadWhenEvents, java.lang.String saveWhenEvent, java.lang.String access, java.lang.String converter)
comp
- The component to be associated.attr
- The attribute of the component to be associated.expr
- The expression to associate the data bean.loadWhenEvents
- The event list when to load data.saveWhenEvent
- The event when to save data.access
- In the view of UI component: "load" load only,
"both" load/save, "save" save only when doing
data binding. null means using the default access natural of the component.
e.g. Label.value is "load", but Textbox.value is "both".converter
- The converter class used to convert classes between component
and the associated bean. null means using the default class conversion method.public void addBinding(Component comp, java.lang.String attr, java.lang.String expr, java.lang.String[] loadWhenEvents, java.lang.String[] saveWhenEvents, java.lang.String access, java.lang.String converter)
comp
- The component to be associated.attr
- The attribute of the component to be associated.expr
- The expression to associate the data bean.loadWhenEvents
- The event list when to load data.saveWhenEvents
- The event when to save data.access
- In the view of UI component: "load" load only,
"both" load/save, "save" save only when doing
data binding. null means using the default access natural of the component.
e.g. Label.value is "load", but Textbox.value is "both".converter
- The converter class used to convert classes between component
and the associated bean. null means using the default class conversion method.public void addBinding(Component comp, java.lang.String attr, java.lang.String expr, java.util.List<java.lang.String> loadWhenEvents, java.lang.String saveWhenEvent, java.lang.String access, java.lang.String converter)
comp
- The component to be associated.attr
- The attribute of the component to be associated.expr
- The expression to associate the data bean.loadWhenEvents
- The event list when to load data.saveWhenEvent
- The event when to save data.access
- In the view of UI component: "load" load only,
"both" load/save, "save" save only when doing
data binding. null means using the default access natural of the component.
e.g. Label.value is "load", but Textbox.value is "both".converter
- The converter class used to convert classes between component
and the associated bean. null means using the default class conversion method.public void addBinding(Component comp, java.lang.String attr, java.lang.String expr, java.util.List<java.lang.String> loadWhenEvents, java.util.List<java.lang.String> saveWhenEvents, java.lang.String access, java.lang.String converter)
comp
- The component to be associated.attr
- The attribute of the component to be associated.expr
- The expression to associate the data bean.loadWhenEvents
- The event list when to load data.saveWhenEvents
- The event list when to save data.access
- In the view of UI component: "load" load only,
"both" load/save, "save" save only when doing
data binding. null means using the default access natural of the component.
e.g. Label.value is "load", but Textbox.value is "both".converter
- The converter class used to convert classes between component
and the associated bean. null means using the default class conversion method.public void addBinding(Component comp, java.lang.String attr, java.lang.String expr, java.util.List<java.lang.String> loadWhenEvents, java.util.List<java.lang.String> saveWhenEvents, java.lang.String access, java.lang.String converter, java.util.Map<java.lang.Object,java.lang.Object> args, java.util.List<java.lang.String> loadAfterEvents, java.util.List<java.lang.String> saveAfterEvents)
comp
- The component to be associated.attr
- The attribute of the component to be associated.expr
- The expression to associate the data bean.loadWhenEvents
- The event list when to load data.saveWhenEvents
- The event list when to save data.access
- In the view of UI component: "load" load only,
"both" load/save, "save" save only when doing
data binding. null means using the default access natural of the component.
e.g. Label.value is "load", but Textbox.value is "both".converter
- The converter class used to convert classes between component
and the associated bean. null means using the default class conversion method.args
- generic argument map for each binding.loadAfterEvents
- the event list when to load data after.saveAfterEvents
- the event list when to save data after.public void removeBinding(Component comp, java.lang.String attr)
comp
- The component to be removed the data binding association.attr
- The attribute of the component to be removed the data binding association.public Binding getBinding(Component comp, java.lang.String attr)
Binding
.comp
- the concerned componentattr
- the concerned attributepublic java.util.Collection<Binding> getBindings(Component comp)
Binding
s.comp
- the concerned componentpublic java.util.Collection<Binding> getAllBindings()
public boolean existsBindings(Component comp)
public boolean existBinding(Component comp, java.lang.String attr)
public boolean isDefaultConfig()
public void setDefaultConfig(boolean b)
public void bindBean(java.lang.String beanid, java.lang.Object bean)
Component.getAttributeOrFellow(java.lang.String, boolean)
method
if it cannot find the specified bean via the given beanid.beanid
- The bean id used in data binding.bean
- The real bean object to be associated with the bean id.public void loadAttribute(Component comp, java.lang.String attr)
comp
- the UI component to be loaded value.attr
- the UI component attribute to be loaded value.public void saveAttribute(Component comp, java.lang.String attr)
comp
- the UI component used to save value into backend data bean.attr
- the UI component attribute used to save value into backend data bean.public void loadComponent(Component comp)
comp
- the UI component to be loaded value.public void saveComponent(Component comp)
comp
- the UI component used to save value into backend data bean.public void loadAll()
public void saveAll()
protected java.lang.Object[] loadPropertyAnnotation(Component comp, java.lang.String propName, java.lang.String bindName)
protected void init()
public void addCollectionItem(java.lang.Class item, java.lang.Class owner, CollectionItem decor)
item
- the item classowner
- the owner classdecor
- the associated CollectionItem decoratorCollectionItem
protected CollectionItem getBindingCollectionItem(Component comp)
CollectionItem
public void setupTemplateComponent(Component comp, java.lang.Object owner)
Copyright © 2005-2018 Potix Corporation. All Rights Reserved.