Thanks a lot! I'll try what you explained. Let me clarify the last part of my question.
> > If so, how can I avoid creating duplicate instances for the same > > domain object when the user clicks the link for the same instance > > for multiple times? > > > not sure what you mean by duplicate instances of domain objects. I was thinking of a user navigating through nodes back and forth, clicking on the same node for multiple times. Lets say that my application had a file system browser, and the user points to "C:\windows" then points to somewhere else, then points to "C:\windows" again. In this case the domain object "C:\windows" would be visited twice, and If I created a page object everytime I visit a node, there would be two page objects for C:\windows. That seems to me like an issue. To make sure that I don't create multiple page objects like this, I would need some kind of caching here, to make sure only one page object gets created per one domain object. Is this a common situation? or is it avoided somehow? > Date: Sun, 11 Feb 2007 00:34:29 -0800 > From: "Igor Vaynberg" <[EMAIL PROTECTED]> > Subject: Re: [Wicket-user] Page class instanciation in a tree > navigated application > To: wicket-user@lists.sourceforge.net > Message-ID: > <[EMAIL PROTECTED]> > Content-Type: text/plain; charset="iso-8859-1" > > On 2/11/07, Natto Lover <[EMAIL PROTECTED]> wrote: > > > My questions are: > > (1) Can I create URLs without instantiating the page objects? > > > wicket has bookmarkable pages ( a page that has a default constructor or > page(PageParameters) constructor ). you can create a url for this page > without creating an instance by using requestcycle.urlfor(Class pageClass, > PageParameters params) method > > (2) For an application with lots of page objects of the same page class > > but pointing to different domain object instances, how is the Wicket > > way to create URLs for those different instances? > > > you would put this object id into the pageparameters structure before > calling urlfor, then retrieve it again in your page's constructor. this way > of working is similar to other frameworks where you pass data on the url. > > Or should I simply wait until a link is actually clicked, and within > > the onClick handler, instantiate a page object, and call > > setResponsePage(theTargetPage) or something ? > > > usually this would be the way to go, but because you are dealing with frames > and want the page to in another frame you cannot. > > > If so, how can I avoid creating duplicate instances for the same > > domain object when the user clicks the link for the same instance > > for multiple times? > > > not sure what you mean by duplicate instances of domain objects. > > also when working with frames dont forget to set a different pagemap for the > pages you will open in the right frame. search our wiki for frames, and see > a frames example in wicket-examples > > -igor natto is japanese food. I chose it for my alias. -- _______________________________________________ Search for products and services at: http://search.mail.com Powered by Outblaze ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user