You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Pierre Goupil <go...@gmail.com> on 2010/02/12 18:11:31 UTC

BookmarkablePage with PageParameters

Good evening,

I have a BookmarkablePage which may need PageParameters or not, depending on
the business workflow. I used to mount it under /page but now that we do use
the PageParameters-providing constructor I have a problem which forced me
not to mount the page in my Application class anymore.

When I mounted the page explicitly, the PageParameters constructor call used
to gave such an URL: /page/param/0. So when asking for a resource on that
page, it gave me this error message: "URL fragment has unmatched
key/valuepairs, responding with 404".

If I don't mount the page, the URL generated is of the form:
/bookmarkablePage?class=foo&param=0. Which is good regarding the parameter
retrieval.

My question is: is there any way to have the best of both world, I mean such
a pretty URL as /page (no Java class name in the URL) and the parameters
using the classical '?' and '&' symbols? Which would give this URL:
/page?param=0. I guess that if I don't have any trailing slashes in the URL,
the "URL fragment" message should be avoided, isn't it?

Thanks in advance and regards,

Pierre


-- 
Les deux règles universelles du bide :

1) on n'explique pas un bide

2) dans le futur, un bide sera toujours un bide.

Re: BookmarkablePage with PageParameters

Posted by Pierre Goupil <go...@gmail.com>.
Mmmh great! I'll give this a try on Monday.

Cheers,

Pierre


On Fri, Feb 12, 2010 at 6:42 PM, vineet semwal
<vi...@gmail.com>wrote:

> take a look at querystringurlcodingstrategy,mixedparamurlcodingstategy
> ,mixedparamhybridurlcodingstategy,
> and use what suits you .
>
>
> Good evening,
> >
> > I have a BookmarkablePage which may need PageParameters or not, depending
> > on
> > the business workflow. I used to mount it under /page but now that we do
> > use
> > the PageParameters-providing constructor I have a problem which forced me
> > not to mount the page in my Application class anymore.
> >
> > When I mounted the page explicitly, the PageParameters constructor call
> > used
> > to gave such an URL: /page/param/0. So when asking for a resource on that
> > page, it gave me this error message: "URL fragment has unmatched
> > key/valuepairs, responding with 404".
> >
> > If I don't mount the page, the URL generated is of the form:
> > /bookmarkablePage?class=foo&param=0. Which is good regarding the
> parameter
> > retrieval.
> >
> > My question is: is there any way to have the best of both world, I mean
> > such
> > a pretty URL as /page (no Java class name in the URL) and the parameters
> > using the classical '?' and '&' symbols? Which would give this URL:
> > /page?param=0. I guess that if I don't have any trailing slashes in the
> > URL,
> > the "URL fragment" message should be avoided, isn't it?
> >
> > Thanks in advance and regards,
> >
> > Pierre
> >
> >
> > --
> > Les deux règles universelles du bide :
> >
> > 1) on n'explique pas un bide
> >
> > 2) dans le futur, un bide sera toujours un bide.
> >
>
>
>
> --
> regards,
> Vineet Semwal
>



-- 
Les deux règles universelles du bide :

1) on n'explique pas un bide

2) dans le futur, un bide sera toujours un bide.

Re: BookmarkablePage with PageParameters

Posted by vineet semwal <vi...@gmail.com>.
take a look at querystringurlcodingstrategy,mixedparamurlcodingstategy
,mixedparamhybridurlcodingstategy,
and use what suits you .


Good evening,
>
> I have a BookmarkablePage which may need PageParameters or not, depending
> on
> the business workflow. I used to mount it under /page but now that we do
> use
> the PageParameters-providing constructor I have a problem which forced me
> not to mount the page in my Application class anymore.
>
> When I mounted the page explicitly, the PageParameters constructor call
> used
> to gave such an URL: /page/param/0. So when asking for a resource on that
> page, it gave me this error message: "URL fragment has unmatched
> key/valuepairs, responding with 404".
>
> If I don't mount the page, the URL generated is of the form:
> /bookmarkablePage?class=foo&param=0. Which is good regarding the parameter
> retrieval.
>
> My question is: is there any way to have the best of both world, I mean
> such
> a pretty URL as /page (no Java class name in the URL) and the parameters
> using the classical '?' and '&' symbols? Which would give this URL:
> /page?param=0. I guess that if I don't have any trailing slashes in the
> URL,
> the "URL fragment" message should be avoided, isn't it?
>
> Thanks in advance and regards,
>
> Pierre
>
>
> --
> Les deux règles universelles du bide :
>
> 1) on n'explique pas un bide
>
> 2) dans le futur, un bide sera toujours un bide.
>



-- 
regards,
Vineet Semwal