Re: How to avoid instantiation of new WOComponents when reloading?
Re: How to avoid instantiation of new WOComponents when reloading?
- Subject: Re: How to avoid instantiation of new WOComponents when reloading?
- From: Andreas Kosmala <email@hidden>
- Date: Thu, 08 Jan 2004 18:07:47 +0100
Hi Alexander,
no, I did not disable the buffer.
I have a multi-frame-page where the left frame is a menu built with
hyperlinks. These have different pageNames that are displayed in the
right frame when these hyperlinks are clicked. Switching the pages works
fine with only one instance per page until I do a reload. From then,
despite the session is the same as before, all called pages are
instantiated again?! Probably the hyperlinks of the menu should better
call a method that creates and caches the pages within the session, what
do you think?!
andreas
Alexander Spohr wrote:
andreas,
did you disable the backbuffer? wo normaly keeps the last 20 or 30 pages
in a per-session cache. so if you don't go back further it should reuse
the cached pages.
if the user reloads a page the last action (that returned this page) is
going to fire again. so if you return a new page in that action you will
get a new page. if you return context().page() it will allways be the
same page. both ways should work for you.
- if you return a new page, you feed it with the needed values (the
reloaded action will be executed in a page from the cache, so that
should have your wanted state values).
- if you return the same page just make sure that you don't execute the
same thing twice (a 'next page' link for example).
does that help?
atze
Am 06.01.2004 um 11:39 schrieb Andreas Kosmala:
Hi All,
WO always creates all WOComponents newly when the User performs a
reload of a WO-app. The session seems not to change (since the
SessionId is in the submitted URL), so why are the components created
newly? Is it possible to avoid that, for I want to store some state in
the single components (for that's more structured than storing
everthing whithin the session) that should not get lost when reloading?
thanks in advance
andreas
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.