TOC PREV NEXT INDEX

Components and Styling


JSF is a component-based architecture, and as such, JSF application User Interfaces are constructed from a set of nested components. The JSF specification includes a number of standard components, but also provides for adding custom components to the JSF runtime environment. This extensible component architecture is leveraged in ICEfaces to support the standard components as well as several collections of custom components.

From the developer's perspective, a component is represented with a tag in a JSF page, and the tag library descriptor (TLD) for that tag defines a component class, and a renderer class for the component. At runtime, TLDs configured into the web application are parsed, and assembled into a RenderKit, the default for JSF being the html_basic RenderKit. ICEfaces utilizes the html_basic RenderKit but replaces standard HTML renderers with Direct-to-DOM renderers.

Table 1 identifies the component libraries (name spaces) that ICEfaces supports.

Table 1   ICEfaces-supported Component Libraries.
Name Space
Description
ICEfaces Features
ICEfaces Component Suite
    • Comprehensive set of rich components
    • Incremental page update
    • Automated partial submit
    • Automated CSS styling/
      themes
    • Client-side effects and animations
java.sun.com/jsf/html
Sun Standard JSF Components
    • Incremental page update
myfaces.apache.org/tomahawk
Apache MyFaces Tomahawk Components
    • Incremental page update

See Components Reference for more information on using the component libraries with ICEfaces.

Cascading Style Sheets (CSS) Styling

The purpose of Cascading Style Sheets (CSS) is to separate style from markup. ICEfaces encourages and supports this approach in the ICEfaces Component Suite by supporting automated component styling based on common CSS class definitions. This means that when the ICEfaces Component Suite is used to develop applications, those applications can be quickly and consistently re-skinned with a different look by replacing the CSS with a new CSS. More information about styling the ICEfaces Component Suite can be found in Styling the ICEfaces Component Suite.

Other Custom Components

ICEfaces adheres to the extensible component architecture of JSF, and therefore supports inclusion of other custom components. Most existing custom components that use HTML-based renderers should integrate seamlessly into an ICEfaces application. However, if the component renderer incorporates significant JavaScript in its implementation or relies on Ajax techniques itself for its functionality, the likelihood of a conflict between the component JavaScript and the ICEfaces Bridge JavaScript is high, and can result in unpredictable behavior.

The most effective way to incorporate a new component into an ICEfaces application is to develop a standard JSF custom component that uses the ResponseWriter mechanism to render HTML markup. For an example of such a component, refer to the ice:inputText component renderer implementation, which can be found in the following file in the ICEfaces source distribution bundle: icefaces/core/src/com/icesoft/faces/renderkit/dom_html_basic/InputTextRenderer.java



Copyright 2005-2009. ICEsoft Technologies, Inc.
TOC PREV NEXT INDEX