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 ] |
9 The Woodstock com.sun.webui.jsf.theme Package
9.4 The Theme Constants Classes
9.4.1 The ThemeJavascript Class
9.4.3 The ThemeTemplates Class Class
9.4.4 The ThemeStyles Class Class
The classes in com.sun.webui.jsf.theme are implementations
of com.sun.webui.theme interfaces or convenience classes
to encapsulate commonly executed theme related code used by
components or renderers or applications.
The JSFThemeContext is a subclass of
ThemeContext instance if there is no
instance available in the environment. It uses JSF interfaces to obtain
the current locale and it sets the default ThemeFactory
class and ClassLoader.
For more detailed information see
JSFThemeContext javadoc.
The ThemeUtilities is class of convenience methods intended
to be used by the Woodstock components to obtain a Theme
instance, and other common tasks like getting an ImageComponent.
It does implement some policies. It caches the Theme
instance as a request attribute under the assumption that the theme
will not change during the request. At this point in the development
changing themes in a request is not practical.
There was also a need to support legacy code that used a
session attribute to store the theme name. This was intended
to allow a controlling layer like an IDE to change the theme name.
But that functionality now is provided by ThemeContext
but legacy code has not been updated to use ThemeContext.
This session attribute will prevent dynamically changing the
active theme for an application at runtime, unless the
session attribute is changed to reflect the theme change.
Note that this class is not intended for public use by web applications, but is intended solely for use by Woodstock components.
For more detailed information see
ThemeUtilities javadoc.
The ThemeELResolver is a JSF property resolver and is
configured in the faces-config.xml file in the
webui-jsf.jar. This resolver can be used by application's
to obtain theme resources using a value expression. The recognized
variables are:
<webuijsf:markup tag="div" styleClass="#{themeStyles.CONTENT_MARGIN}">
For more detailed information see
ThemeELResolver javadoc.
The theme constants classes define public final constant String
properties for literal string keys that define theme resources in
the theme ResourceBundle Properties files.
The ThemeJavascript class defines constants for keys
defined in the
javascript.properties
file.
The Javascript properties define files that must be loaded in every page, browser dependent files, name space prefixes and properties to control the Javascript client theme.
For more detailed information see
ThemeJavascript javadoc.
The ThemeImages class defines constants for keys
defined in the
images.properties
file.
The properties defined in images.properties define the
image file path, dimensions, "ALT" and "TITLE" attribute text. The
"ALT" and "TITLE" properties can refer to keys defined in
messages.properties to support localized text. This
reduces the need for locale variants for the image.properties
file.
For more detailed information see
ThemeImages javadoc.
The ThemeTemplates class defines constants for keys
defined in the
templates.properties
file.
The properties defined in templates.properties define
an html file that contains the markup for a Woodstock component
that is implemented as a Javascript "widget". These components utilize
"widget" renderers and not the HTML renderers used by other components.
For more detailed information see
ThemeTemplates javadoc.
The ThemeStyles class defines constants for keys
defined in the
styles.properties
file. It also defines constants for the properties defined in the
stylesheets.properties
file.
The properties defined in styles.properties map a CSS
selector defined in the style sheets to a logical name. This file is
also called on occasion the "CLASSMAPPER".
For more detailed information see
ThemeStyles javadoc.
| [ 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 ] |