Well, you don't want to store onceInitialized as a persistent property, at least not within the context of how I am using it. It doesn't mean that the page will only be initialized once per user-session. It just means that it will be initialized only once per http request, even if there is both a rewind and a render cycle. So my annotation is @InitialValue("ognl:false") which causes it to be reset every time the page comes out of the cache for use.
--sam On 10/22/06, Huang Gehua <[EMAIL PROTECTED]> wrote:
In the code u write there are two method "isOnceInitialized()" and "setOnceInitialized()" . So i think there should have a property "onceInitialized" for this.For example: @Persist("client") public abstract boolean isOnceInitialized(); public abstract void setOnceInitialized(boolean b); ....... Am i right??? Thank u very much!!! 2006/10/22, Sam Gendler <[EMAIL PROTECTED]>: > > getRequestCycle().isRewinding(). > > Here's what my pageBeginRender method looks like (this method is > guaranteed to execute after both pageAttached and > activateExternalPage): > > public final void pageBeginRender(PageEvent event) { > initPage(event); //execute before render AND rewind > if (!isOnceInitialized()) { > initOnlyOnce(event); // execute only once, whether form > submit or not > setOnceInitialized(true); > } > if (getRequestCycle().isRewinding()) { > initForRewind(event); // execute only for rewind cycle > } else { > initForRender(event); // execute only for render cycle > } > } > > And then my subclasses all overload initPage(), initOnlyOnce(), > initForRewind(), and initForRender() > > --sam > > On 10/21/06, Huang Gehua <[EMAIL PROTECTED]> wrote: > > Im was a T4 user. > > I want to do something in the first time a request to a page.And does > not > > want this "something" to be done in the rewind period when a form is > submit > > or other event was actived. > > Is there a PageEvent to handle this first time of requesting?Or other > way to > > solve this problem? > > Any advice was welcome!!! > > I love tapestry! :) > > Thanks!!!! > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]