You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Thijs Vonk (JIRA)" <ji...@apache.org> on 2007/11/06 11:58:51 UTC

[jira] Created: (WICKET-1132) Ajax link is differtent from normal link on Liferay Portal

Ajax link is differtent 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


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&amp;p_p_action=1&amp;p_p_state=normal&amp;p_p_mode=view&amp;p_p_col_id=column-1&amp;p_p_col_count=1&amp;_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.


[jira] Commented: (WICKET-1132) Liferay portlet support

Posted by "Thijs Vonk (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12553483 ] 

Thijs Vonk commented on WICKET-1132:
------------------------------------

Ate. Just a background question to get more grip on things
Why is the ActionResponse not implemented? Or should I say ignoring all setters.

> Liferay portlet support
> -----------------------
>
>                 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-rc3
>
>         Attachments: patch-jira-wicket-1132.patch
>
>
> 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&amp;p_p_action=1&amp;p_p_state=normal&amp;p_p_mode=view&amp;p_p_col_id=column-1&amp;p_p_col_count=1&amp;_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.


[jira] Issue Comment Edited: (WICKET-1132) Liferay portlet support

Posted by "Thijs Vonk (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12548663 ] 

thyzz edited comment on WICKET-1132 at 12/5/07 5:33 AM:
-------------------------------------------------------------

I've come across a issue with the ajax link redirect example.
If I'm reading the portlet 1.0 specs correctly a portal is not allowed to give the portlet access to the response headers. So setHeader/addHeader will have no effect. This is what happens in Liferay. If I set a header on the response it will be ignored and never sent to the client.
So the code httpServletResponse.addHeader("Ajax-Location", url) in WebResponse will have no effect.
Also the setHeader() calls to response in AjaxRequestTarget seem to be useless.

Ate how does JetSpeed/Pluto handle this? Or are you already using the 2.0 spec for this with the addProperty in the Mimeresponse?


      was (Author: thyzz):
    I've come across a issue with the ajax link redirect example.
If I'm reading the portlet 1.0 specs correctly a portal is not allowed to give the portlet access to the response headers. So setHeader/addHeader will have no effect. This is what happens in Liferay. If I set a header on the response it will be ignored and never sent to the client.

Ate how does JetSpeed/Pluto handel this? Or are you already using the 2.0 spec for this with the addProperty in the Mimeresponse?

  
> Liferay portlet support
> -----------------------
>
>                 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
>
>         Attachments: patch-jira-wicket-1132.patch
>
>
> 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&amp;p_p_action=1&amp;p_p_state=normal&amp;p_p_mode=view&amp;p_p_col_id=column-1&amp;p_p_col_count=1&amp;_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.


[jira] Updated: (WICKET-1132) Liferay portlet support

Posted by "Frank Bille Jensen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Frank Bille Jensen updated WICKET-1132:
---------------------------------------

    Fix Version/s:     (was: 1.3.1)
                   1.3.2

> Liferay portlet support
> -----------------------
>
>                 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.2
>
>         Attachments: patch-jira-wicket-1132.patch
>
>
> 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&amp;p_p_action=1&amp;p_p_state=normal&amp;p_p_mode=view&amp;p_p_col_id=column-1&amp;p_p_col_count=1&amp;_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.


[jira] Commented: (WICKET-1132) Liferay portlet support

Posted by "Ate Douma (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12553496 ] 

Ate Douma commented on WICKET-1132:
-----------------------------------

You mean the PortletActionServletResponseWrapper?

This is a ServletResponse wrapperr for usage during the portlet Action phase.
During the Action phase no content is allowed/possible to be written, hence (almost) all ServletResponse methods are and must be nullified (otherwise an exception would be thrown).

> Liferay portlet support
> -----------------------
>
>                 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-rc3
>
>         Attachments: patch-jira-wicket-1132.patch
>
>
> 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&amp;p_p_action=1&amp;p_p_state=normal&amp;p_p_mode=view&amp;p_p_col_id=column-1&amp;p_p_col_count=1&amp;_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.


[jira] Updated: (WICKET-1132) Liferay portlet support

Posted by "Frank Bille Jensen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Frank Bille Jensen updated WICKET-1132:
---------------------------------------

    Fix Version/s:     (was: 1.3.0-rc2)
                   1.3.0-rc3

> Liferay portlet support
> -----------------------
>
>                 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-rc3
>
>         Attachments: patch-jira-wicket-1132.patch
>
>
> 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&amp;p_p_action=1&amp;p_p_state=normal&amp;p_p_mode=view&amp;p_p_col_id=column-1&amp;p_p_col_count=1&amp;_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.


[jira] Commented: (WICKET-1132) Liferay portlet support

Posted by "Ate Douma (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12546600 ] 

Ate Douma commented on WICKET-1132:
-----------------------------------

Thijs,

I don't think setting the "Accept" "text/xml" header would be a problem as that is what the response should be anyway.
I'll try to test it out today (also on Jetspeed) and if I see no issues and nobody else has problems with it I'll commit your patch.

> Liferay portlet support
> -----------------------
>
>                 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
>
>         Attachments: patch-jira-wicket-1132.patch
>
>
> 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&amp;p_p_action=1&amp;p_p_state=normal&amp;p_p_mode=view&amp;p_p_col_id=column-1&amp;p_p_col_count=1&amp;_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.


[jira] Updated: (WICKET-1132) Liferay portlet support

Posted by "Thijs Vonk (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thijs Vonk updated WICKET-1132:
-------------------------------

    Attachment: patch-jira-wicket-1132.patch

added t.setRequestHeader("Accept", "text/xml");

> Liferay portlet support
> -----------------------
>
>                 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
>
>         Attachments: patch-jira-wicket-1132.patch
>
>
> 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&amp;p_p_action=1&amp;p_p_state=normal&amp;p_p_mode=view&amp;p_p_col_id=column-1&amp;p_p_col_count=1&amp;_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.


[jira] Commented: (WICKET-1132) Liferay portlet support

Posted by "Thijs Vonk (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12548663 ] 

Thijs Vonk commented on WICKET-1132:
------------------------------------

I've come across a issue with the ajax link redirect example.
If I'm reading the portlet 1.0 specs correctly a portal is not allowed to give the portlet access to the response headers. So setHeader/addHeader will have no effect. This is what happens in Liferay. If I set a header on the response it will be ignored and never sent to the client.

Ate how does JetSpeed/Pluto handel this? Or are you already using the 2.0 spec for this with the addProperty in the Mimeresponse?


> Liferay portlet support
> -----------------------
>
>                 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
>
>         Attachments: patch-jira-wicket-1132.patch
>
>
> 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&amp;p_p_action=1&amp;p_p_state=normal&amp;p_p_mode=view&amp;p_p_col_id=column-1&amp;p_p_col_count=1&amp;_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.


[jira] Issue Comment Edited: (WICKET-1132) Ajax link is different from normal link on Liferay Portal

Posted by "Thijs Vonk (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12542541 ] 

thyzz edited comment on WICKET-1132 at 11/14/07 1:55 PM:
--------------------------------------------------------------

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 accept 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().

      was (Author: thyzz):
    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&amp;p_p_action=1&amp;p_p_state=normal&amp;p_p_mode=view&amp;p_p_col_id=column-1&amp;p_p_col_count=1&amp;_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.


[jira] Updated: (WICKET-1132) Liferay portlet support

Posted by "Frank Bille Jensen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Frank Bille Jensen updated WICKET-1132:
---------------------------------------

    Fix Version/s:     (was: 1.3.2)
                   1.3.3

> Liferay portlet support
> -----------------------
>
>                 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.3
>
>         Attachments: patch-jira-wicket-1132.patch
>
>
> 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&amp;p_p_action=1&amp;p_p_state=normal&amp;p_p_mode=view&amp;p_p_col_id=column-1&amp;p_p_col_count=1&amp;_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.


[jira] Commented: (WICKET-1132) Liferay portlet support

Posted by "Kent Tong (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12638737#action_12638737 ] 

Kent Tong commented on WICKET-1132:
-----------------------------------

I've created a ServletContextProvider for liferay using inspection, without any reference to the liferay portal implementation classes:

package test;

import javax.portlet.GenericPortlet;
import javax.portlet.PortletRequest;
import javax.portlet.PortletResponse;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.portals.bridges.common.ServletContextProvider;

public class MyServletContextProvider implements ServletContextProvider {
	public ServletContext getServletContext(GenericPortlet portlet) {
		return (ServletContext) callMethod(portlet.getPortletContext(),
				"getServletContext");
	}

	private Object callMethod(Object obj, String methodName) {
		try {
			return obj.getClass().getMethod(methodName).invoke(obj);
		} catch (Exception e) {
			throw new RuntimeException(e);
		}
	}

	public HttpServletRequest getHttpServletRequest(GenericPortlet portlet,
			PortletRequest portletRequest) {
		return (HttpServletRequest) callMethod(portletRequest,
				"getHttpServletRequest");
	}

	public HttpServletResponse getHttpServletResponse(GenericPortlet portlet,
			PortletResponse portletResponse) {

		return (HttpServletResponse) callMethod(portletResponse,
				"getHttpServletResponse");
	}

}

However, when a form in the portlet is submitted, I get a NullPointerException in WebResponse.write(WebResponse.java:355).
The issue is that the Wicket portlet code thinks the request is an action request but Wicket is closing the response writer.
The HTTP request as view in WicketFilter.java is:

[method = POST, protocol = HTTP/1.1, requestURL = http://localhost:8080/c/portal/layout, contentType = application/x-www-form-urlencoded, contentLength = 46, contextPath = /portlet3, pathInfo = null, requestURI = /portlet3/app/, servletPath = /app, pathTranslated = /home/kent/liferay-portal-tomcat-6.0-5.1.1/webapps/ROOT/guest/home]

The stack trace is here:
request.get1651409 [http-8080-2] ERROR org.apache.wicket.protocol.http.WicketFilter - closing the buffer error
java.lang.NullPointerException
	at org.apache.wicket.protocol.http.WebResponse.write(WebResponse.java:355)
	at org.apache.wicket.protocol.http.BufferedWebResponse.close(BufferedWebResponse.java:73)
	at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:403)
	at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:199)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
	at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:535)
	at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:472)
	at org.apache.wicket.protocol.http.portlet.WicketPortlet.processRequest(WicketPortlet.java:500)
	at org.apache.wicket.protocol.http.portlet.WicketPortlet.processAction(WicketPortlet.java:440)
	at com.sun.portal.portletcontainer.appengine.filter.FilterChainImpl.doFilter(FilterChainImpl.java:93)
	at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:57)
	at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:96)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
	at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:535)
	at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:472)
	at com.liferay.portlet.InvokerPortlet.invoke(InvokerPortlet.java:534)
	at com.liferay.portlet.InvokerPortlet.invokeAction(InvokerPortlet.java:577)
	at com.liferay.portlet.InvokerPortlet.processAction(InvokerPortlet.java:313)
	at com.liferay.portal.action.LayoutAction.processPortletRequest(LayoutAction.java:618)
	at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:403)
	at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:188)
	at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
	at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
	at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:164)
	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
	at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
	at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:444)
	at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:709)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
	at com.liferay.portal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:144)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:132)
	at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:117)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:71)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:132)
	at com.liferay.portal.servlet.filters.compression.CompressionFilter.processFilter(CompressionFilter.java:141)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:71)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:132)
	at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:282)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:71)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:132)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:74)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:132)
	at com.liferay.portal.servlet.filters.layoutcache.LayoutCacheFilter.processFilter(LayoutCacheFilter.java:422)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:71)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:132)
	at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:199)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:71)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:132)
	at com.liferay.portal.servlet.filters.sso.opensso.OpenSSOFilter.processFilter(OpenSSOFilter.java:73)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:71)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:132)
	at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.doFilter(VirtualHostFilter.java:185)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:132)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:74)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
	at java.lang.Thread.run(Thread.java:619)


> Liferay portlet support
> -----------------------
>
>                 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
>         Attachments: patch-jira-wicket-1132.patch
>
>
> 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&amp;p_p_action=1&amp;p_p_state=normal&amp;p_p_mode=view&amp;p_p_col_id=column-1&amp;p_p_col_count=1&amp;_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.


[jira] Commented: (WICKET-1132) Ajax link is different from normal link on Liferay Portal

Posted by "Ate Douma (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12544489 ] 

Ate Douma commented on WICKET-1132:
-----------------------------------

> 3. The WicketExamplesMenuPortlet doesn't work. It will load and display it's content, but when you click a link, nothing happens.
Could be one of three things:
a) the link isn't (generated) correct so clicking it leads to nowhere (maybe Liferay debug logging?)
b) the link is activated but not properly processed (try debugging processRequest method, line 188 is where this flow should start, but maybe something goes wrong earlier)
c) the *Wicket* processing is done properly, but the content output isn't (by Liferay).
    Set a break on processRequest method, line 195 and trace into the super.processRequest method and break on line 520. The Wicket (render) processing is finished there,
    so you can evaluate the response output buffer (or whatever Liferay uses for that). Note: when a redirect is send, the render while loop you're in might execute more than once..

> 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&amp;p_p_action=1&amp;p_p_state=normal&amp;p_p_mode=view&amp;p_p_col_id=column-1&amp;p_p_col_count=1&amp;_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.


[jira] Closed: (WICKET-1132) Liferay portlet support

Posted by "Thijs Vonk (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thijs Vonk closed WICKET-1132.
------------------------------

    Resolution: Won't Fix

Full liferay support isn't possible at the moment without building Wicket against the liferay portal implementation. Swapping javax.portlet.RenderResponse with com.liferay.portlet.RenderResponseImpl and adding some other hacks.

I've opened a new issue https://issues.apache.org/jira/browse/WICKET-1620 to support Portlet 2.0 which should make supporting Liferay a lot easier...

> Liferay portlet support
> -----------------------
>
>                 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.4
>
>         Attachments: patch-jira-wicket-1132.patch
>
>
> 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&amp;p_p_action=1&amp;p_p_state=normal&amp;p_p_mode=view&amp;p_p_col_id=column-1&amp;p_p_col_count=1&amp;_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.


[jira] Commented: (WICKET-1132) Ajax link is different from normal link on Liferay Portal

Posted by "Ate Douma (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12542523 ] 

Ate Douma commented on WICKET-1132:
-----------------------------------

I've already commented on this issue on the lists and AFAIK this seems to be a Liferay Portal internal issue, although difficult for me to be sure about without actually testing/debugging on Liferay myself.
I'm hoping Thijs can get some Liferay developers involved in this, or else I might need to take this up with some of the Liferay architects directly I know from the JSR-286 EG team.
I won't have time for this until later *next* week the earliest though, but we definitely should try to get this working in at least one other portal, like Liferay, just to prove the point the portlet support really is generic enough.
The fact that Thijs already seems to have it working for the non Ajax cases really is cool for sure.

> 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&amp;p_p_action=1&amp;p_p_state=normal&amp;p_p_mode=view&amp;p_p_col_id=column-1&amp;p_p_col_count=1&amp;_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.


[jira] Updated: (WICKET-1132) Liferay portlet support

Posted by "Frank Bille Jensen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Frank Bille Jensen updated WICKET-1132:
---------------------------------------

    Fix Version/s:     (was: 1.3.3)
                   1.3.4

> Liferay portlet support
> -----------------------
>
>                 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.4
>
>         Attachments: patch-jira-wicket-1132.patch
>
>
> 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&amp;p_p_action=1&amp;p_p_state=normal&amp;p_p_mode=view&amp;p_p_col_id=column-1&amp;p_p_col_count=1&amp;_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.


[jira] Commented: (WICKET-1132) Liferay portlet support

Posted by "Thijs Vonk (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12546444 ] 

Thijs Vonk commented on WICKET-1132:
------------------------------------

In my comment of 14-nov I said that I had to change something in the liferay portal to get ajax support working.
Because of how Liferay works they would like the ajax requests to have the 'Accept' http header set to text/xml so that liferay knows what contenttype to return in the response. I know wicket sets the contenttype in the response but liferay checks the contenttype against the accept request header.
It's implemented a bit strange because they currently only read for wap.xhtml otherwise only accept text/html. But it seems wicket would be the first framework that actively return xml. (see http://www.liferay.com/web/guest/community/forums/message_boards/message/299801 )
So i would like to propose a change to wicket-ajax.js so that when it does a ajax request it also sets the 'accept' http header with 'text/xml'

> Liferay portlet support
> -----------------------
>
>                 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&amp;p_p_action=1&amp;p_p_state=normal&amp;p_p_mode=view&amp;p_p_col_id=column-1&amp;p_p_col_count=1&amp;_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.


[jira] Commented: (WICKET-1132) Liferay portlet support

Posted by "Ate Douma (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12546646 ] 

Ate Douma commented on WICKET-1132:
-----------------------------------

I've tested the patch both as "plain" webapp and as portlet app deployed in Jetspeed and (as expected) saw no issues so I've committed the patch.
Thanks Thijs!
Hopefully this gets Wicket Portlet Ajax now properly working on Liferay too.

> Liferay portlet support
> -----------------------
>
>                 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
>
>         Attachments: patch-jira-wicket-1132.patch
>
>
> 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&amp;p_p_action=1&amp;p_p_state=normal&amp;p_p_mode=view&amp;p_p_col_id=column-1&amp;p_p_col_count=1&amp;_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.


[jira] Commented: (WICKET-1132) Ajax link is different from normal link on Liferay Portal

Posted by "Thijs Vonk (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12542754 ] 

Thijs Vonk commented on WICKET-1132:
------------------------------------

ok, I have the ajax part working for 99%.  I can run almost all the wicket ajax examples.

The rendering of the full page was due to a Liferay specific parameter that has to be included in the URL. They use a custom WindowState (LiferayWindowState.EXCLUSIVE) tot tell the portal to only render the part that the portlet is requesting.

This does bring me to one other question. Is createResourceUrl only called when a Ajax callback link is generated? Otherwise I need to know when to call the EXCLUSIVE windowstate.


Then there are at least 2 issues at the moment. 
1. The redirect ajax link example does not work. It won't redirect on the first click and on the second click I get a stacktrace which start with: "Could not deserialize object using `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory` object factory".
2. I can't open the sourcecode. The popup will open but it shows no content. This is probably again due to a Liferay specific WindowState (LiferayWindowState.POP_UP). So I need to now when a link is a popup and then add the POP_UP windowstate to the URL.

I'll look into these 2 things when I have a bit less other work.


> 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&amp;p_p_action=1&amp;p_p_state=normal&amp;p_p_mode=view&amp;p_p_col_id=column-1&amp;p_p_col_count=1&amp;_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.


[jira] Updated: (WICKET-1132) Ajax link is different from normal link on Liferay Portal

Posted by "Johan Compagner (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Johan Compagner updated WICKET-1132:
------------------------------------

    Fix Version/s: 1.3.0-rc2
         Assignee: Ate Douma

ate, can you look at this to see if this needs to be fixed before the final of 1.3?

> 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&amp;p_p_action=1&amp;p_p_state=normal&amp;p_p_mode=view&amp;p_p_col_id=column-1&amp;p_p_col_count=1&amp;_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.


[jira] Updated: (WICKET-1132) Liferay portlet support

Posted by "Thijs Vonk (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thijs Vonk updated WICKET-1132:
-------------------------------

    Summary: Liferay portlet support  (was: Ajax link is different from normal link on Liferay Portal)

> Liferay portlet support
> -----------------------
>
>                 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&amp;p_p_action=1&amp;p_p_state=normal&amp;p_p_mode=view&amp;p_p_col_id=column-1&amp;p_p_col_count=1&amp;_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.


[jira] Commented: (WICKET-1132) Ajax link is different from normal link on Liferay Portal

Posted by "Thijs Vonk (JIRA)" <ji...@apache.org>.
    [ 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&amp;p_p_action=1&amp;p_p_state=normal&amp;p_p_mode=view&amp;p_p_col_id=column-1&amp;p_p_col_count=1&amp;_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.


[jira] Updated: (WICKET-1132) Liferay portlet support

Posted by "Thijs Vonk (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thijs Vonk updated WICKET-1132:
-------------------------------

    Fix Version/s:     (was: 1.3.4)

> Liferay portlet support
> -----------------------
>
>                 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
>         Attachments: patch-jira-wicket-1132.patch
>
>
> 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&amp;p_p_action=1&amp;p_p_state=normal&amp;p_p_mode=view&amp;p_p_col_id=column-1&amp;p_p_col_count=1&amp;_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.


[jira] Commented: (WICKET-1132) Liferay portlet support

Posted by "Ate Douma (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12548667 ] 

Ate Douma commented on WICKET-1132:
-----------------------------------

Yes and no.
This concerns the handling of a ResourceURL request by the portal (see ResourceURLFactory).
The ResourceURLFactory is based upon the JSR-286 features, correct.
In Jetspeed we already supported Ajax based requests (just AFAIK Liferay does) and for that we also allow/support setting ServletResponse headers (just as ResponseType, etc.)
So, in Jetspeed it was rather easy to implement the ResourceURL handling internally.
For Liferay you really need to investigate their custom url//request handling for Ajax stuff etc. and see if/how you can piggy-back the ResourceURL handling on top of that.
I would at least expect Liferay support some kind of proprietary url handling targetted at one portlet with full control over the response (as Ajax support needs).   

> Liferay portlet support
> -----------------------
>
>                 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
>
>         Attachments: patch-jira-wicket-1132.patch
>
>
> 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&amp;p_p_action=1&amp;p_p_state=normal&amp;p_p_mode=view&amp;p_p_col_id=column-1&amp;p_p_col_count=1&amp;_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.


[jira] Updated: (WICKET-1132) Liferay portlet support

Posted by "Ate Douma (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ate Douma updated WICKET-1132:
------------------------------

    Fix Version/s:     (was: 1.3.0-rc3)
                   1.3.1

Rescheduling this issue to version 1.3.1 (for now) on indication of the issue reporter Thijs as it seems the portlet support is "stonewalled" by technical issues of Liferay itself at the moment.

> Liferay portlet support
> -----------------------
>
>                 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.1
>
>         Attachments: patch-jira-wicket-1132.patch
>
>
> 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&amp;p_p_action=1&amp;p_p_state=normal&amp;p_p_mode=view&amp;p_p_col_id=column-1&amp;p_p_col_count=1&amp;_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.


[jira] Commented: (WICKET-1132) Ajax link is different from normal link on Liferay Portal

Posted by "Thijs Vonk (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12544444 ] 

Thijs Vonk commented on WICKET-1132:
------------------------------------

There is 1 more issue 
3. The WicketExamplesMenuPortlet doesn't work. It will load and display it's content, but when you click a link, nothing happens. 

Still trying to figure it all out, but I could use a few pointers at where I should look :).

> 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&amp;p_p_action=1&amp;p_p_state=normal&amp;p_p_mode=view&amp;p_p_col_id=column-1&amp;p_p_col_count=1&amp;_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.


[jira] Updated: (WICKET-1132) Ajax link is different from normal link on Liferay Portal

Posted by "Thijs Vonk (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thijs Vonk updated WICKET-1132:
-------------------------------

    Summary: Ajax link is different from normal link on Liferay Portal  (was: Ajax link is differtent from normal link on Liferay Portal)

> 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
>
> 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&amp;p_p_action=1&amp;p_p_state=normal&amp;p_p_mode=view&amp;p_p_col_id=column-1&amp;p_p_col_count=1&amp;_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.