[ 
https://issues.apache.org/jira/browse/WICKET-2078?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12670587#action_12670587
 ] 

Ate Douma commented on WICKET-2078:
-----------------------------------

Hi Hardi,

Thanks for testing the new Portlet 2.0 support out on Websphere!

With regards to the problems you're encountering: if I understand correctly, 
the Websphere implementation of PortletURL.setParameter(name,value) doesn't 
properly retain the query string part of the value (e.g. the wicketURL).
If that's the case, IBM clearly didn't do a good job following the Portlet spec 
requirement which *requires* encoding of the value by the container, *not* the 
developer.

While your fix might be "working" for now, its actually not a very solid 
solution, as now any Wicket URL query parameter is passed in on the PortletURL 
itself too. Potential classes with other portlet parameters
like when you want to leverage actual portlet features within Wicket might 
cause problems then.

I think a possibly better solution (for running on Websphere Portal that is) 
could be to URLEncode the wicketURL itself before saving it as parameter on the 
PortletURL instead, and then use URLDecode when retrieving it in WicketPortlet 
again.
If that works, you've "proven" this is a Websphere Portal bug, not a Wicket 
bug... in that case it might be advisable to report it as such to IBM as well.

> WICKET-2058 does not support IBM Websphere Portal Server 6.1
> ------------------------------------------------------------
>
>                 Key: WICKET-2078
>                 URL: https://issues.apache.org/jira/browse/WICKET-2078
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-portlet
>         Environment: WebSphere Platform 6.1 [ND 6.1.0.15 cf150808.12]  
>            Reporter: Hardi Probst
>         Attachments: patch.txt
>
>
> First of all I want to say thanks a lot for resolving the issue WICKET-2058 
> to Ate, Thijs and Antony!
> I checked out the revision 739543 from trunk and experimented/tested a lot 
> with the wicket examples within IBM Websphere Portal 6.1.
> I had to add the following lines into web.xml to get the first 
> example-portlets visible in my browser:
>   <context-param>
>     <param-name>org.apache.wicket.detectPortletContext</param-name>
>     <param-value>true</param-value>
>   </context-param>
> The next problem I stumbled over was that the generated links (e.g. 
> BookmarkablePageLink<Void>("link", PageXY.class) ) did not work at all.
> I traced the problem down to the point that the generated wicketURL in 
> PortletRequestContext.encodeRenderURL includes all query-parameters but the 
> PortletFilter does 
> not get them as parameters, just the path-part.
> WicketPortlet.processRequest:
>       PortletRequestDispatcher rd = 
> getPortletContext().getRequestDispatcher(wicketURL);
>       if (rd != null)
>       {
>               // delegate to wicket filter - this is where the magic happens
>               rd.include(request, response);
>               ...
> Let's assume wicketURL has the value of 
> "/repeater/?wicket:interface=:8:oir:17:toggleHighlite:2:ILinkListener::", the 
> result would be the same as the value of "/repeater/".
> I was able to fix it by applying the query parameters as "real" parameters to 
> the javax.portlet.PortletURL for Action and Render-URLs (see Patch for 
> PortletRequestContext).
> After that I had the same problem with form-submission. The form-values came 
> in perfectly to the model, but after leaving the ACTION-PHASE the state was 
> all gone in RENDER-PHASE. 
> So I did the same in WicketPortlet.processActionResponseState and applied all 
> wicketURL-query parameteters to the response (setRenderParameter). see Patch 
> for WicketPortlet.
> Another solution could be a PortletRequestWrapper within the WicketFilter 
> implementation. Or does anybody have a better idea?
> It would be really great to see this issue fixed in wicket 1.4!
> I'll keep on testing the next days with the ajax examples (some worked 
> already with the provided patch applied) and WPS 6.1...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to