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

Reply via email to