2 Replies Latest reply on Jun 7, 2010 12:21 PM by shravanou

    End Conversation OR Nest Conversation

      Please Suggest - We have a scenario where the page list multiple items listed and with a final comment on each row. When I click on the comment I am only getting the items which is clicked first.


        Here is the scenario -

      1) date:06-Jun-01 Item : Carrot     Berry     Food         Comment
                        Price:   2         6          7


      2) date:06-Jun-01 Item : Flower     Produce   Pastry       Comment
                        Price:   2         3          7


      3) date:06-Jun-01 Item : Chocolate  Coffee                 Comment
                        Price:   2         6     


      Expected Result :
      Now here clicking on item:1) opens a pop up and should have the items - Carrot, Berry, Food
               clicking on item:2) opens a pop up and should have the items - Flower, Produce, Pastry
               clicking on item:3) opens a pop up and should have the items - Chocolate, Coffee


      Actual Result:
      Retains the row which is first clicked -
      if clicked on item 1) opens a pop up and should have the items - Carrot, Berry, Food
      then clicking on item 1) gives items - Carrot, Berry, Food instead of items  - Flower, Produce, Pastry


      I hope it is clear. Please let me know.


      Thanks!

        • 1. Re: End Conversation OR Nest Conversation
          hbender
          I had a similar problem. The @DataModelSelection contained always the first entry of the @DataModel list, regardless which item was clicked in the view table.

          The culprit was that I accessed the @DataModel list in the view through a getter of the backing bean. Accessing it directly by the @DataModel name worked.

          seam component ("MySeamComponent"):

               @DataModel
               List<?> myList;
               public List<?> getList() ...


          Wrong:
              <rich:dataTable  value="#{MySeamComponent.list}"
          Correct:
              <rich:dataTable  value="#{myList}"

          I do not know about the magic behind these two constructs, but I struggled several hours to solve this problem.

          Heri

              
          • 2. Re: End Conversation OR Nest Conversation

            That is true - I solved the issue by putting limited number of required

            <ice:dataTable>

            in the .xhtml