[
https://issues.apache.org/jira/browse/WICKET-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12542541
]
Thijs Vonk commented on WICKET-1132:
------------------------------------
I finally had some time to look into this today and I've made some great
progress.
I now know way the url was different. The difference in p_p_id was caused by a
wrong implementation in LiferayToPortalBridgePortletResourceURLFactory as
posted in http://www.nabble.com/forum/ViewPost.jtp?post=13306973&framed=y by
Charles.
It should not use the portletConfig.getPortletName() but a custom Liferay
portletConfig.getPortletId() which gives the full portlet instance name.
Also this class misses things like Windowstate and portletmode.
I have something working now, it's still a bit hacked together with hard coded
windowstate and portletmode. But at least my ajax request is comming through to
the wicket code and is updating my simple counter.
However the ajax response is still not working correctly. First of all I had to
change Liferay to except response.setContentType("text/xml"). Now I get a full
Liferay page back with in it included the <ajax-response> xml part generated by
Wicket. That's what I'll try to dive into tomorrow.
It's a really strange problem because AjaxRequestTarget#respond first calls
WebResponse.setHeader(), then it should call WebResponse.write(..) but my log
never shows any logging from inside that method while I do get (added) logging
from inside setHeader().
> Ajax link is different from normal link on Liferay Portal
> ---------------------------------------------------------
>
> Key: WICKET-1132
> URL: https://issues.apache.org/jira/browse/WICKET-1132
> Project: Wicket
> Issue Type: Bug
> Components: wicket-portlet
> Affects Versions: 1.3.0-beta4
> Environment: Liferay 4.3.3 on Tomcat 6
> Reporter: Thijs Vonk
> Assignee: Ate Douma
> Fix For: 1.3.0-rc2
>
>
> I created 2 simple Links a AjaxLink and a 'normal' link in a portlet. I
> deployed this portlet on Liferay. The normal link works fine. But the Ajax
> links doesn't work. In the generated HTML the url's look like this.
> AJAX link:
> <a href="#" wicket:id="link" onclick="var
> wcall=wicketAjaxGet('http://localhost:8080/web/guest/admin?p_p_id=MiniPortlet&p_p_action=1&p_p_col_id=column-1&p_p_col_count=1&',null,null,
> function() {return Wicket.$$(this)}.bind(this));return !wcall;"
> id="id__MiniPortlet__WAR__MiniPortlet1____link1">
> Normal link:
> <a
> href="http://localhost:8080/web/guest/admin?p_p_id=MiniPortlet_WAR_MiniPortlet1&p_p_action=1&p_p_state=normal&p_p_mode=view&p_p_col_id=column-1&p_p_col_count=1&_MiniPortlet_WAR_MiniPortlet1__wu=%2Fminiportlet%2F%3Fwicket%3Ainterface%3D%3A0%3Alink2%3A%3AILinkListener%3A%3A"
> wicket:id="link2">
> At this moment the p_p_id is the part that I'm looking into. As you can see
> they are different. And for Liferay this part tels it which portlet it should
> send the request to. The normal link is the correct path to the portlet. as
> this action actually works.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.