1 Reply Latest reply on Sep 6, 2012 7:49 PM by healeyb

    ExtendedDataTable - how to deselect a selected row

    acormond

      How do I deselect a selected row in an extendedDataTable?  I have tried using the JavaScript API, e.g. #{rich:component('myTable')}.deselectRow(), in a variety of ways without success.  Here's the header to my table:

       

       

      <rich:extendedDataTable id="bookingListTable" value="#{bookingListBB.bookings}" align="center" var="row"

        selectionMode="single" selection="#{bookingListBB.selection}"  onrowdblclick="editItem();" .

        <a4j:ajax event="selectionchange" execute="@this"

          render="addButton viewButton editButton deleteButton"

          listener="#{bookingListBB.selectionListener}" />

       

       

      Any suggestions would be much appreciated.  Thanks  Alex Ormond

        • 1. Re: ExtendedDataTable - how to deselect a selected row
          healeyb

          Set bookingListBB.selection to null and rerender the table, which suggests a commandButton or Link somewhere.

          There is also a deselectRow function in the javascript API but how useful that is in isolation (i.e. without any server

          side action) I'm not so sure - it would just be cosmetic.

          .

           

          Regards,

          Brendan.

           

           

           


          Freelance Java Enterprise Developer


          JSF Richfaces Ajax Java 6/7 (scjp) EE 6 HTML CSS JavaScript jQuery MySQL JPA Hibernate Eclipselink

          Spring Oracle SQL JPQL Sybase EJB CDI Glassfish Apache JAX-RS Primefaces UNIX Paypal and more..