[
https://issues.apache.org/jira/browse/TAPESTRY-2463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12610184#action_12610184
]
Geoff Callender commented on TAPESTRY-2463:
-------------------------------------------
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.
> Document that you should not instantiate an @Persist field in its declaration
> -----------------------------------------------------------------------------
>
> Key: TAPESTRY-2463
> URL: https://issues.apache.org/jira/browse/TAPESTRY-2463
> Project: Tapestry
> Issue Type: Improvement
> Components: Documentation
> Affects Versions: 5.0
> Environment: N/A
> Reporter: Dave Dombrosky
>
> 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.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]