1 Reply Latest reply on Mar 18, 2008 1:33 PM by achildress

    dataTable won't reRender when row deleted using commandLink

    achildress

      I have a rich:dataTable that contains a column with an a4j:commendLink that when clicked, will delete the row. The commandLink also specifies the dataTable id as reRender. When I click the commandLink, the row is deleted, but the dataTable is not reRendered. I have seen numerous posts regarding this, but no solution. Anybody have an answer?

      I'm using:
      facelets 1.1.12
      richfaces 3.1.4GA
      JSF 1.2 Sun implementation

      Here is the dataTable code:

       <rich:dataTable id="offendernamelist" ajaxRendered="true" cellpadding="0" cellspacing="0" width="90%" border="0" var="NameBean" value="#{DOPIntakeOffenderBean.offenderNames}">
       <f:facet name="header">
       <rich:columnGroup>
       <rich:column width="18px">
       <h:outputText value="" />
       </rich:column>
       <rich:column width="18px">
       <h:outputText value="" />
       </rich:column>
       <rich:column>
       <h:outputText value="Type" />
       </rich:column>
       <rich:column>
       <h:outputText value="First" />
       </rich:column>
       <rich:column>
       <h:outputText value="Middle" />
       </rich:column>
       <rich:column>
       <h:outputText value="Last" />
       </rich:column>
       <rich:column>
       <h:outputText value="Suffix" />
       </rich:column>
       </rich:columnGroup>
       </f:facet>
       <rich:column rendered="#{NameBean.getIsUpdateable$[DOPIntakeOffenderBean.scheduledArrivalDate]}">
       <a4j:commandLink title="Edit Name" actionListener="#{DOPIntakeAdminTechInterviewBean.selectName}" limitToList="true" reRender="editname" oncomplete="javascript:Richfaces.showModalPanel('editoffendernamemp',{width:450, top:200})">
       <h:graphicImage value="/images/edit.gif"></h:graphicImage>
       </a4j:commandLink>
       </rich:column>
       <rich:column rendered="#{!NameBean.getIsUpdateable$[DOPIntakeOffenderBean.scheduledArrivalDate]}">
       <h:outputText value=" "/>
       </rich:column>
       <rich:column rendered="#{NameBean.getIsUpdateable$[DOPIntakeOffenderBean.scheduledArrivalDate]}">
       <a4j:commandLink title="Delete Name" actionListener="#{DOPIntakeAdminTechInterviewBean.deleteName}" limitToList="true" reRender="offendernamelist">
       <h:graphicImage value="/images/delete.gif"></h:graphicImage>
       </a4j:commandLink>
       </rich:column>
       <rich:column rendered="#{!NameBean.getIsUpdateable$[DOPIntakeOffenderBean.scheduledArrivalDate]}">
       <h:outputText value=" "/>
       </rich:column>
       <rich:column rendered="#{!NameBean.isNullImplementation}">
       <h:outputText value="#{NameBean.nameTypeDisplay}"/>
       </rich:column>
       <rich:column rendered="#{NameBean.isNullImplementation}">
       <h:outputText value="No Names Exist"/>
       </rich:column>
       <rich:column rendered="#{!NameBean.isNullImplementation}">
       <h:outputText value="#{NameBean.offenderFirstName}"/>
       </rich:column>
       <rich:column rendered="#{NameBean.isNullImplementation}">
       <h:outputText value=" "/>
       </rich:column>
       <rich:column rendered="#{!NameBean.isNullImplementation}">
       <h:outputText value="#{NameBean.offenderMiddleName}"/>
       </rich:column>
       <rich:column rendered="#{NameBean.isNullImplementation}">
       <h:outputText value=" "/>
       </rich:column>
       <rich:column rendered="#{!NameBean.isNullImplementation}">
       <h:outputText value="#{NameBean.offenderLastName}"/>
       </rich:column>
       <rich:column rendered="#{NameBean.isNullImplementation}">
       <h:outputText value=" "/>
       </rich:column>
       <rich:column rendered="#{!NameBean.isNullImplementation}">
       <h:outputText value="#{NameBean.offenderNameSuffix}"/>
       </rich:column>
       <rich:column rendered="#{NameBean.isNullImplementation}">
       <h:outputText value=" "/>
       </rich:column>
       </rich:dataTable>
      


      This just shouldn't be so hard to accomplish. I'm using the commandLink tag instead of the commandButton because the page where this dataTable resides is massive, and I'd like to avoid refreshing the entire page at all costs. I've tried surrounding the dataTable with an a4j:region and pointed the commandLink reRender at it, but no joy again.

      Please HELP!!