t5: when updating zone, non persistent fields outside of zone are null, is this expected?

2009-10-14 Thread Britske

Perhaps a pretty ignorant question, but: 

I have a searchresults-page with a zone-component which is updated through
an ajax call. 
Another component lives within the zone-component and it's
setuprender-method is called. 

In this method I need to access the 'searchresults-object' which is stored
as a Map in the surrounding page. 
this map is NOT annotated with @Persist or anything

Somehow I figured  that since the page itself isn't updated, the
'searchresults-object' would still be available in the page, but instead the
value is null. 
Did I completely misunderstood this, or might something else be the problem? 

If I misunderstood, what would be the best way to have a zone that has
access to a results-set such as my  'searchresults-object' for which
calculating the results again is out of the question (from a performance
standpoint) 

I guess making it @Persist(flash)  would help, but how does the impact
performance, it destroys the option of tapestry reusing the page right? 

Thanks, 
Geert-Jan 
-- 
View this message in context: 
http://www.nabble.com/t5%3A-when-updating-zone%2C-non-persistent-fields-outside-of-zone-are-null%2C-is-this-expected--tp25895923p25895923.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: t5: when updating zone, non persistent fields outside of zone are null, is this expected?

2009-10-14 Thread Ulrich Stärk
Persisting some property doesn't prevent Tapestry from reusing a page. If Tapestry obtains a page 
from the page pool and encounters a persisted property, it will set the value from whatever source 
is specified as the persistence mechanism (flash and session come from the session, client from the 
client). Flash is special: the first time the value is read from the session, it is deleted.


See also http://tapestry.apache.org/tapestry5.1/guide/persist.html

You might also want to cache your results somewhere in your business logic 
instead of in your view.

HTH,

Uli

Am 14.10.2009 19:50 schrieb Britske:
Perhaps a pretty ignorant question, but: 


I have a searchresults-page with a zone-component which is updated through
an ajax call. 
Another component lives within the zone-component and it's
setuprender-method is called. 


In this method I need to access the 'searchresults-object' which is stored
as a Map in the surrounding page. 
this map is NOT annotated with @Persist or anything


Somehow I figured  that since the page itself isn't updated, the
'searchresults-object' would still be available in the page, but instead the
value is null. 
Did I completely misunderstood this, or might something else be the problem? 


If I misunderstood, what would be the best way to have a zone that has
access to a results-set such as my  'searchresults-object' for which
calculating the results again is out of the question (from a performance
standpoint) 


I guess making it @Persist(flash)  would help, but how does the impact
performance, it destroys the option of tapestry reusing the page right? 

Thanks, 
Geert-Jan 


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org