The Theme and Woodstock Web Applications - Version @THEMEVERSION@

The Theme and Woodstock Component's Relationship at Runtime

7 The Head and ThemeLinks Components

7.1 The Head Component

7.2 The ThemeLinks Component

7.3 Theme Usage by Components

8 The PortalThemeTaglib Tag Library

8.1 The PortalThemeTag JSP Tag

7 The HEAD and ThemeLinks Components

The Head and ThemeLinks components are responsible for rendering the markup to include all the necessary theme related files in every application page.

7.1 The Head Component

The 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.

7.2 The ThemeLinks Component

The 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.

7.3 Theme Usage by Components

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.

8 The PortalThemeTaglib Tag Library

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.

8.1 The PortalThemeTag JSP Tag

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.