First of all, you need to make sure your page itself is bookmarkable. Any page is bookmarkable when it has either a public default constructor and/ or a public constructor with a PageParameters argument.
The next thing is how you call such a page. If you want to call a page the 'bookmarkable' way (note that you can call any bookmarkable page as if it were a non-bookmarkable page), you should use BookmarkablePageLinks. Or construct the (link to) the url yourself, which generally looks like: http://localhost:8080/wicket-examples/navomatic?bookmarkablePage=wicket.examples.navomatic.Page3 The last - optional step is to 'mount' the url so that instead of the question mark and bookmarkablePage argument, you use a custom defined path. Eelco On 1/20/06, Rosenstrauch, David <[EMAIL PROTECTED]> wrote: > > > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf > Of Igor Vaynberg > Sent: Friday, January 20, 2006 5:18 PM > To: [email protected] > Subject: Re: [Wicket-user] Another noob question > > > use the good old java constructors > > class Page2 extends WebPage { > public Page2(PurchaseOrder order) { > ... > } > } > > onsubmit() { > PurcharOrder o=getPurchaseOrder(); > setResponsePage(new Page2(o)); > } > > this has the benefit of strong typing and simplicity over using the > pageparams object to pass in the values. the pageparams constructor is used > for bookmarkable pages where the parameters come from a url. its not meant > to be used when page transitions are internal to wicket, for that the > cosntructor params are a much better choice. > > at the end its just java. your page is an ordinary object, you can pass the > data in any way you want, its up to you. > > -Igor > [Rosenstrauch, David] > OK. Got that part. > > One last (really!) question, though: > > > Bookmarking was what I was also trying to achieve here. > > Say that page 2 is the "display purchase order" page, and it's bookmarkable > in its own right, as long as you pass in a parameter "orderId=1234"? > > How is it possible to make the results page bookmarkable to be called later? > The URL I see in the browser includes "?path=1", and does not include the > orderId parameter, so it doesn't appear to be bookmarkable. > > Thanks again very much for all the help. > > DR > > > > ============================================================================== > Please access the attached hyperlink for an important electronic > communications disclaimer: > > http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html > ============================================================================== > ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642 _______________________________________________ Wicket-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-user
