11 Replies Latest reply on Apr 8, 2010 10:31 AM by Joel P

    setPropertyActionListener not being invoked after 2nd page ...

    Joel P Expert



      I've tried this with richfaces 3.3.2 and 3.3.3 version running on jboss4.2.2GA -- I have a dataTable with a commandLink attached to one of the columns.  When the user clicks on one of the links, I want to get the row object.  So I used the setPropertyActionListener to capture the selected object.  I then use this selected object to display data in a modal panel.  When I render the page, it works fine for the first page in the dataTable.  When I click on the dataScroller to move to the next page, when I click on one of the links from the row, it doesn't give me the current selected row/object.  Since my backing bean is stored in the session, it is displaying what I selected last.  If I go back to the first page, it works fine.  I put a trace in the set method in my backing bean and noticed that it is only called on the first page, but any subsequent pages, it doesn't get called.  Here is how my .xhtml file looks like:


           <rich:dataTable id="data"
              <h:outputText value="#{car.id}" />
              <h:outputText value="#{car.type}" />
              <h:outputText value="#{car.color}" />
               <a4j:commandLink reRender="data" value="Hello">
                  <f:setPropertyActionListener value="#{car}" target="#{scrollerList.selectedCar}"/>
            <f:facet name="footer">
               <rich:datascroller id="paginator"


      My backing bean has these methods:


      public SimpleCar getSelectedCar() {
        return mSelectedCar;

      public void setSelectedCar(SimpleCar pSelectedCar) {
        System.out.println("Selected car is : " + pSelectedCar.getId());
        this.mSelectedCar = pSelectedCar;


      I saw this thread http://community.jboss.org/message/50601#50601 but the solution to have a member instead of a method to set the selected row doesn't work.  I get an error when it tries to call the setter method in my bean.


      Any suggest is greatly appreciated.