I think right now the only way is to use MixedParamUrlCodingStrategy

Mount a page this way:

> mount(new MixedParamUrlCodingStrategy("collection", CollectionPage.class, new 
> String[] { "owner" }));

so CollectionPage is mounted at: http://localhost:9090/collection/
now in CollectionPage.java you can call:

> parameters.getString("owner")

to get the first parameters that in case URL is
http://localhost:9090/artivio/collection/ildella returns "ildella".

As long as MixedParamUrlCodingStrategy accept a String[] comma
separated, you can have as many parameters as you want, without having
the name of the parameters in the URL.

Btw, would be cool to have a "mount" mechanism that allows to create
REST url in a more intuitive way, as Igor says.... maybe in 1.5 :)


On Mon, Sep 7, 2009 at 8:27 PM, Vit Rozkovec<rozkovec...@email.cz> wrote:
> Hallo,
> which encoding strategy should one use if one would like to achieve this:
>
> http://somesite/somepath/user1/products --> mounted on ProductsPage.class
> http://somesite/somepath/user1/profile --> mounted on ProfilePage.class
>
> http://somesite/somepath/user2/products --> mounted on ProductsPage.class
> http://somesite/somepath/user2/profile --> mounted on ProfilePage.class
>
> on ProductsPage.class and ProfilePage.class you know which user acesses the
> page.
>
> Thank you for any hints.
>
> Vit
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>



-- 
Daniele Dellafiore
http://blog.ildella.net
http://twitter.com/ildella

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to