2 Replies Latest reply on Apr 4, 2007 7:24 AM by frippe

    rich:panel problems

    frippe

      I am trying to use <rich:panel> with a dynamic header.

      I tried this:

      <rich:panel>
       <f:facet name="header">
       <h:outputText value="Edit Log Event" rendered="#{logItem.id > 0}"/>
       <h:outputText value="New Log Event" rendered="#{logItem.id == 0}"/>
       </f:facet>


      But got no header at all. I also tried serveral other approaches, for instance creating the <f:facet> within a <h:outputText> tag with render condition - but with the same effect. I alos tried to add a render condition to the <f:facet> tag but that won't work off cause.

      I know the render condition works, while I'm uing the same at another location in the same XHTML file.

      Am I missing something here?



        • 1. Re: rich:panel problems
          ilya_shaikovsky

           

          <rich:panel>
           <f:facet name="header">
           <h:panelGroup>
           <h:outputText value="Edit Log Event" rendered="#{logItem.id > 0}"/>
           <h:outputText value="New Log Event" rendered="#{logItem.id == 0}"/>
           </h:panelGroup>
           </f:facet>
          


          Works fine for me. Facet Tag can only have one child UIComponent


          • 2. Re: rich:panel problems
            frippe

            oh, so that is what <h:panelGroup> is used for :-)

            Thank you Ilya