3 Replies Latest reply on Apr 9, 2008 11:51 AM by Minatee Pradhan

    Custom Renderers in Seam

    Minatee Pradhan Newbie

      Hi All !!!


             I have one question, can we create our custom renderer for seam components like in JSF????


      If anyone knows then please help me.


      Thanks in advance.


      Thanks
      Minatee

        • 1. Re: Custom Renderers in Seam
          Daniel Hinojosa Master

          YES!!!!!!!!!!!!!


          Since Seam uses Facelets...you can read more about creating renderers here. ;)


          https://facelets.dev.java.net/nonav/docs/dev/docbook.html

          • 3. Re: Custom Renderers in Seam
            Minatee Pradhan Newbie

            Hi All !!


                Actually I want to create custom rederer for decorate tag. For that purpose I created my renderer class and I added that custom renderer class in faces-config.xml(inside the renderer tag just like we do for JSF components) .


            But when I am trying to use that one, it is giving me exception like this :


            java.lang.IllegalArgumentException: Component must be of type org.jboss.seam.ui.component.UIDecorate
                    at org.jboss.seam.ui.util.cdk.RendererBase.encodeBegin(RendererBase.java:75)
                    at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:788)
                    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:884)
                    at javax.faces.render.Renderer.encodeChildren(Renderer.java:137)
                    at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
                    at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
                    at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
                    at org.richfaces.renderkit.html.ModalPanelRenderer.doEncodeChildren(ModalPanelRenderer.java:351)
                    at org.richfaces.renderkit.html.ModalPanelRenderer.doEncodeChildren(ModalPanelRenderer.java:346)
                    at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121)
                    at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
                    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
                    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
                    at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
                    at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
                    at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
                    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
                    at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
                    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
                    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
                    at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
                    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                    at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
                    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                    at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
                    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                    at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
                    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                    at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
                    at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
                    at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
                    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                    at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
                    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                    at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
                    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
                    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
                    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
                    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
                    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
                    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                    at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
                    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
                    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
                    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
                    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
                    at java.lang.Thread.run(Thread.java:595)


            If anybody knows where is the problem , then please reply me.


            Thanks
            Minatee