--
PedroRio - 07 Jan 2011
XEO Web Components - XEO Library
In order to finalize the XEO Library project we'll need the web pages, created with XEO's Web Components layer. As explained in
XEO Concept's introduction chapter, XEO Viewers are the containers for XEO Components which will render the webpage. Each XEO Viewer is associated with a Java class (a Bean, just like those used in JSF based applications); in that bean are the structures required by the components and the viewer itself for a sucessfull render. Different types of Beans exist for the different types of Viewers in the XEO Framework, see figure XWC.1 for details.
XWC.1 - XEO Bean Hierarchy (including custom Beans)
As depicted in figure XWC.1, there are five different types of Bean suspplied by the framework (
XEOBaseBean,
XEOBaseList,
XEOEditBean,
XEOMainBean and
XEOBaseLookupList). Each of them is designed for a specific purpose, and provides tools that aid in that purpose:
- The XEOBaseList bean is suited to list instances which are selected through a XEOQL (BOQL) expression, usually in a list viewer
- The XEOEditBean allows to edit a specific instance object and can be used to create edit viewer that deals with multiple instances
- The XEOBaseLookupList is used to create a listing of instances to allow selection of one instance
- The XEOMainBean is the bean for the Main viewer to allow opening tabs/windows with viewers
- The XEOBaseBean is the (as the name suggests) the base bean for all other beans and provides the tools to create any custom viewer that does not fit any of the previous categories.
All of the previous beans, can (and should) be extended to provide the values to XEO Components when customizing a particular viewer.
XEO Components have properties and actions, both can binded to methods in the Java bean. XEO Component properties are binded to Java bean getter methods (which return a value) and XEO Component actions are binded to Java methods that are void (to basically execute an action, instead of returning a value). The following is a sample of a XEO Menu component declaration and the respective Java code