2 Replies Latest reply on Dec 8, 2015 1:42 PM by marcferguson

    Bean value not being set when JSF's 'rendered' attribute in play

    marcferguson

      Hi,

       

      I'm not sure why this is happening but whenever I use the 'rendered' attribute on a JSF component any A4J elements inside that component no longer function as expected.

       

      Scenario:

      I want to set a bean property to true in order to display another section.

       

      <h:panelGroup layout="block" rendered="#{someELThatEqualsTrue}">
           <h:selectBooleanCheckbox id="checkbox" value="#{bean.proprety}">
                <a4j:ajax render="hiddenSection"/>
           </h:selectBooleanCheckbox>
           <h:outputLabel for="checkbox" value="Click me"/>
      
           <a4j:outputPanel id="hiddenSection" layout="block">
                <h:panelGroup layout="block" rendered="#{bean.property}">
                ...
                </h:panelGroup>
           </a4j:outputPanel>
      </h:panelGroup>
      

       

      If I remove the "rendered" attribute from the parent component then bean.property gets set to true and hiddenSection reRenders properly. With the parent component's rendered attribute in place I see an XHR post, but bean.property never gets set thus the reRender fails to display the intended section.