![]()
Creating the ICEfaces Direct-to-DOM Enabled TabbedPane Renderer
This section will step you through the code modifications that were required to Direct-to-DOM enable the MyFaces TabbedPane renderer shown in Figure 1-2 into the Direct-to-DOM enabled renderer shown in Figure 1-3. By following the steps in this tutorial, you will build the ICEfaces application from source code and deploy it to your local Tomcat server.
For a full version of the source code used in this tutorial, see the TabbedPaneRenderer source file included with the tabbedpane-icefaces sample application. The original MyFaces
HtmlTabbedPaneRenderer source is included with the tabbedpane-myfaces sample application. (HtmlTabbedPaneRenderer.java). Refer to Figure 1-1 for the location of the source files.
The package statement in the Direct-to-DOM enabled renderer has been changed.
// packaged in the icefaces tutorial package package com.icesoft.tutorial;The following imports are required for the Direct-to-DOM enabled renderer:
// myfaces import org.apache.myfaces.renderkit.RendererUtils; import org.apache.myfaces.renderkit.html.HTML; import org.apache.myfaces.component.UserRoleUtils; import org.apache.myfaces.custom.tabbedpane.* ; //W3C DOM import org.w3c.dom.Element; import org.w3c.dom.Text; //icefaces import com.icesoft.faces.context.DOMContext; import com.icesoft.faces.context.DOMResponseWriter; import com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer; import com.icesoft.faces.renderkit.dom_html_basic.PassThruAttributeRenderer; //JSF import javax.faces.component.UIComponent; import javax.faces.component.UIForm; import javax.faces.component.UINamingContainer; import javax.faces.context.FacesContext; import javax.faces.context.ResponseWriter; // Java import java.io.IOException; import java.util.List; import java.util.Map;The Direct-to-DOM enabled TabbedPaneRenderer extends the ICEfaces DOMBasicRenderer.
public class TabbedPaneRenderer extends DomBasicRenderer
|
Copyright 2005. ICEsoft Technologies, Inc. http://www.icesoft.com |