1 Reply Latest reply on Nov 2, 2011 12:05 PM by mpgong

    autoselect first row on extendeddatatable

    ajanz

      i use richfaces 3.3.3 final

       

      i try to autoselect the first row in an extendeddatatable.

       

      it works fine the first time.

       

      but when  i for example click after searchn on the ninth row and then search again , the first an ninth row a selected. i tried a lot of things but can't get rid of it. please help

       

      source is as attachment.

       

       

        • 1. Re: autoselect first row on extendeddatatable
          mpgong

          I'm looking to do the same thing in RF4.

           

          Does anyone know how this can be done?  I want to set the first row to be the active/selected row when i make a selection from a list.

           

          I tried adding the componentControl to trigger the javascript method calls to selectRow and setActiveRow like so

           

                                   <rich:componentControl event="selectitem" target="task_data_table"

                                          operation="selectRow">

                                          <f:param value="#{taskBean.currentIndex}"/>

                                      </rich:componentControl>

                                      <rich:componentControl event="selectitem" target="task_data_table"

                                          operation="setActiveRow">

                                          <f:param value="#{taskBean.currentIndex}"/>

                                      </rich:componentControl>

           

          but it didn't trigger the table.  I'm wondering if it is because i don't have data in the table yet.