Charly wrote:
Hello,
I have the beginning of a solution !
Cool !
My code is based on Liferay's struts support with some adaptations.
At this time, Guestbook portlet sample is ok, and I've made a
modification in wicket to get Navomatic and other bookmarkablePage working.
The main point is that Liferay want a new HttpServletRequest (from
theirs object) in ServletContextProvider implementation of
ServletContextProvider and we must copy the request's parameters from
the original request to the new one.
Weird, but I guess it is something Liferay specific.
I translate also the "_wu" (WicketPortlet.WICKET_URL_PORTLET_PARAMETER)
parameter into differents parameters
Why?
The WicketPortlet dispatches to the servlet/filter using this url, so the underlying web container (e.g. catalina) should already provide the query string
parameters as request parameters (as required by the servlet spec).
You can have a look to my 3 classes at the end of this mail.
I notice that you don't set the provided Map portletArg arguments on the
created PortletURLImpl in createResourceURL method.
You probably should...
I've got a problem for all bookmarkablePage, because the argument are
encoded by Wicket, and Liferay encode it second time.
Liferay shouldn't be doing that: you should get back the parameters previously
set on a PortletURL exactly the same.
Seems like a Liferay bug to me.
The parameter received is like
"%3Aorg.apache.wicket.examples.navomatic.Page2". So I add a call to
decode function from "org.apache.wicket.protocol.http.RequestUtils"
Here is my code modification (it's maybe possible to find a another
solution too)
in the class
"org.apache.wicket.protocol.http.request.WebRequestCodingStrategy",
method addBookmarkablePageParameters(final Request request, final
RequestParameters parameters)
(line : 521 / SVN revision : 585043)
I change from
final String[] components = Strings.split(requestString,
Component.PATH_SEPARATOR);
to
final String[] components =
Strings.split(RequestUtils.decode(requestString),Component.PATH_SEPARATOR);
(Note: I test it with jetspeed and it works)
The main remaining problem is about Ajax portlet. I have this Error :
=======================================
15:38:53,248 ERROR [[default]:731] "Servlet.service()" pour la servlet
default a lancé une exception
java.lang.NullPointerException
at
org.apache.wicket.protocol.http.WebResponse.redirect(WebResponse.java:204)
at
org.apache.wicket.protocol.http.BufferedWebResponse.close(BufferedWebResponse.java:66)
Seems like a strange NPE to me.
Looking at WebResponse.java:204, the only null reference in that code line could be the url string itself, but as the stacktrace indicates, the redirect is
called from BufferedWebResponse.java:66 and there it only does that *if* the url != null.
Can you further debug this?
Ate
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]