sure, you can subclass webrequestcodingstrategy and override methods on it that encode/decode these urls. its no trivial task so you must get encoding/decoding to work exactly right or lots of things might break.

-Igor


On 8/10/06, Spencer Crissman <[EMAIL PROTECTED]> wrote:
<quote>

here you tell wicket to redirect to an /instance/ of a page, so wicket is not in control. you give it a page object with some internal state and tell it to go to it. a bookmarkable url cannot be used here because the page has arbitrary state that cannot be encoded into the url. so wicket puts the page instance into a pagemap and uses a url that you see above to reference it. in the url 2 stands for the pageid of the page in the pagemap.
 </quote>

Alright, that makes perfect sense.  Next question then, is there a way to change the URL that is displayed in the last case, since the mounting of the target page seems to have no effect. 

In other words, is there a method I could call, for example, to cause that URL to mount to "/pagemap/id/2" rather than that default string?

Regards,

Spencer


On 8/10/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
On 8/10/06, spencer.c <[EMAIL PROTECTED] > wrote:

I have an app that I've created for testing purposes.  There are two pages,
one is an index, the other a form.  If I fill out the form on the second
page, and redirect to the home page in the form submit method using the
following code:
setResponsePage(Index.class);
or
setResponsePage(Index.class, new PageParameters());
...then when I get to the home page, I have the following URL:
http://localhost:8081/test/app/home


this tells wicket to create a page for you given a page class and a map of parameters. in this case since wicket is in total control it can use a bookmarkable url like the one you see.


However, if I use the following code:
setResponsePage(new Index(new PageParameters()));
...then I get the following URL:
http://localhost:8081/test/app?wicket:interface=:2 ::


here you tell wicket to redirect to an /instance/ of a page, so wicket is not in control. you give it a page object with some internal state and tell it to go to it. a bookmarkable url cannot be used here because the page has arbitrary state that cannot be encoded into the url. so wicket puts the page instance into a pagemap and uses a url that you see above to reference it. in the url 2 stands for the pageid of the page in the pagemap.
 
-Igor


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



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