| java.lang.Object org.zkoss.zkplus.databind.Binding
Binding | public class Binding (Code) | | A Data Binding that associate component+attr to an bean expression.
author: Henri since: 3.0.0 |
Constructor Summary | |
| Binding(DataBinder binder, Component comp, String attr, String expr, LinkedHashSet loadWhenEvents, Set saveWhenEvents, String access, String converter) Constrcutor to form a binding between UI component and backend data bean.
Parameters: binder - the associated Data Binder. Parameters: comp - The concerned component Parameters: attr - The component attribute Parameters: expr - The bean expression. Parameters: loadWhenEvents - The event set when to load data. Parameters: saveWhenEvents - The event set when to save data. Parameters: access - In the view of UI component: "load" load only, "both" load/save, "save" save only when doing data binding. |
Binding | Binding(DataBinder binder, Component comp, String attr, String expr, LinkedHashSet loadWhenEvents, Set saveWhenEvents, String access, String converter)(Code) | | Constrcutor to form a binding between UI component and backend data bean.
Parameters: binder - the associated Data Binder. Parameters: comp - The concerned component Parameters: attr - The component attribute Parameters: expr - The bean expression. Parameters: loadWhenEvents - The event set when to load data. Parameters: saveWhenEvents - The event set when to save data. Parameters: 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.expr is "load", but Textbox.expr is "both". Parameters: converter - The converter class used to convert classes between component attribute and the associated bean expression. null means using the default class conversion method. |
getAttr | public String getAttr()(Code) | | Get component attribute name.
|
getBinder | public DataBinder getBinder()(Code) | | Gets the associated Data Binder of this Binding.
|
getComponent | public Component getComponent()(Code) | | Gets the associated Component of this Binding.
|
getExpression | public String getExpression()(Code) | | Get bean expression, e.g. a.b.c.
|
getLoadWhenEvents | public LinkedHashSet getLoadWhenEvents()(Code) | | Get load-when event expression set.
|
getPaths | String[] getPaths()(Code) | | Internal methods. DO NOT USE THIS.
Get bean reference paths.
|
getSaveWhenEvents | public Set getSaveWhenEvents()(Code) | | Get save-when event expression.
|
isLoadable | public boolean isLoadable()(Code) | | Whether the binding is loadable.
|
isSavable | public boolean isSavable()(Code) | | Whether the binding is savable.
|
loadAttribute | public void loadAttribute(Component comp)(Code) | | load bean value into the attribute of the specified component.
Parameters: comp - the component. |
loadAttribute | public void loadAttribute(Component comp, Object bean)(Code) | | load bean value into the attribute of the specified component.
Parameters: comp - the component. Parameters: bean - the bean value. |
saveAttribute | public void saveAttribute(Component comp)(Code) | | save into bean value from the attribute of the specified component.
Parameters: comp - the component. |
setAccess | void setAccess(String access)(Code) | | Set accessibility.
|
setAttr | void setAttr(String attr)(Code) | | Set component attribute name.
Parameters: attr - component attribute. |
setConverter | void setConverter(String cvtClsName)(Code) | | Set the
TypeConverter .
Parameters: cvtClsName - the converter class name. |
setExpression | void setExpression(String expr)(Code) | | Set bean expression (a.b.c).
|
setLoadWhenEvents | void setLoadWhenEvents(LinkedHashSet loadWhenEvents)(Code) | | Add load-when event expression.
Parameters: loadWhenEvent - the load-when expression. |
setSaveWhenEvents | void setSaveWhenEvents(Set saveWhenEvents)(Code) | | Set save-when event expression.
Parameters: saveWhenEvents - the save-when expression. |
|
|