Tapestry 5
  1. Tapestry 5
  2. TAP5-206

Document that you should not instantiate an @Persist field in its declaration

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.15
    • Fix Version/s: 5.0.16
    • Component/s: None
    • Labels:
      None
    • Environment:
      N/A

      Description

      Because of Tapestry's page pooling, persistent objects can behave in strange ways if not handled properly. Issues can arise when setting a value on a persistent property at the same time as declaring it.

      I ran into this issue while doing something similar to this: http://www.nabble.com/Strange-behavior-when-instantiating-properties-directly-in-the-page-p17876779.html

      I propose that a note is added to the User's Guide -> Persistent Data page to warn users of this potential issue.

        Issue Links

          Activity

          Dave Dombrosky created issue -
          Hide
          Geoff Callender added a comment -

          Is there a situation in which it makes sense to initialise a field AND annotate it with @Persist?

          If not, then it would be great if Tapestry detected it and threw an exception. I've been caught out by this too and it's a huge time-waster.

          Show
          Geoff Callender added a comment - Is there a situation in which it makes sense to initialise a field AND annotate it with @Persist? If not, then it would be great if Tapestry detected it and threw an exception. I've been caught out by this too and it's a huge time-waster.
          Howard M. Lewis Ship made changes -
          Field Original Value New Value
          Component/s Documentation [ 11283 ]
          Affects Version/s 5.0 [ 12312018 ]
          Project Tapestry [ 10573 ] Tapestry 5 [ 12310833 ]
          Key TAPESTRY-2463 TAP5-206
          Howard M. Lewis Ship made changes -
          Affects Version/s 5.0.15 [ 12313429 ]
          Geoff Callender made changes -
          Link This issue is duplicated by TAP5-323 [ TAP5-323 ]
          Geoff Callender made changes -
          Link This issue is related to TAP5-321 [ TAP5-321 ]
          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 -
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Closed [ 6 ]
          Fix Version/s 5.0.16 [ 12313427 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development