[ 
http://issues.apache.org/jira/browse/TAPESTRY-602?page=comments#action_12330853 
] 

Howard M. Lewis Ship commented on TAPESTRY-602:
-----------------------------------------------

You are allowed to set a default value from finishLoad().  This default value 
is stored (in a secondary instance variable) and used to reset the property 
value when the page is detached.

This isn't quite the same as the initial-value you can specifify in the XML 
(that's an OGNL expression re-evaluated when the page is detached), but I feel 
it is more "correct".  I had never intended that these initializers be very 
complicated or drag in state from outside the page itself.

Just looked at the code; I was thinking that an alternative is to implement 
PageAttachListener; however, if you make a change to a persistent property from 
pageAttached() that value will be stored into the HttpSession.  This is 
sometihng that can be changed, I think but it's a crap-shoot about what's the 
right behavior.

> Add annotation to define default value of property
> --------------------------------------------------
>
>          Key: TAPESTRY-602
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-602
>      Project: Tapestry
>         Type: Wish
>     Reporter: Ron Piterman
>     Assignee: Howard M. Lewis Ship

>
> If one uses annotations, there is currently no way to define a default value 
> for a property.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to