0 Replies Latest reply on Apr 6, 2010 1:26 PM by Vlado Mandic

    How to render template without displaying it?

    Vlado Mandic Newbie

      I tried to use org.jboss.seam.faces.Renderer.render(/path/to/template.xhtml), but it does not work in all cases, only simple ones with plain HTML (note that I can display template with browser, so there is no error within template).

      So, is there any restriction for Renderer.render() method, in terms of (supported/allowed) template tags? API doc for Renderer class is not descriptive to much.
      Note, that I want to avoid multiple templates (one for HTML, one for email, one for PDF, ...)

      Workaround that I have found is based on servlet filters (which I would like to avoid also)

      Used Seam version 2.2.0, facelets version 1.1.15, richfaces version 3.3.2.


           at com.sun.facelets.FaceletViewHandler.writeState(FaceletViewHandler.java:778)
           at org.ajax4jsf.application.ViewHandlerWrapper.writeState(ViewHandlerWrapper.java:114)
           at org.ajax4jsf.application.AjaxViewHandler.writeState(AjaxViewHandler.java:128)
           at com.sun.faces.renderkit.html_basic.FormRenderer.encodeEnd(FormRenderer.java:193)
           at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:836)
           at org.jboss.seam.ui.util.JSF.renderChild(JSF.java:181)
           at org.jboss.seam.ui.util.JSF.renderChildren(JSF.java:163)
           at org.jboss.seam.ui.facelet.RendererRequest.renderFacelet(RendererRequest.java:136)
           at org.jboss.seam.ui.facelet.RendererRequest.run(RendererRequest.java:103)
           at org.jboss.seam.ui.facelet.FaceletsRenderer.render(FaceletsRenderer.java:43)

      Thanks for any help!