|
||||||||||
| HomePage :: Categories :: PageIndex :: RecentChanges :: RecentlyCommented :: Login/Register |



| Binding | Usage |
| XLabelBinding | A simple binding that is used for read-only Label components |
| XTextBinding | Bind a TextComponent to a data model value/node. The binding allows a model node to linked to a UI component so that it can be refreshed when new data is written to the model or conversely when the UI component needs to write data to the model. This binding is designed to be used by components such as Edit fields, TextComponents or TextFields |
| XListBinding | Bind a list to a data model value/node. The binding allows a list model node to linked to a UI component so that it can be refreshed when new data is written to the model or conversely when the UI component needs to write data to the model. This binding is designed to be used by list like components such as comboboxes or drop down lists. |
| XStateBinding | Bind a component's state to a data model value/node. The binding allows a model node to linked to a UI component so that it can be refreshed when new data is written to the model or conversely when the UI component needs to write data to the model.This binding is designed to be used by components such as Checkboxes.This state change does not affect the content displayed by the component |

Method signature
In XUI 2.0 The attributes can also be defined in classes other than the current page or classes derived from XPage. The syntax for such expressions is as follows:
{{table columns="2" cellpadding="1" cells="Syntax;Behavior;${mypackage.MyClass.myMethod(args...)};to invoke a static method;${mypackage.MyClass[].myMethod(args...)};to create a new instance of the class on each evaluation;${mypackage.MyClass[referenceName].myMethod(args...)};for a named object instance;${myMethod[referenceName](args...)};for a method contained within the invoking page;${[referenceName].myMethod(args...)} ;for a method contained within the class instance referred to by the reference name."}}
Extended attribute declarations
where mypackage is the name of the Java package containing the class MyClass. The value of referenceName is a user defined value that identifies the instance of the class. The application instantiates an instance of the class when the expression is first encountered and thereafter maintains the instance with each subsequent call retrieving the same instance of the class. As in early versions, the method call can also contain zero or more arguments.
What this means in practice is that the class or classes implementing an applications business logic no longer need be derived from XPage. In this way it is possible to build libraries of reusable functions. Lets look at an example:
There are no comments on this page. [Add comment]