I could make '/folder-name1/mount/path' the complete mount however I would
need to do this for about 100 different folder names.

Perhaps it would be helpful to know what my end goal is... I would like
/context-name/folder-name1/something to end up in a render where
component.getVariation() returns 'folder-name1'. The effect would be
somewhat of a skin changer based on url where the first folder name is the
skin.

The reason I wanted stateful links written in the same way was for
consistency of the urls (so the 'skin' name is always in every url). Since
these links are stateful it is possible that I store the previous skin name
in state and use that on the next render however that seems less clean than
making sure all links contain the skin name.

Does this make more sense?

Ryan

On 12/17/06, Johan Compagner <[EMAIL PROTECTED]> wrote:

why aren't you making "/folder-name1/mount/path" not the complete mount?
and add it twice for the HomePage.class ?(folder 2 and 1) through the
WebApplication.mount() method.

We can generate such urls now: (+/-)
/contextName/folder-name1/listener/wicket-id-of-listener/[...]
But these are currently only used by stateless urls for stateless
links/forms

also matej had some idea's for bookmarkable page links that has some
state.

Why do you really want that? Because those links aren't shown anyway to
the user.

johan






On 12/15/06, Ryan <[EMAIL PROTECTED]> wrote:

> I am trying to implement an IRequestCodingStrategy that creates a
> "virtual" directory in the url path for all generated links. An example url
> would be:
>
> /contextName/folder-name1/mount/path/Home
> /contextName/folder-name2/mount/path/Home
>
> I would like both urls to go to Home.class which is mounted on
> /mouth/path. I also would like other type of urls written in this structure
> (such as listeners for links)
>
> /contextName/folder-name1/listener/wicket-id-of-listener/[...]
>
> I thought that I would be able to do this by extending
> WebRequestCodingStrategy and providing my own implementation of
> urlPrefix(RequestCycle) which obtained the virtual folder name from
> somewhere in my application and appended it as part of the context name.
> This way every url would have this appended and on decode I could extract it
> as the first path after the context name. My plan was spoiled by
> urlPrefix(..) being labeled final.
>
> My next approach was to override WebRequestCodingStrategy.encode(...) to
> call the super and return the super results with the folder appended to the
> beginning. This looks like it has some promise assume 1) I don't use mounts
> which would cause encode* not to be called and 2) I figure out some way to
> handle decode (which is another final method that only provides a few places
> to override a method, mostly around add*() ).
>
> Is there something I am over looking? Is there a better way to do this?
>
> Ryan
>
>
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys - and earn cash
>
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
>

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to