UI Factory
From Documentation
UiFactory is used to instantiate all UI objects, such as session, desktop, and components, and to load ZUML documents. You could customize it to provide the functionality you want.
For example, SerializableUiFactory is the factory used to instantiate sessions that are serializable[1], while SimpleUiFactory, the default factory, instantiates non-serializable sessions.
Here are a list of customization you could do with UI Factory:
- Load a ZUML document from, say, a database
- It can be done by overriding UiFactory.getPageDefinition(RequestInfo, String)
- Instantiate a component by using a different implementation
- It can be done by overriding UiFactory.newComponent(Page, Component, ComponentInfo) and UiFactory.newComponent(Page, Component, ComponentInfo, String).
- Instantiate a desktop by using a different implementation
- It can be done by overriding UiFactory.newDesktop(RequestInfo, String, String)
- Instantiate a page by using a different implementation
- It can be done by overriding UiFactory.newPage(RequestInfo, PageDefinition, String) and/or UiFactory.newPage(RequestInfo, Richlet, String)
Notice that it is suggested to extend from either SerializableUiFactory or SimpleUiFactory, rather than to implement UiFactory from scratch.
- ↑ Then, the application is able to run in a clustering environment. Fore more information, please refer to the Clustering section
Load ZUML from Database
Version History
Version | Date | Content |
---|---|---|