2 Replies Latest reply on Aug 12, 2008 1:10 AM by nguyendu0102

    rendered not work correctly...

    nguyendu0102

      Hi, everybody.

      I have a research about richfaces, and my problem like that:

      My app code:
      <a4j:form>
      <a4j:commandLink id="b" action="#{test.action}" reRender="b,p,l"
      value="Action" immediate="true" ajaxSingle="true"></a4j:commandLink>
      <h:outputText value="#{test.uploaded}" id="l"></h:outputText>
      <rich:panel id="p" rendered="#{test.uploaded}">
      <h:outputText value="#{test.uploaded}"></h:outputText>
      </rich:panel>
      </a4j:form>

      When i click commandLink i would like panel with id="p", will hide or show. but nothing to do.

      Can you tell me how to fix this problem. thanks.

        • 1. Re: rendered not work correctly...
          ilya_shaikovsky

          you should not reRender conditionally rendered elements. wrap this panel with some parent panelGroup or outputPanel and renreder this paretn instead. (B.t.w. all such FAQ described in demo and our docs.)

          • 2. Re: rendered not work correctly...
            nguyendu0102

            Tks so much!

            i solved my problem. The code like this:
            <a4j:form>
            <a4j:commandLink id="b" action="#{test.action}" reRender="b,p,l"
            value="Action" immediate="true" ajaxSingle="true"></a4j:commandLink>
            <h:outputText value="#{test.uploaded}" id="l"></h:outputText>
            <h:panelGroup id="p">
            <rich:panel rendered="#{test.uploaded}">
            <h:outputText value="#{test.uploaded}"></h:outputText>
            </rich:panel>
            </h:panelGroup>
            </a4j:form>