public class DataBinder extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,CollectionItem> |
_collectionItemMap
Deprecated.
|
protected Map<String,CollectionItem> |
_collectionOwnerMap
Deprecated.
|
static String |
ARGS
Deprecated.
|
static String |
LOAD_ON_SAVE_TRIGGER_COMPONENT
Deprecated.
|
static String |
NULLIFY
Deprecated.
|
static String |
TEMPLATE
Deprecated.
|
static String |
TEMPLATEMAP
Deprecated.
|
static String |
VARNAME
Deprecated.
|
| Constructor and Description |
|---|
DataBinder()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addBinding(org.zkoss.zk.ui.Component comp,
String attr,
String expr)
Deprecated.
Binding bean to UI component.
|
void |
addBinding(org.zkoss.zk.ui.Component comp,
String attr,
String expr,
List<String> loadWhenEvents,
List<String> saveWhenEvents,
String access,
String converter)
Deprecated.
Binding bean to UI component.
|
void |
addBinding(org.zkoss.zk.ui.Component comp,
String attr,
String expr,
List<String> loadWhenEvents,
List<String> saveWhenEvents,
String access,
String converter,
Map<Object,Object> args,
List<String> loadAfterEvents,
List<String> saveAfterEvents)
Deprecated.
Binding bean to UI component.
|
void |
addBinding(org.zkoss.zk.ui.Component comp,
String attr,
String expr,
List<String> loadWhenEvents,
String saveWhenEvent,
String access,
String converter)
Deprecated.
Binding bean to UI component.
|
void |
addBinding(org.zkoss.zk.ui.Component comp,
String attr,
String expr,
String[] loadWhenEvents,
String[] saveWhenEvents,
String access,
String converter)
Deprecated.
Binding bean to UI component.
|
void |
addBinding(org.zkoss.zk.ui.Component comp,
String attr,
String expr,
String[] loadWhenEvents,
String saveWhenEvent,
String access,
String converter)
Deprecated.
Binding bean to UI component.
|
void |
addCollectionItem(Class item,
Class owner,
CollectionItem decor)
Deprecated.
Adds a CollectionItem for the specified item and owner component;
e.g.
|
void |
bindBean(String beanid,
Object bean)
Deprecated.
Bind a real bean object to the specified beanid.
|
boolean |
existBinding(org.zkoss.zk.ui.Component comp,
String attr)
Deprecated.
Whether this component and attribute associated with a binding.
|
boolean |
existsBindings(org.zkoss.zk.ui.Component comp)
Deprecated.
Whether this component associated with any bindings.
|
Collection<Binding> |
getAllBindings()
Deprecated.
Return all Bindings covered by this DataBinder
|
Binding |
getBinding(org.zkoss.zk.ui.Component comp,
String attr)
Deprecated.
Given component and attr, return the associated
Binding. |
protected CollectionItem |
getBindingCollectionItem(org.zkoss.zk.ui.Component comp)
Deprecated.
Returns a CollectionItem by the comp accordingly.
|
Collection<Binding> |
getBindings(org.zkoss.zk.ui.Component comp)
Deprecated.
Given component, return the associated list of
Bindings. |
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(org.zkoss.zk.ui.Component comp,
String attr)
Deprecated.
Load value from the data bean property to a specified attribute of the UI component.
|
void |
loadComponent(org.zkoss.zk.ui.Component comp)
Deprecated.
Load values from the data bean properties to all attributes of a specified UI component.
|
protected Object[] |
loadPropertyAnnotation(org.zkoss.zk.ui.Component comp,
String propName,
String bindName)
Deprecated.
|
void |
removeBinding(org.zkoss.zk.ui.Component comp,
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(org.zkoss.zk.ui.Component comp,
String attr)
Deprecated.
Save value from a specified attribute of the UI component to a data bean property.
|
void |
saveComponent(org.zkoss.zk.ui.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(org.zkoss.zk.ui.Component comp,
Object owner)
Deprecated.
Sets up the specified comp and its descendants to be as template (or not)
|
public static final String LOAD_ON_SAVE_TRIGGER_COMPONENT
public static final String NULLIFY
public static final String ARGS
public static final String VARNAME
public static final String TEMPLATEMAP
public static final String TEMPLATE
protected Map<String,CollectionItem> _collectionItemMap
protected Map<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(org.zkoss.zk.ui.Component comp,
String attr,
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(org.zkoss.zk.ui.Component comp,
String attr,
String expr,
String[] loadWhenEvents,
String saveWhenEvent,
String access,
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(org.zkoss.zk.ui.Component comp,
String attr,
String expr,
String[] loadWhenEvents,
String[] saveWhenEvents,
String access,
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(org.zkoss.zk.ui.Component comp,
String attr,
String expr,
List<String> loadWhenEvents,
String saveWhenEvent,
String access,
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(org.zkoss.zk.ui.Component comp,
String attr,
String expr,
List<String> loadWhenEvents,
List<String> saveWhenEvents,
String access,
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(org.zkoss.zk.ui.Component comp,
String attr,
String expr,
List<String> loadWhenEvents,
List<String> saveWhenEvents,
String access,
String converter,
Map<Object,Object> args,
List<String> loadAfterEvents,
List<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(org.zkoss.zk.ui.Component comp,
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(org.zkoss.zk.ui.Component comp, String attr)
Binding.comp - the concerned componentattr - the concerned attributepublic Collection<Binding> getBindings(org.zkoss.zk.ui.Component comp)
Bindings.comp - the concerned componentpublic Collection<Binding> getAllBindings()
public boolean existsBindings(org.zkoss.zk.ui.Component comp)
public boolean existBinding(org.zkoss.zk.ui.Component comp,
String attr)
public boolean isDefaultConfig()
public void setDefaultConfig(boolean b)
public void bindBean(String beanid, 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(org.zkoss.zk.ui.Component comp,
String attr)
comp - the UI component to be loaded value.attr - the UI component attribute to be loaded value.public void saveAttribute(org.zkoss.zk.ui.Component comp,
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(org.zkoss.zk.ui.Component comp)
comp - the UI component to be loaded value.public void saveComponent(org.zkoss.zk.ui.Component comp)
comp - the UI component used to save value into backend data bean.public void loadAll()
public void saveAll()
protected Object[] loadPropertyAnnotation(org.zkoss.zk.ui.Component comp, String propName, String bindName)
protected void init()
public void addCollectionItem(Class item, Class owner, CollectionItem decor)
item - the item classowner - the owner classdecor - the associated CollectionItem decoratorCollectionItemprotected CollectionItem getBindingCollectionItem(org.zkoss.zk.ui.Component comp)
CollectionItempublic void setupTemplateComponent(org.zkoss.zk.ui.Component comp,
Object owner)
Copyright © 2015. All rights reserved.