JSF(RichFaces)- ui:include doesn't work inside rich:tab

2.5k views Asked by At

I use rich:tabPanel component of RichFaces lib.

<rich:tabPanel>
    <rich:tab label="Tab1">
            <ui:include src="res.xhtml" />
    </rich:tab>
</rich:tabPanel>

ui:include doesn't work here.

Does anybody faced similar issue?

Thanks.

2

There are 2 answers

0
Max Katz On BEST ANSWER

It should work. This worked for me:

<rich:tabPanel>
   <rich:tab label="Tab">
    <ui:include src="footer.xhtml" />
   </rich:tab>
</rich:tabPanel>

where footer.xhtml:

<h:panelGrid xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      columns="2">
  <h:outputText value="#{a4j.projectName}" style="font-style: italic; font-size: x-small;"/>
  <h:outputText value="#{a4j.version}" style="font-style: italic; font-size: x-small;"/>
</h:panelGrid>
0
Jorel On

Me too as following, even in dynamic include:

<rich:tab id="#{tab.id}" name="#{tab.id}" onenter="enterTab('#{tab.id}');">
   <f:subview id="#{tab.id}-subView" rendered="#{tab.id eq desktopTabController.activeTab}">
      <ui:include src="#{tab.xhtmlFile}" />
   </f:subview>
</rich:tab>

It would be useful, if you post the error returned by the IDE.