Tapestry 5
  1. Tapestry 5
  2. TAP5-1527

BeanEditForm loses object found by onPrepare() during render

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 5.2.5
    • Fix Version/s: 5.3
    • Component/s: tapestry-core
    • Labels:
      None

      Description

      Was fine in 5.1.0.5, discovered when upgrading to 5.2.5.

      Using a BeanEditForm to edit an object: onPrepare() is being called twice during the render phase, and then the object found in onPrepare() disappears!

      http://jumpstart.doublenegative.com.au/jumpstart/examples/input/edit1/1

      Yet, when you replace BeanEditForm with a Form around a BeanEditor, everything works correctly: onPrepare() is called once during the render phase and the object doesn't disappear:

      http://jumpstart.doublenegative.com.au/jumpstart/examples/input/morecontroledit1/1

      You can see the java code is almost identical in the two examples but the result is different.

      For more discussion see http://tapestry.1045711.n5.nabble.com/BeanEditForm-What-s-happening-to-my-object-parameter-tt4257173.html#none .

        Activity

        Hide
        Geoff Callender added a comment -

        I've modified http://jumpstart.doublenegative.com.au/jumpstart/examples/input/edit1/1 to work around this bug - it now gets the object in setupRender if the object is null.

        Show
        Geoff Callender added a comment - I've modified http://jumpstart.doublenegative.com.au/jumpstart/examples/input/edit1/1 to work around this bug - it now gets the object in setupRender if the object is null.
        Hide
        Hudson added a comment -

        Integrated in tapestry-trunk-freestyle #374 (See https://builds.apache.org/job/tapestry-trunk-freestyle/374/)
        TAP5-1527: BeanEditForm's prepare event handler aborts Form's prepare event when re-triggering it.

        drobiazko : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1137756
        Files :

        • /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/BeanEditFormPrepareBubbling.java
        • /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java
        • /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/BeanEditorTests.java
        • /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanEditForm.java
        • /tapestry/tapestry5/trunk/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/BeanEditFormPrepareBubbling.tml
        Show
        Hudson added a comment - Integrated in tapestry-trunk-freestyle #374 (See https://builds.apache.org/job/tapestry-trunk-freestyle/374/ ) TAP5-1527 : BeanEditForm's prepare event handler aborts Form's prepare event when re-triggering it. drobiazko : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1137756 Files : /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/BeanEditFormPrepareBubbling.java /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/BeanEditorTests.java /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanEditForm.java /tapestry/tapestry5/trunk/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/BeanEditFormPrepareBubbling.tml

          People

          • Assignee:
            Igor Drobiazko
            Reporter:
            Geoff Callender
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development