statelesslink is just like link - it produces a callback url. for your
situation you may be able to use externallink and provide it a model
that can dynamically build a bookmarkable url that you need. to build
the url just call urlfor(pageclass, pageparams) on any component.

-igor

On Sat, Apr 4, 2009 at 8:38 PM, Matthew Welch <[email protected]> wrote:
> My mounted pages work perfectly when I use a BookmarkablePageLink to them,
> however I am having difficulty when I try to use setResponsePage() to those
> same pages. Here's a snipped that I pulled from a Quickstart I'm using to
> figure out where I'm going wrong:
>
>        setStatelessHint(true);
>
>        add(new StatelessLink("statelessPage1") {
>            public void onClick() {
>                setResponsePage(StatelessPage1.class);
>            }
>        });
>
>        add(new BookmarkablePageLink("statelessPage1-2",
> StatelessPage1.class));
>
>
> The second link produces a nice clean link URL like "
> http://localhost:8080/statelessapp/stateless1";, however the first produces a
> much less desirable "
> http://localhost:8080/statelessapp/?wicket:bookmarkablePage=:com.mycompany.HomePage&wicket:interface=:0:statelessPage1::ILinkListener:
> :".
>
> In this simplified example I could clearly use a BookmarkablePageLink in
> both situations, however in my real app the logic to determine where a
> particualr link needs to go a is occassional conditional so I end up with
> something like:
>
>        add(new StatelessLink("statelessPage1") {
>            public void onClick() {
>                if(somethingIsTrue){
>                    setResponsePage(StatelessPage1.class);
>                }else{
>                    setResponsePage(StatelessPage2.class);
>                }
>            }
>        });
>
> Can someone put me on the right path to using mounted URLs with
> setResponsePage()?
>
> Matt
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to