5 Replies Latest reply on Feb 13, 2012 6:20 AM by Logan M

    Why does my a4j:commandButton not work when not rendered on pageload?

    Bernhard Hurzeler Novice

      My a4j:commandButton does not work if it has not been rendered when the page was loaded.


      Try the following:



              <h:selectBooleanCheckbox value="#{showpnl}">

                  <a4j:support event="onclick" reRender="pnl" />



              <a4j:outputPanel id="pnl">

                  <a4j:outputPanel rendered="#{showpnl}">

                      <h:inputText value="#{text}" />

                      <a4j:commandButton value="Go" reRender="out" />




              <h:outputText id="out" value="Text: #{text}" />



      It works if you set: <a4j:outputPanel rendered="true"> on line 7 !!! Why?