I've attached a quickstart code , including error case , to WICKET-2312
https://issues.apache.org/jira/browse/WICKET-2312
I think the problem may come from bookmarkablePage parsing parameters...
The CurrentPage is mounted to /CurrentPage by
mountBookmarkablePage(/CurrentPage ,
2009/6/7 Johan Compagner jcompag...@gmail.com
can you debug and see what this returns for both situations?
((WebRequest)RequestCycle.*get*().getRequest()).getHttpServletRequest()
.getRequestURL().toString()
ok , here is my test :
String a1 =
a1 = http://foo.bar:8080/app/CurrentPage
s1 = http://foo.bar:8080/app/CurrentPage
a2 = http://foo.bar:8080/app/
s2 = http://CurrentPage/ http://currentpage/
a1 , s1 are correct ,
a2 , s2 are totally wrong.
a1 , s1 en a2 are all correct.
but why s2 is a result when a2 is the input
No it is just the request uri and the request uri of the ajax call will
always be
http://foo.bar:8080/app/?xx=y
so that is correct.
And looking at the code you also can see that that last piece CurrentPage is
stripped out (as it should) in the make to absolute path code
Just Debug it
The problem is that when you have a bookmarkable page with parameters,
the url looks like this:
http://www.mydomain.com/myapp/MyPage/param1/value1/param2/value2
The parameters are not part of the url path, but the toAbsolutePath
code assumes them to be.
It would be better if it would adapt to
that it doesnt give you the hostname/port is ofcourse a bug
print out these variables:
getRequestCycle().urlFor(CurrentPage.class ,pps).toString()
I think that one time it will give you just the url
and one time
../.././CurrentPage
i guess that is your problem but you need to debug a bit
please attach a failing test case
On Sun, Jun 7, 2009 at 21:16, smallufo small...@funp.com wrote:
2009/6/8 Johan Compagner jcompag...@gmail.com
that it doesnt give you the hostname/port is ofcourse a bug
I've submitted this bug to JIRA :
I don't know if this is related to WICKET-1599 :
https://issues.apache.org/jira/browse/WICKET-1599
2009/6/7 smallufo small...@gmail.com
This is my code :
String s1 =
RequestUtils.toAbsolutePath(getRequestCycle().urlFor(CurrentPage.class ,
pps).toString());
System.out.println(s1 = +
can you debug and see what this returns for both situations?
((WebRequest)RequestCycle.*get*().getRequest()).getHttpServletRequest()
.getRequestURL().toString()
On Sat, Jun 6, 2009 at 21:49, smallufo small...@gmail.com wrote:
This is my code :
String s1 =