[
https://issues.apache.org/jira/browse/WICKET-3216?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
shashi updated WICKET-3216:
---------------------------
Description:
Hi
My application was developed in wicket 1.3.1 and i am using
IndexedParamUrlCodingStrategy to mount the book markable page in my application
class setFriendlyUrls() method like this
this.mount(new
IndexedParamUrlCodingStrategy("/trainexception,TrainExceptionsPage.class));
and my train exception page has overload constructor with page parametrs as
argument when i type the url as
http://localhost:8080/itm/secure/jas/trainexception?suiFunctionCommand=te&suiCommandLine=te&suiFunctionTLA=NGT&suiFunctionName=Exceptions%20%28TE%29
and hit enter constructor with out page parameters are getting called and when
i debug and see the page parameters are coming a s null.
my observation is in deCodeParameters method urlFragment is coming as blank
string.
if (urlFragment.startsWith("/"))
{
urlFragment = urlFragment.substring(1);
}
if (urlFragment.length() > 0 && urlFragment.endsWith("/"))
{
urlFragment = urlFragment.substring(0,
urlFragment.length() - 1);
}
if (urlFragment.length() > 0)
{
String[] parts = urlFragment.split("/");
for (int i = 0; i < parts.length; i++)
{
if
(WebRequestCodingStrategy.PAGEMAP.equals(parts[i]))
{
i++;
params.put(WebRequestCodingStrategy.PAGEMAP, WebRequestCodingStrategy
.decodePageMapName(urlDecode(parts[i])));
}
else if
(WebRequestCodingStrategy.INTERFACE_PARAMETER_NAME.equals(parts[i]))
{
i++;
params.put(WebRequestCodingStrategy.INTERFACE_PARAMETER_NAME,
urlDecode(parts[i]));
}
else
{
params.put(String.valueOf(i),
urlDecode(parts[i]));
}
}
}
so all the below conditions are getting falied and emplty paramers are returned.
but when i put a debug point i saw that the underlying array in urlFragment
string us having the values but the string is empty.this is puzzling me.
was:
Hi
My application was developed in wicket 1.3.1 and i am using
IndexedParamUrlCodingStrategy to mount the book markable page in my application
class setFriendlyUrls() method like this
this.mount(new
IndexedParamUrlCodingStrategy("/trainexception,TrainExceptionsPage.class));
and my train exception page has overload constructor with page parametrs as
argument when i type the url as
http://localhost:8080/itm/secure/jas/trainexception?suiFunctionCommand=te&suiCommandLine=te&suiFunctionTLA=NGT&suiFunctionName=Exceptions%20%28TE%29
and hit enter constructor with out page parameters are getting called and when
i debug and see the page parameters are coming a s null.
> Url Page Parameters are coming null when mounted a page with
> IndexedParamUrlCodingStrategy
> ------------------------------------------------------------------------------------------
>
> Key: WICKET-3216
> URL: https://issues.apache.org/jira/browse/WICKET-3216
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Environment: Windows Xp
> Reporter: shashi
> Fix For: 1.4.15, 1.5-M4
>
>
> Hi
> My application was developed in wicket 1.3.1 and i am using
> IndexedParamUrlCodingStrategy to mount the book markable page in my
> application class setFriendlyUrls() method like this
> this.mount(new
> IndexedParamUrlCodingStrategy("/trainexception,TrainExceptionsPage.class));
> and my train exception page has overload constructor with page parametrs as
> argument when i type the url as
> http://localhost:8080/itm/secure/jas/trainexception?suiFunctionCommand=te&suiCommandLine=te&suiFunctionTLA=NGT&suiFunctionName=Exceptions%20%28TE%29
> and hit enter constructor with out page parameters are getting called and
> when i debug and see the page parameters are coming a s null.
> my observation is in deCodeParameters method urlFragment is coming as blank
> string.
> if (urlFragment.startsWith("/"))
> {
> urlFragment = urlFragment.substring(1);
> }
> if (urlFragment.length() > 0 && urlFragment.endsWith("/"))
> {
> urlFragment = urlFragment.substring(0,
> urlFragment.length() - 1);
> }
> if (urlFragment.length() > 0)
> {
> String[] parts = urlFragment.split("/");
> for (int i = 0; i < parts.length; i++)
> {
> if
> (WebRequestCodingStrategy.PAGEMAP.equals(parts[i]))
> {
> i++;
>
> params.put(WebRequestCodingStrategy.PAGEMAP, WebRequestCodingStrategy
>
> .decodePageMapName(urlDecode(parts[i])));
> }
> else if
> (WebRequestCodingStrategy.INTERFACE_PARAMETER_NAME.equals(parts[i]))
> {
> i++;
>
> params.put(WebRequestCodingStrategy.INTERFACE_PARAMETER_NAME,
> urlDecode(parts[i]));
> }
> else
> {
> params.put(String.valueOf(i),
> urlDecode(parts[i]));
> }
> }
> }
> so all the below conditions are getting falied and emplty paramers are
> returned.
> but when i put a debug point i saw that the underlying array in urlFragment
> string us having the values but the string is empty.this is puzzling me.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.