You have any more specifics or an example? Is there a metadata class? -----Original Message----- From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] Sent: Tuesday, July 24, 2012 1:34 PM To: users@wicket.apache.org Subject: Re: Really slow code
cache it in request cycle's metadata -igor On Tue, Jul 24, 2012 at 8:18 PM, Brown, Berlin [GCG-PFS] <berlin.br...@primerica.com> wrote: > With code like this, I have a model and within the 'load' method, I am > making a slower call that I don't want to call to get the data again. > > > > I may need the result 'bean' for another part of the UI on that > particular page and I don't want to make that call again. How can I > do this? > > > > 1. OnBeforeRender, get a reference to the component and return the > defaultmodelobject? > > 2. Use a field reference in my parent component to the result set? > > > > final LoadableDetachableModel<Bean> modelReqList = new > LoadableDetachableModel<Bean>() { > > public Bean load() { > > return > runReallySlowCodeOnlyWantToCallOnce(); > > } > > }; > > > > ----- > > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org