1 Reply Latest reply on Apr 18, 2007 12:53 PM by t.h.alves

    Deleting row in dataTable

    flow1986

      Hi!

      I want to delete some rows of a dataTable. I have something like this:

      <a4j:form>
       <a4j:outputPanel id="panel03" ajaxRendered="true">
       <rich:dataTable id="dt1" value="#{RichBean.data}" rows="4" var="dto">
       <h:column>
       <f:facet name="header">
       <rich:spacer />
       </f:facet>
       <h:selectBooleanCheckbox id="magicBox" value="#{dto.checked}" />
       </h:column>
      
       </rich:dataTable>
       <rich:datascroller id="datascr" for="dt1" maxPages="5" reRender="panel03"/>
       </a4j:outputPanel>
       <a4j:commandButton value="Delete Tagged" action="#{RichBean.deleteTaggedRecords}" reRender="panel03" />
       </a4j:form>
      


      Let's assume i have 7 rows. Now i go to the second page.
      Rows 5,6 and 7 are displayed.

      If i delete them then the table is empty and the dataScroller is empty. How can i avoid this? Isn't there sth. like "jump to the previous page automatically" implemented?

      Thanks!