Thanks Matej, I went ahead and built a IRequestCodingStrategy that
delegates the standard WebRequestCodingStrategy because I want my
strategy to be used for every Bookmarkable page and not just ones
that I mount. In fact my strategy needs to decide which Page is to
be used _without_ using the concept of a mount path (i.e. /mount/my/
page/here/ -> MyPage.class)
But I discovered that WicketFilter.isWicketRequest(String) assumes
that if a request path does not start with /resource/ or the empty
path (for home pages) then it MUST be a mount or it is not handled.
So I am looking into re-implementing my strategy as a
IRequestTargetUrlCodingStrategy but have come across another
conceptual limitation. When I first looked at implementing this
interface it looked to do what I wanted but the method getMountPath()
made me suspicious. Because my scheme would not mount a page at a
particular path - it mounts all my pages to a completely custom scheme.
And I can see that WebRequestCodingStrategy does indeed make sure
that pages are mounted to a particular path (not an empty path). But
I think I can get the behaviour I want by subclassing
WebRequestCodingStrategy to not use a MountsMap for the path matching
and putting the encoding logic in a IRequestTargetUrlCodingStrategy.
I do get the felling that this could all be simplified somehow!
Cheers,
John
On 9 Oct 2007, at 01:24, Matej Knopp wrote:
IIRC WebRequestCodingStrategy is used for non-mounted pages only and
it delegates the encoding/decoding for mounted pages to
IRequestTargetUrlCodingStrategy.
-Matej
On 10/9/07, John Patterson <[EMAIL PROTECTED]> wrote:
Hi,
I want to build a custom url encoder fro bookmarkable pages and have
been looking at BookmarkablePageRequestTargetUrlCodingStrategy. Can
someone quickly contrast the responsibilities of
IRequestTargetUrlCodingStrategy and WebRequestCodingStrategy. From a
quick look it seems like they duplicate some of the encoding/decoding
functionality.
If I want to change the way URL's are translated for every
bookmarkable page (including which page to create) should I override
WebRequestCodingStrategy.encode()/decode()?
Cheers,
John
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]