2 Replies Latest reply on Jun 13, 2009 8:56 PM by Steve Whatmore

    Accessing a row in an extended data table

    Erdem Osman Newbie

      Hi.
      I have an extended data table. And at the end of each row I put a submit button so that the user will be able to delete or update that selected row. But i could not achieve this. I tried to use jsf's "f:attribute" feature to pass that row's index as parameter, but I couldnt since I get "duplicate id" exception. Is there any way to pass index of that specific - user selected row as parameter to a managed bean or any other clear way to access and process selected row?
      Thanks...

        • 1. Re: Accessing a row in an extended data table
          Steve Whatmore Newbie

          We have done exactly the same thing

          <a4j:commandButton styleClass="small-delete-button" onclick="javascript:Richfaces.showModalPanel('deleteMP')" immediate="true" rendered="#{rowItem.canBeDeleted}">
           <a4j:actionparam name="rowId" value="#{rowItem.id}" assignTo="#{rowAction.currentRowId}"/>
          </a4j:commandButton>
          


          Some details changed but you should get the idea here.

          Whatty

          • 2. Re: Accessing a row in an extended data table
            Steve Whatmore Newbie

            Oh, forgot to mentioned, you need to be very careful with this depending on the size of your table.

            The different browsers (IE, FF) rendering engine's performance varies greatly, so much in fact that we had to switch from the SDT to EDT when we were using image buttons because the rendering was so slow, and in fact we switched to a URL link instead of a button in certain tables where the number of rows is large because performance suffered so greatly.

            Enjoy and have fun!

            Whatty