2 Replies Latest reply on Jun 19, 2007 5:46 PM by Andy Gibson

    Strange symptom with rich:dataTable used with @DataModelSele

    Tony Mai Apprentice

      Hello all,

      I've been using rich:dataTable together with Seam's @DataModelSelection for several pages in my app without any problem. However, one of the pages I have displayed weird symptom where regardless of which row I clicked on, the @DataModelSelection would always default to the last row in my table.

      Any ideas on how I would go about debugging this error? I am using RichFaces 3.0.1GA and Seam 1.2.1GA under JBoss 4.0.5GA.

      Thanks
      -tony

        • 1. Re: Strange symptom with rich:dataTable used with @DataModel
          Pete Muir Master

          You'll need to use your debugger to look in the javax.faces.model.DataModel.getWrappedData() method and see whats going on.

          • 2. Re: Strange symptom with rich:dataTable used with @DataModel
            Andy Gibson Novice

            What kind of link is it you are clicking on?

            I had a weird error where I was getting the same value in my data selection, and it seemed to be because I was returning a page flow action in the command link

            <h:commandLink action="editMyObject"/>
            


            It appeared that when I did this, the data model selection was not updated, and when I got to my new page, the same object was selected no matter what link I selected :

            
            <h:commandLink action="#{myEdit.editMyObject}"/>
            
            which is defined as :
            
            public String editMyObject() {
             return "editMyObject";
            }
            


            works fine and the right object was selected when I got to the next page.

            Might be something worth looking at and trying if it is applicable. I was also using the rich data table, and the same Richfaces and seam versions as you.