title: disable a particular button in a datatable, jsf
body: <p>I have a data table with with two columns- Title and Action
  Title is populated from a list in a managed bean and for each title in the list the datatable has a button called Confirm under Action column.
  When the user clicks on the Confirm button, a dialog is displayed with additional information and another button called Submit. </p>
  
  <p>If the user hits the Submit button inside that dialog a variable confirmDate is set in the backing bean, of the confirmDate is not null, I need to disable the particular Confirm button under the Action column in the main data table. Right now if I disable it, all the Confirm button is getting disabled. How do I disable only the selected confirm button. Really appreciate your help on this.</p>
  
  <p>main data table</p>
  
  <pre><code>&lt;h:panelGrid id="notificationList" width="100%"&gt;
  &lt;h:panelGroup &gt;                          
    &lt;p:dataTable var="dt" value="#  
    {myBean.listAll}" id="titles" rowKey="#{dt.id}"&gt;                                 
  
      &lt;f:facet name="header"&gt;
        &lt;h:outputText value = "Title List"/&gt;                                             
      &lt;/f:facet&gt;
  
       &lt;p:column headerText ="Title"&gt;
           &lt;h:outputText value="#{dt.title}"/&gt;
       &lt;/p:column&gt;
  
       &lt;p:column headerText="Action"&gt;
  
          &lt;p:commandButton id="nID"                                                      
           value="Confirm"      
           oncomplete="myDialog.show();" 
           process="@this"
           disabled= "#{not empty dt.confirmDate}
           update="@form"&gt;
  
           &lt;f:setPropertyActionListener value="#{dt}" target="#
             {myBean.selectedTitle}"/&gt;                                       
          &lt;/p:commandButton&gt;
      &lt;/p:column&gt;
   &lt;/p:dataTable&gt;
   &lt;/h:panelGroup&gt;
  &lt;/h:panelGrid&gt;
  </code></pre>