4 Replies Latest reply on Apr 8, 2009 7:55 AM by jordi hernandez

    Problem with h:outputText within rich:panel

    jordi hernandez Newbie

      Hi everyone. Iam a beginner with JSF, Seam and richfaces, so please forgive me if I'm asking something totally unrelated with richfaces.
      That said, I am using JBoss 4.2.3, seam 2.0.2 and RichFaces 3.3.0, and I have the following issue when using a rich panel:
      I am trying to display a different header for the panel depending on wether a property of an object is empty. My code is as follows:


       <rich:panel>
       <f:facet name="header" >
       <h:outputText value="NOT EMTPY" rendered="#{not empty bean.someProperty}" />
      
       <h:outputText value="EMTPY" rendered="#{empty bean.someProperty}" />
       </f:facet>
      ...
      </rich:panel>
      


      Well, it seems only the last tag is processed at all. If the someProperty field is empty, I can see the header 'EMPTY' being displayed, but if it is not empty I get nothing at all.
      Now, if I invert the tag order in my xhtml file (I'm using facelets, BTW), then it is the opposite: if the property is not empty, I get a header with the text 'NOT EMPTY', and if the property is empty I get nothing.
      If I put the tags outside the rich panel, then it all works as expected and there is always one of the two messages in the page.

      Is there something wrong with my code? Any ideas? Thanks in advance!