The Theme and Woodstock Web Applications - Version @THEMEVERSION@
|
0.1 What's New - Additions and Changes Since Revision 4.0
0.1.1 Theme Support for "Third Party" Component Jars
0.1.2 Application Level Customization
0.2 What's New - Additions and Changes Since Revision 4.1
0.2.2 Localization Corrections
0.3 What's New - Additions and Changes Since Revision 4.2
|
An application may need to create components to serve specific application needs or an independent component developer creates and delivers components in jar file. The application and component developer would like to have these components reflect the brand or theme of the Woodstock component set and take advantage of the Woodstock Theme Infrastructure. The theme infrastructure has been modified to recognize theme resources found in jars along an application's class path via the ThemeService service provider interface. This allows a component developer to create a component implementation including resources for specific themes and release the implementation in a jar file and include the theme resources within the same jar file.
Previously it was difficult for an application to make
minor changes to an image, CSS selector, or message defined in a
theme. Support has been added that enables
a web application to define theme resource bundles that
redefine theme properties.
These resource bundles are specified in the application's web.xml file
using a context-param called
com.sun.webui.theme.THEME_RESOURCES.
The theme infrastructure has defined an
SPI
(Service Provider Interface
utilizing sun.misc.Service) called
ThemeService.
A concrete subclass of this class is implemented by a theme
implementation and delivered
as part of the theme jar file. Components can also be created and delivered
in a jar file along with their theme resources, and an implementation
of
ThemeService.
This feature allows multiple theme jars to exist on an application's class path. The intention was not to enable dynamic theme changes at runtime, but to provide a mechanism that allowed a component implementation with theme resources to utilize the theme infrastructure and be delivered in a jar file.
Several components have been configured to utilize new "widget" renderers that render Javascript statements in the request's response. When the Javascript executes it dynamically generates the necessary HTML markup and DOM structure on the client. These renderers are called "widget renderers". The "widget renderers" still require theme resources in order to express the theme's look and feel. The Javascript Theme is a file formated in Javascript syntax as a JSON object. It is created at build time and included in the rendered page.
Creating a theme from scratch is a nearly impossible task, for a variety of reasons. The Woodstock "themes" source tree's build.xml file provides targets to clone the "suntheme" defined in the "themes" source tree. Properties that define the theme, such as theme name, package name, etc. can be redefined in an ant properties file. These properties are then used by the build targets to clone and build an alternate theme. Once a theme has been cloned it can be modified and maintained without affecting the "suntheme". The clone can be created and maintained external to the "themes" directory if so desired.
The <webuijsf:head> no longer renders script and
link tags explicitly to load javascript files and style sheets.
It renders information about the theme and configuration as a javascript
object that results in a "boostrap" process where the javascript and
style sheets are loaded dynamically by executing some javascript code.
Section 3 Creating Theme Properties Files neglected to include information necessary to successfully provided application level theme properties files when the JSF default locale was "en" and the web container server locale was not "en". See 3.2.1 Issues with JSF and the Default Locale.