The Theme and Woodstock Web Applications - Version @THEMEVERSION@
|
| [ Table of Contents | 0 Revision History | 1 Introduction | 2 Configuring THEME_RESOURCES | 3 Creating Properties Files | 4 Redefining Properties | 5 Creating Themes | 6 Configuring DEFAULT_THEME | 7 Runtime Theme Components | 8 PortalThemeTagLib | 9 com.sun.webui.jsf.theme | 10 com.sun.webui.theme | 11 Javascript Theme | Appendices ] |
7 The Head and ThemeLinks Components
8 The PortalThemeTaglib Tag Library
8.1 The PortalThemeTag JSP Tag
The Head and ThemeLinks components are responsible
for rendering the markup to include all the necessary theme related files
in every application page.
Head component renders the "HEAD" HTML element
and includes the javascript bootstrap code that must be
included in every Woodstock web application page. An example of a rendered
Head component looks like:
<head>
<title></title>
<script type="text/javascript">var webui_suntheme@CACHEVERSION@={
"webuiAll": false,
"parseOnLoad": true,
"theme": {"locale": "en"},
"isStyleSheet": true,
"isDebug": false,
"webuiJsfx": false,
"ajax": {"isJsfx": true}
};</script>
<script type="text/javascript"
src="/woods-testapp/theme/com/sun/webui/jsf/@SUNTHEMEPKGDIR@/javascript/bootstrap.js"></script>
</head>
For more detailed information see
Head javadoc.
ThemeLinks component is used if the application is not
using the Head component. It renders exactly like the
Head component as seen in the example
above, except for the "HEAD", "META", and "TITLE", HTML elements.
For more detailed information see
ThemeLinks javadoc.
The Woodstock components and renderers use the theme by calling
ThemeUtilities.getTheme() and then calling the desired
method on the returned theme instance. In
general the HTML renderers make much more use of the theme than
the components. They make heavy use of the getStyleClass
method to obtain the selectors necessary for the rendered HTML
to express the desired theme.
The components use the theme method getMessage to obtain
button text, help text and data for default values like the text column
width for a text field.
At the time of this writing the theme is in a transitional phase where some components are rendered using HTML renderers. The theme data is obtained on the server and rendered with the HTML markup. Some components are rendered by "widget" renderers. These renderers generate Javascript statements. The Javascript "widgets" that result from the executing Javascript depend on the Javascript theme to acquire theme data. At this time some "widgets" are not completely dependent on the Javascript theme, and some theme data is passed as parameters to Javascript methods as rendered by the "widget" renderers.
The PortalThemeTagLib is not publicly available at this
time, but may be obtained on request. It is intended for use by
Portlet Containers to make sure that the necessary theme files are
loaded in the aggregate page.
The
PortalThemeTag is a JSP tag that performs similarly
to the Head and ThemeLinks components.
This tag is intended for use in a Portlet Container's aggregate page
making the Woodstock theme available for all portlets in an
aggregate page.
| [ Table of Contents | 0 Revision History | 1 Introduction | 2 Configuring THEME_RESOURCES | 3 Creating Properties Files | 4 Redefining Properties | 5 Creating Themes | 6 Configuring DEFAULT_THEME | 7 Runtime Theme Components | 8 PortalThemeTagLib | 9 com.sun.webui.jsf.theme | 10 com.sun.webui.theme | 11 Javascript Theme | Appendices ] |