0 Replies Latest reply on Oct 18, 2007 8:04 AM by Gerard Moubarak

    disabled item when enabled on rerendering are not binded

    Gerard Moubarak Newbie

      Hi guys
      i have a case where i have an h:datatable which has in its column a text area with 3 buttons edit, save and cancel.

      Each button is binded to a corresponding method for example edit is binded to textBean.edit and the same for the rest.

      The edit is enabled by default and the rest are disabled. once i press the edit button i render the datatable; the edit should become disabled and the rest enabled.
      However, I noticed that the disabled items (or the ones having the rendered property false) are not binded, and when i rerender the table , they become enabled in the next call, they are not binded to their specified methods.

      <h:form id="nextForm">
      <h:dataTable id="itemTable" var="item" value="#{itemBean.itemList}" binding="#{itemBean.dataTable}" >
      <h:inputTextarea id="itemTextArea" binding="#{itemBean.itemTextArea}" disabled="#{item!= itemBean.editedItem}" value="#{item.data}" <h:panelGrid>
      <a4j:commandButton id="edit" value="Edit" immediate="true" actionListener="#{itemBean.edit}" disabled="#{item== itemBean.editedItem}" reRender="itemTable"/>
      <a4j:commandButton id="save" value="Save" immediate="true" actionListener="#{itemBean.save}" disabled="#{item!= itemBean.editedItem}" reRender="itemTable"/>
      <a4j:commandButton id="cancel" value="Cancel" immediate="true" actionListener="#{itemBean.cancel}" disabled="#{item!= itemBean.editedItem}" reRender="itemTable"/>