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




Thanks.
---
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

-------------------------------------------------------------------------
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

Reply via email to