i dont seem to understand the entire usecase here, if you are running code inside a listener then you can get page via getpage()...
-igor On Mon, Mar 7, 2011 at 12:33 AM, Robin Shine <[email protected]> wrote: > Hi Igor, > Thanks for the response. "onConfigure" gets called only when the page has to > be rendered. Previously "onPageAttached" can serve as a hook point when page > is loaded from page store even if it is not rendered, for example, when > invoking listener interface on components contained in the page. Although I > can override PagePersistentManager to call the hook by myself, but keeping > this in Wicket 1.5 would be very convenient for some use cases, for example > to get current page instance in component constructor without passing page > instance as a constructor param. > Robin > --- On Mon, 3/7/11, Igor Vaynberg <[email protected]> wrote: > > From: Igor Vaynberg <[email protected]> > Subject: Re: Page.onPageAttached() never gets called in 1.5? > To: [email protected] > Cc: "Robin Shine" <[email protected]> > Date: Monday, March 7, 2011, 1:27 PM > > i think this method should be removed from Page, for code that needs > access to a page you can use onInitialize() for one-time code and > onConfigure() for every request. > > -igor > > On Sun, Mar 6, 2011 at 7:33 PM, Robin Shine <[email protected]> wrote: >> Hi All, >> We rely on this method to store the page instance being processed into a >> thread local so that we can easily get current page even from component >> constructors. In 1.4 this method is invoked after page is retrieved from >> session store for example when click an ajax link on the page. However in >> 1.5 it never gets called. Is this expected behavior or should I go ahead to >> create a bug? >> ThanksRobin > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
