3 Replies Latest reply on Jan 4, 2008 8:46 AM by Ilya Shaikovsky

    selectedRow (dataTable or orderingList)

    Mo Pour Newbie

      I have looked at many ways to change the background color of my selected dataTable row.
      I used javascript, but whenever the page refreshes I loose the selected row color.

      I ended up changing the rowClasses attribute on the server side, but I'm having to reRender my table everytime I click on a row, which is not ideal.

      I also looked at mixing JavaScript and rowClasses, but the javascript that would reset previous row colours does not work under IE, it sees .rows attribute is undifiend.

       function changeRowColor(row){
       var table = document.getElementById('searchForm:searchTable');
       for(var n = 0; n < table.rows.length; n++) {
       var _row = table.rows[n];

      I have also used scrollableDataTable, but I was not happy with its performance.

      I wanted to know how you have managed to achive the row selection in the new orderingList component.