You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Alexandr Kundirenko <ak...@gmail.com> on 2005/08/25 10:03:26 UTC

Re[2]: persistent property problem

finishLoad() works fine for me, thank you a lot!

HLS> The property is not persistent until it is changed.

HLS> What Tapestry is doing is creating  a binding from the initial-value
HLS> attribute, "hivemind:spring:studentFilter".

HLS> Inside finishLoad(), and again inside pageDetached(), the binding is
HLS> evaluated and the result stored into the property's instance variable.

HLS> This represents a subtle change in behavior from 3.0.

HLS> In 3.0, the initial-value was used to set the initial value of the
HLS> property when the page is first created.  The property is then read
HLS> and stored as is, and that exact value is used to reset the property
HLS> at the end of the request.

HLS> To duplicate that behavior, you should not use initial-value; instead,
HLS> override the finishLoad() method and initialize your property there.
HLS> Uses this approach yields the same behavior as 3.0 (if you look with
HLS> the debugger, you'll see that there's two different instance variables
HLS> for the property, one stores the default value, the other the active
HLS> value).

HLS> On 8/24/05, Radim Burget <Ra...@seznam.cz> wrote:
>> I am not shure if I undertand you right but....
>> 
>> >Hello All!
>> >Something strange is going on...
>> >
>> >I declare persistent property in page spec:
>> >
>> >  <property name="queryFilter" persist="session"
>> initial-value="hivemind:spring:studentFilter" />
>> >
>> >But after page reload, this persistent property obtains NEW value.
>> >(Page instance is the same)
>> >
>> >But it is session-persistent it shouldn't be re-inited.
>> >Am I wrong?
>> >
>> >I debugged and find out that property value is changed in
>> >AbstractPage.firePageDetached()
>> >
>> >Used:
>> >Tapestry-4.0-beta-4,
>> >-Dorg.apache.tapestry.disable-caching=false
>> >
>> >Thank you, Alex
>> >
>> >
>> >
>> >---------------------------------------------------------------------
>> >To unsubscribe, e-mail:
>> tapestry-user-unsubscribe@jakarta.apache.org
>> >For additional commands, e-mail:
>> tapestry-user-help@jakarta.apache.org
>> >
>> >
>> >
>> >
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail:
>> tapestry-user-help@jakarta.apache.org
>> 
>> 





---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org