3 Replies Latest reply on Aug 27, 2012 5:20 AM by Brendan Healey

    a4j:param inside selectBooleanCheckbox doesn't work

    Be Mo Newbie



      When I click on a checkbox (h:selectBooleanCheckbox), I make an AJAX-Request.

      The request assigns a hardcoded value to a variable in my ManagedBean via <a4j:param>.

      This hardcoded value should then be rendered via <h:outputText>. But it's not working.


      The XHTML file looks like that:


          <h:selectBooleanCheckbox id="chkSys" value="#{a4jParam.selected}">
              <!-- I would expect that the value 'hello' is assigned to a4jParam.selectedType, but it's not -->
              <!-- The POST-parameter 'selectedType' has the value 'hello', though -->
              <a4j:param name="selectedType" value="hello" assignTo="#{a4jParam.selectedType}"/>
              <a4j:ajax execute="@form" render="txtType" />
          <!-- The value 'hello' should be rendered here, because I've set this value via a4j:param -->
          <!-- The tag is rerendered every time I click on the checkbox -->
          <!-- But it still has the old value. It's not overwritten with 'hello' -->
          <h:outputText id="txtType" value="#{a4jParam.selectedType}"/>


      Am I doing sth wrong or is this a bug?