Tapestry 5
  1. Tapestry 5
  2. TAP5-34

When using a Grid inside a Form, sorting the Grid may cause updates (when the form is submitted) to be applied to the wrong objects

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.15
    • Fix Version/s: 5.0.16
    • Component/s: None
    • Labels:
      None

      Description

      I could be doing something wrong, but it seems as though saving a Grid of objects which is included in a Form after sorting the Grid to a non-default sort order results in the rows getting saved under an incorrect ID.

      This should be reproducible in any form which includes an editable Grid, but here are the basic steps to reproduce what I'm seeing:
      1. Create an Item class which includes an ID column and a Name column (I have mine set up as a Hibernate object)
      2. Create a Page with a Grid of Items inside a Form including a Save button which causes the Page to persist the Items
      3. Create a couple Items (ID, name):
      (1, 'item one')
      (2, 'item two')
      4. Bring up the Page, Sort by ID (or Name) so they look like this:
      (2, 'item two')
      (1, 'item one')
      5. Click Save and if I'm not mistaken you will see:
      (2, 'item one') <-- Note that Item 2 is now associated with the name of Item 1...
      (1, 'item two')

      Please let me know if there is any difficulty in reproducing this issue and I will try to put together a minimal code example.

        Issue Links

          Activity

          Skow created issue -
          Howard M. Lewis Ship made changes -
          Field Original Value New Value
          Affects Version/s 5.0.13 [ 12313205 ]
          Key TAPESTRY-2518 TAP5-34
          Project Tapestry [ 10573 ] Tapestry 5 [ 12310833 ]
          Component/s tapestry-core [ 12311285 ]
          Howard M. Lewis Ship made changes -
          Affects Version/s 5.0.15 [ 12313429 ]
          Howard M. Lewis Ship made changes -
          Assignee Howard M. Lewis Ship [ hlship ]
          Howard M. Lewis Ship made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Howard M. Lewis Ship made changes -
          Summary Saving a form with a Grid after sorting saves data to incorrect rows. When using a Grid inside a Form, sorting the Grid may cause updates (when the form is submitted) to be applied to the wrong objects
          Howard M. Lewis Ship made changes -
          Status In Progress [ 3 ] Closed [ 6 ]
          Fix Version/s 5.0.16 [ 12313427 ]
          Resolution Fixed [ 1 ]
          Skow made changes -
          Link This issue relates to TAP5-1009 [ TAP5-1009 ]

            People

            • Assignee:
              Howard M. Lewis Ship
              Reporter:
              Skow
            • Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development