Uploaded image for project: 'Tapestry'
  1. Tapestry
  2. TAPESTRY-450

ForBean can't restore a value from it's primary key when only "source" and "keyExpression" are given

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.0
    • 4.1.1
    • Framework
    • None
    • Tapestry 4.0-beta-3

    Description

      There's a bug on FormBean.getValueFromPrimaryKey() method that's preventing it from correctly restoring an object from the source collection if the user didn't supply a converter. The bug is just an unfortunate type, that resulted in a map lookup for the map itself

      Attached goes two patches: forbean-minimal.diff is a "minimum changes" patch – in only fixes the mentioned bug. forbean.diff fixes a few other (minor, stylistic) issues I've found when editing the affected class in IDEA: it fixes the mentioned bug, remove a couple of unused private methods, and inlines a local variable that's imediately returned – feel free to pick which patch to apply.

      Attachments

        1. forbean.diff
          2 kB
          Marcus Brito
        2. forbean-minimal.diff
          0.7 kB
          Marcus Brito

        Activity

          People

            Unassigned Unassigned
            pazu Marcus Brito
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: