...
Tip | ||
---|---|---|
| ||
It's probably never a good idea to create a new theme from scratch. Instead, use the simple theme as a starting point. The simple theme provides just enough foundation to make it easy to create new controls by extending or wrapping the basic controls. Before starting a new theme, be sure to review the source templates for all of the provided themes. The existing themes are your best guide to creating new themes. |
...
The xhtml theme provides several good examples of the "wrapping" technique. The simple theme renders the basic control. The xhtml theme "dresses up" many of the controls by adding a header and footer.
...
One benefit of object-orientated programming is that it lets us "design by difference." We can extend an object and code only the behavior that changes. Themes provide a similar capability. The subdirectory that hosts a theme can contain a theme.properties
file. A parent
entry can be added to the property file to designate a theme to extend. The ajax theme extends the xhtml theme using this technique.
...