2 Replies Latest reply on Oct 1, 2007 9:55 AM by inv3r53 d

    a4j problem

    inv3r53 d Novice

      w.r.t code below:
      i have checkboxes with select all and unselect all button.

      <h:selectManyCheckbox id="id_cb" value="#{myBean.selectedItems}" required="true">
       <f:selectItems value="#{myBean.allItems}" />
      <a4j:support event="onclick" actionListener="#{myBean.onItemSelect}" reRender="unselect,selectall"/>
      <a4j:commandButton id="selectall" value="selectAll" reRender="id_cb" actionListener="#{myBean.selectAll}" immediate="true" />
      <a4j:commandButton id="unselectall" value="unselectAll" reRender="id_cb" actionListener="#{myBean.unselectAll}" immediate="true"/>

      the following use case fails.
      if user de-selects all checkboxes then unselectall shud be disabled , but its not .. instead validation error is thrown.
      how do i bypass that required="true" when user is deselecting all check boxes.