XUI Look and FeelThe Look and Feel Manager controls the look and feel of an XUI page. The Look and Feel Manager is responsible for managing and organizing the pluggable look-and-feel (PLAF). It is also responsible for binding the appropriate style sheets and scripts for a selected look-and-feel. In XUI, a look-and-feel is said to be "pluggable" where new look-and-feels can be created and made available framework-wide or existing look-and-feels can be customized by adding or revising their respective CSS files. XUI has the following built-in PLAFs:
The psuedo names are the actual names used by the application to control the look-and-feel of the page. For example, to load a new look-and-feel for a screen, the psuedo name can be entered in the URL as follows: http://localhost:8080/xui-framework/index.jsp?lookandfeel=windows These names are defined in the "plaf-registry.xml" file inside $APP_NAME/XUI-INF/plaf directory and can be revised to whatever name desired. The default behavior of the XUI framework is the Microsoft Windows-like look and feel when Internet Explorer is used as a web browser. When Netscape Browser is used, the default look and feel is similar to the look-and. There are three ways to set the look and feel in the XUI framework. There are three ways to set the look and feel in the XUI framework. 1. Using properties file When the 'lookandfeel' key exists and the value is set in the properties file (xui-config.properties), the value overrides the default look and feel of all XUI pages in the application. For example, when the properties file (xui-config.properties) contains the following line, lookandfeel=motif all XUI pages in the application will have the 'motif' look and feel, regardless of whether the client is Internet Explorer or Netscape. 2. Using <xui:view> attribute The look and feel of an XUI page can be set in the <xui:view> tag with the optional attribute 'lookandfeel'. In the following example, the attribute 'lookandfeel' is set to 'metal'. <%@ taglib uri="http://www.jway.com/xui-1.0" prefix="xui"%> <xui:view lookandfeel="metal"> ... </xui:view> In this case, the value of attribute 'lookandfeel' will override the default look-and-feel and the look-and-feel that is set in the properties file. The look and feel is only valid for the view which it is used. 3. Using a request parameter When the parameter 'lookandfeel' is set in the request, the value overrides all other look and feel defaults. In the following example, the request parameter 'lookandfeel' is set to be 'windows'. http://localhost:8080/xui-framework/index.jsp?lookandfeel=windows When the look-and-feel is set as a request parameter, the value of the parameter takes precedence over all the other ways to set the look-and-feel. Once the look and feel is set through a request parameter, it is effective until the value is reset or the session ends. Next: Using CSS Positioning for Formatting. |
|
|
COPYRIGHT © 1997–2006
JWAY GROUP, Inc. |
|