2 Replies Latest reply on Aug 24, 2011 1:27 AM by andrewdambrosio

    Row ID in datatable

    andrewdambrosio

      I am using Richfaces 3.3.1 and want to know how I can add a row id whne using a datatable. The <TR> elements are rendered without the row ID and I need the row ID so I can use this drag and drop jQuery plugin.

      http://www.isocra.com/2008/02/table-drag-and-drop-jquery-plugin/

        • 1. Re: Row ID in datatable
          mp911de

          Hi Andrew,

          i suppose that this is not possible. It wouldn't also be a good idea to sort a table outside the JSF context, because JSF don't knows anything about resorting. The tables provide also a feature, when you have some links or buttons within the table you can get the clicked row data (the "var" -Object behind the row)  via JSF (getRowData on the Table-Component). When you do a custom sorting, you will get something different from that method.

           

          Best regards,

          Mark

          • 2. Re: Row ID in datatable
            andrewdambrosio

            Thanks. I managed to assign an ID to the rows using Javascript which allowed this plugin to work properly

            http://www.isocra.com/2008/02/table-drag-and-drop-jquery-plugin/

            If anyone else has used this plugin with JSF, let me know. I have no idea how to access the updated list once you move rows around.