1 5 package org.exoplatform.portlet.faces; 6 7 import javax.faces.FactoryFinder; 8 import javax.faces.render.RenderKit; 9 import javax.faces.render.RenderKitFactory; 10 import org.exoplatform.faces.core.component.*; 11 import org.exoplatform.faces.core.renderer.html.NodeTabbedPaneRenderer; 12 import org.exoplatform.faces.core.renderer.xhtmlmp.*; 13 import com.sun.faces.renderkit.RenderKitImpl ; 14 15 20 public class XHTMLMPRendererConfiguration { 21 static public void confiure() throws Exception { 22 RenderKitFactory rfactory = 23 (RenderKitFactory) FactoryFinder.getFactory( FactoryFinder.RENDER_KIT_FACTORY ); 24 RenderKit rkit = 25 rfactory.getRenderKit(null, UIExoComponent.XHTMLMP_KIT); 26 if(rkit == null) { 27 rkit = new RenderKitImpl() ; 28 rfactory.addRenderKit(UIExoComponent.XHTMLMP_KIT, rkit) ; 29 } 30 rkit = 31 rfactory.getRenderKit(null, UIExoComponent.XHTMLMP_KIT); 32 if(rkit.getRenderer(UISimpleForm.COMPONENT_FAMILY, "SimpleFormRenderer") == null) { 33 rkit.addRenderer(UISimpleForm.COMPONENT_FAMILY, "SimpleFormRenderer", new SimpleFormRenderer()); 34 } 35 if(rkit.getRenderer(UIExoComponent.COMPONENT_FAMILY, "TabbedPaneRenderer") == null) { 36 rkit.addRenderer(UIExoComponent.COMPONENT_FAMILY, "TabbedPaneRenderer", new NodeTabbedPaneRenderer()); 37 } 38 } 39 } | Popular Tags |