2 Replies Latest reply on Aug 6, 2010 7:07 AM by Ilya Shaikovsky

    Unhighlight a Row in a rich:ScrollableDataTable

    Doug Costa Newbie

      Hello,

      In my application I need a user to be able to select a row in a table.  When they are done working with the data from that row they click a cancel/reset button to reset some other page elements.  What I need to do is to also have the reset button unhighlight or unselect the highlighted/selected row in the datatable.  I have been unable to figure out what to do in my backing bean to get this working.

       

      From my JSP page:

       

      {code}

      ...

      <rich:scrollableDataTable id="adjusterScheduleScrollableDataTableId" height="200px"

                width="807px" rows="10" sortMode="single" var="item"

                value="#{controller.searchResults}" selectionMode="single"

                binding="#{controller.table}" selection="#{controller.selection}">

           <a:support event="onRowClick" action="#{controller.enableTools}" reRender="tools"/>
                ...

                multiple columns

                ...

      </r:scrollableDataTable>

      ...

      <h:panelGroup id="tools">

      ...

      <h:commandButton id="reset" action="#{controller.reset}" value="Reset" />

      </h:panelGroup>

      ...

      {code}


      From my backing bean:

       

      {code}
      private UIScrollableDataTable table;

      private Selection selection;

      ...

      public String reset(){

           //WHAT GOES HERE TO UNSELECT ROW??

      }

      ...

      {code}