You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Haritha Juturu <ha...@yahoo.com> on 2008/01/03 20:53:45 UTC
BookmarkablePageLink generating wrong URL
Hi All
I am using mount(new QueryStringUrlCodingStrategy("/editor", Editor.class)); in the init() function of my application
The webpage DashBoard.java has the code
new BookmarkablePageLink("myLink", Editor.class).setParameter("note","123456");
The corresponding webpage DashBoard.html has wicket:id
<span class="btn"><a href="#" wicket:id="myLink"><img src="img/manhattan/edit_16.png" /><span></span></a></span>
When i click on the link i am expecting the url "/editor?note=123456" to be called
but instead i get the url "/editor/?note=123456" . The code generated an additional / slash .
Is this because of some setting in web.xml that is causing this ?
Thanks
Haritha
----- Original Message ----
From: Haritha Juturu <ha...@yahoo.com>
To: users@wicket.apache.org
Sent: Thursday, January 3, 2008 10:20:54 AM
Subject: Re: BookmarkablePageLink giving a different URL
nope William...
ultimately i get the url as "/editor/?note=119871054906381055" and not
"/editor?note=119871054906381055"
Haritha
----- Original Message ----
From: William Hoover <wh...@nemours.org>
To: users@wicket.apache.org
Sent: Thursday, January 3, 2008 9:43:22 AM
Subject: RE: BookmarkablePageLink giving a different URL
doesn't this work?
new BookmarkablePageLink("yourLink", Editor.class).setParameter("note",
"123456")
-----Original Message-----
From: Haritha Juturu [mailto:haritha.juturu@yahoo.com]
Sent: Thursday, January 03, 2008 12:37 PM
To: users@wicket.apache.org
Subject: Re: BookmarkablePageLink giving a different URL
Hi David/All
I put in the QueryStringUrlCodingStrategy code as suggested by you in
the init class.
Now the url comes as
/editor/?note=119871054906381055
with an additional '/?'
what is the reason for that.
Haritha
----- Original Message ----
From: David Shepherdson <da...@ontology-partners.com>
To: users@wicket.apache.org
Sent: Thursday, January 3, 2008 9:19:35 AM
Subject: Re: BookmarkablePageLink giving a different URL
On 3 Jan 2008, at 5.07 pm, Haritha Juturu wrote:
> I would like to get a url similar to "/editor?note=123456"
>
> But when i execute this code i get "/editor/note/123456"
> Can anyone tell me how i can get the format that i would like.
I believe you can do this by mounting the page using a
QueryStringUrlCodingStrategy. In your application's init() method, do
something like:
mount(new QueryStringUrlCodingStrategy("/editor", Editor.class));
That should cause it to encode the parameters using the query string,
rather than as part of the URL path.
(Incidentally, it looks like the JavaDoc for
QueryStringUrlCodingStrategy could do with an update -- it still has
references to QueryStringRequestTargetUrlCodingStrategy, which I
presume was the old name for the class.)
David Shepherdson
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
____________________________________________________________________________________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search.
http://tools.search.yahoo.com/newsearch/category.php?category=shopping
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs
____________________________________________________________________________________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping
Re: BookmarkablePageLink generating wrong URL
Posted by Igor Vaynberg <ig...@gmail.com>.
i think thats how wicket works by default when it generates urls. you
can probably write your own coding strategy that doesnt append the
slash after the mount.
-igor
On Jan 3, 2008 11:53 AM, Haritha Juturu <ha...@yahoo.com> wrote:
> Hi All
> I am using mount(new QueryStringUrlCodingStrategy("/editor", Editor.class)); in the init() function of my application
>
> The webpage DashBoard.java has the code
> new BookmarkablePageLink("myLink", Editor.class).setParameter("note","123456");
>
> The corresponding webpage DashBoard.html has wicket:id
> <span class="btn"><a href="#" wicket:id="myLink"><img src="img/manhattan/edit_16.png" /><span></span></a></span>
>
> When i click on the link i am expecting the url "/editor?note=123456" to be called
> but instead i get the url "/editor/?note=123456" . The code generated an additional / slash .
>
> Is this because of some setting in web.xml that is causing this ?
> Thanks
> Haritha
>
>
>
> ----- Original Message ----
> From: Haritha Juturu <ha...@yahoo.com>
> To: users@wicket.apache.org
> Sent: Thursday, January 3, 2008 10:20:54 AM
> Subject: Re: BookmarkablePageLink giving a different URL
>
>
> nope William...
> ultimately i get the url as "/editor/?note=119871054906381055" and not
> "/editor?note=119871054906381055"
> Haritha
> ----- Original Message ----
> From: William Hoover <wh...@nemours.org>
> To: users@wicket.apache.org
> Sent: Thursday, January 3, 2008 9:43:22 AM
> Subject: RE: BookmarkablePageLink giving a different URL
>
>
> doesn't this work?
>
> new BookmarkablePageLink("yourLink", Editor.class).setParameter("note",
> "123456")
>
> -----Original Message-----
> From: Haritha Juturu [mailto:haritha.juturu@yahoo.com]
> Sent: Thursday, January 03, 2008 12:37 PM
> To: users@wicket.apache.org
> Subject: Re: BookmarkablePageLink giving a different URL
>
>
> Hi David/All
> I put in the QueryStringUrlCodingStrategy code as suggested by you in
> the init class.
> Now the url comes as
> /editor/?note=119871054906381055
>
> with an additional '/?'
> what is the reason for that.
>
> Haritha
>
> ----- Original Message ----
> From: David Shepherdson <da...@ontology-partners.com>
> To: users@wicket.apache.org
> Sent: Thursday, January 3, 2008 9:19:35 AM
> Subject: Re: BookmarkablePageLink giving a different URL
>
>
> On 3 Jan 2008, at 5.07 pm, Haritha Juturu wrote:
>
> > I would like to get a url similar to "/editor?note=123456"
> >
> > But when i execute this code i get "/editor/note/123456"
> > Can anyone tell me how i can get the format that i would like.
>
> I believe you can do this by mounting the page using a
> QueryStringUrlCodingStrategy. In your application's init() method, do
> something like:
>
> mount(new QueryStringUrlCodingStrategy("/editor", Editor.class));
>
> That should cause it to encode the parameters using the query string,
> rather than as part of the URL path.
>
> (Incidentally, it looks like the JavaDoc for
> QueryStringUrlCodingStrategy could do with an update -- it still has
> references to QueryStringRequestTargetUrlCodingStrategy, which I
> presume was the old name for the class.)
>
> David Shepherdson
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
>
>
>
>
>
>
> ____________________________________________________________________________________
> Looking for last minute shopping deals?
> Find them fast with Yahoo! Search.
>
> http://tools.search.yahoo.com/newsearch/category.php?category=shopping
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
>
>
>
>
>
> ____________________________________________________________________________________
> Never miss a thing. Make Yahoo your home page.
> http://www.yahoo.com/r/hs
>
>
>
>
>
> ____________________________________________________________________________________
> Looking for last minute shopping deals?
> Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
RE: wicketstuff issue...
Posted by William Hoover <wh...@nemours.org>.
Do you know when that will be?
-----Original Message-----
From: frank.bille@gmail.com [mailto:frank.bille@gmail.com]On Behalf Of
Frank Bille
Sent: Thursday, January 03, 2008 3:19 PM
To: users@wicket.apache.org
Subject: Re: wicketstuff issue...
It's because of a bug, but it has been fixed. Now we just have to wait until
the examples are updated again.
Frank
On Jan 3, 2008 9:11 PM, William Hoover <wh...@nemours.org> wrote:
> Does anyone have any clue why all the links are dead in Internet Exploder
> for http://wicketstuff.org/wicket13/?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
Re: wicketstuff issue...
Posted by Frank Bille <fr...@apache.org>.
It's because of a bug, but it has been fixed. Now we just have to wait until
the examples are updated again.
Frank
On Jan 3, 2008 9:11 PM, William Hoover <wh...@nemours.org> wrote:
> Does anyone have any clue why all the links are dead in Internet Exploder
> for http://wicketstuff.org/wicket13/?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
wicketstuff issue...
Posted by William Hoover <wh...@nemours.org>.
Does anyone have any clue why all the links are dead in Internet Exploder for http://wicketstuff.org/wicket13/?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org