[
https://issues.apache.org/jira/browse/WICKET-4019?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13124060#comment-13124060
]
Peter Pastrnak edited comment on WICKET-4019 at 10/10/11 1:06 PM:
------------------------------------------------------------------
Wicket-portlet generates for ajax calls (GET) portlet resource URL, that
contains the real wicket URL encoded in a 'resource_id' parameter.
PortletServletRequestWrapper currently returns inconsistent result, where
getParameterMap is taken from the original HttpServletRequest and
getQueryString is taken from the 'resource_id' parameter (from the included
request). Wicket core parses the query string and all parameters that are in
the parameter map and not in the query string are assigned to the 'post' group.
So currently all javascript added parameters are treated as 'post' parameters
and not 'query' parameters. As TagIt component adds the 'term' parameter at the
end of the URL...
Thats why I'm thinking about merging the parameters from URL and from the
resource_id. Hopefully next week ill find some time to have a closer look at it.
Example of the generated URL:
https://www.domain.loc/apps/mail/sms/nova-sprava/-/newSms?p_p_id=NewSmsPortlet_WAR_mailportlet&p_p_lifecycle=2&p_p_state=normal&p_p_mode=view&p_p_resource_id=%2FNewSmsPortlet%2F%3F0-1.IBehaviorListener.0-sendingForm-recipients&p_p_cacheability=cacheLevelPage&p_p_col_id=column-3&p_p_col_count=1&term=XXXXX
was (Author: pasto):
Wicket-portlet generates for ajax calls (GET) portlet resource URL, that
contains the real wicket URL encoded in a 'resource_id' parameter. As
PortletServletRequestWrapper currently returns inconsistent result, where
getParameterMap is taken from the original HttpServletRequest and
getQueryString is taken from the 'resource_id' parameter (from the included
request). Wicket core parses the query string and all parameters that are in
the parameter map and not in the query string are assigned to the 'post' group.
So currently all javascript added parameters are treated as 'post' parameters
and not 'query' parameters. As TagIt component adds the 'term' parameter at the
end of the URL...
Thats why I'm thinking about merging the parameters from URL and from the
resource_id. Hopefully next week ill find some time to have a look closer at it.
Example of the generated URL:
https://www.domain.loc/apps/mail/sms/nova-sprava/-/newSms?p_p_id=NewSmsPortlet_WAR_mailportlet&p_p_lifecycle=2&p_p_state=normal&p_p_mode=view&p_p_resource_id=%2FNewSmsPortlet%2F%3F0-1.IBehaviorListener.0-sendingForm-recipients&p_p_cacheability=cacheLevelPage&p_p_col_id=column-3&p_p_col_count=1&term=XXXXX
> Portlet Support 1.5
> -------------------
>
> Key: WICKET-4019
> URL: https://issues.apache.org/jira/browse/WICKET-4019
> Project: Wicket
> Issue Type: New Feature
> Components: wicket
> Affects Versions: 1.5-RC7
> Reporter: Peter Pastrnak
> Attachments: ResponseState.java, Wicket - Portlet.htm,
> wicket-portlet-1.5.0.zip, wicket-portlet-1.5.1.1.zip,
> wicket-portlet-1.5.1.zip, wicket-portlet-1.5.RC7.zip, with bind(this).jpg,
> without bind(this).jpg
>
>
> Url returned by the RequestMapper does not seem to be properly rendered, as
> it does not encode question mark character in the Url parameter value (I
> haven't checked the w3c spec, but at least Liferay Portal seems to require it
> to be encoded)
> The reason is this definition in the UrlEncoder:
> case QUERY :
> // to allow direct passing of URL in query
> dontNeedEncoding.set('/');
> // to allow direct passing of URL in query
> dontNeedEncoding.set('?');
> Currently URL "http://host/file?param=a?b" would be encoded as
> "http://host/file?param=a?b", instead of "http://host/file?param=a%3Fb"
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira