2 Replies Latest reply on Jun 5, 2007 10:06 AM by Matthias Graehn

    Include dynamic generated jsf page

    Matthias Graehn Newbie

      Hi

      is it possible to include a dynamic generated jsf page that comes from an
      servlet?

      like:

      <a4j:include viewId="/content/servlet-output/"/>

      I want to reach that a dynamic generated jsf-Page with jsf and richfaces
      components will be included and rendered.

      It it will not work this way, how could I do this? Tried to bind the jsf page
      content to a bean but then it is not rendered an I see jsf and richfaces tags
      in it.

      Matt

        • 1. Re: Include dynamic generated jsf page
          Ilya Shaikovsky Master

           

          <a4j:include viewId="#{bean.property}"/>
          

          works as expected for me.

          • 2. Re: Include dynamic generated jsf page
            Matthias Graehn Newbie

            ok let me clear up some things.

            this ist my place where I include the page:

            <ui:define name="content">
            <a4j:outputPanel layout="none" id="dynamicContent" ajaxRendered="true">
             <a4j:include viewId="content.xhtml"/>
            </a4j:outputPanel>
            <ui:include src="/lms/incl/dialogs.xhtml"/>
            </ui:define>
            


            and this the content.xhtml:
            <ui:composition>
             <h:outputText value="#{contentBean.content}"/>
            </ui:composition>


            contentBean:
            package com.fineo.elso.presentation.jsf.common;
            
            public class ContentHandler {
            
             private String content="<rich:panel><f:facet name=\"header\">Write your own custom
            rich components with built-in AJAX support</f:facet>text....</rich:panel>";
            
             public String getContent() {
             return content;
             }
            
             public void setContent(String content) {
             this.content = content;
             }
            }
            


            if I include this I get
            <rich:panel><f:facet name="header">Write your own custom rich components
            with built-in AJAX support</f:facet>text....</rich:panel>


            and not a Panel as expected. My goal is to create dynamic jsf pages that comes from a parser that should be rendered to whatever the result might be a div tag in case of the panel, table in case of h:panelGrid etc.

            Greets
            Matt