Foros de discusión

ActionURL problem

thumbnail
Isabela Beckers, modificado hace 12 años.

ActionURL problem

New Member Mensajes: 13 Fecha de incorporación: 23/11/11 Mensajes recientes
Hello everyone,

i have got two portlet.
in my first portlet i include a second portlet's page. but i cant use second portlet's action method.

its trying to call from the first. how can i call other portlets action method.

Thanks.
thumbnail
Ravi Kumar Gupta, modificado hace 12 años.

RE: ActionURL problem

Liferay Legend Mensajes: 1302 Fecha de incorporación: 24/06/09 Mensajes recientes
You should use IPC, Inter portlet communication..
thumbnail
Ravi Kumar Gupta, modificado hace 12 años.

RE: ActionURL problem

Liferay Legend Mensajes: 1302 Fecha de incorporación: 24/06/09 Mensajes recientes
See this link should help you.

http://java.sun.com/developer/technicalArticles/J2EE/sdk_portletcontaineru5/

From portlet A you can send an event and receive it in Portlet B. emoticon

HTH
thumbnail
Sandeep Nair, modificado hace 12 años.

RE: ActionURL problem

Liferay Legend Mensajes: 1744 Fecha de incorporación: 6/11/08 Mensajes recientes
You can make use of liferay portlet actionURL tag to call the action of another portlet something like below

<liferay-portlet:actionURL portletName="abc" />

Replace abc with name of portlet

A war named "test-portlet" having a portlet with the name test_portlet" will have an fully qualified name as

test-portlet_WAR_testportlet

Again if it has a instance that instance id must also be attached for example if the above portlet is instanceable and it has instance id _INSTANCE_ABCD

then portlet name should be
test-portlet_WAR_testportlet_INSTANCE_ABCD


Regards,
sandeep
thumbnail
Isabela Beckers, modificado hace 12 años.

RE: ActionURL problem

New Member Mensajes: 13 Fecha de incorporación: 23/11/11 Mensajes recientes
Thank you Sandeep. my problem was resolvedemoticon
thumbnail
Isabela Beckers, modificado hace 12 años.

RE: ActionURL problem

New Member Mensajes: 13 Fecha de incorporación: 23/11/11 Mensajes recientes
i have got another problem.

i have defined returning url in second portlet's method

response.setRenderParameter("jspPage", "/web/secondPortletspages/anotherPage.jsp")

but page didnt go this URL. it was working on portlet2.

what should i do?
thumbnail
Sandeep Nair, modificado hace 12 años.

RE: ActionURL problem

Liferay Legend Mensajes: 1744 Fecha de incorporación: 6/11/08 Mensajes recientes
Sorry i dont think i understood the problem very well.

In your portlet A , there is a link to portlet b's portletAction, which now is working

Now in portlet B's portlet action you have specified which view it should forward to, by setting jspPage parameter but its not redirecting to that page. Is that what your problem is?

Regards,
Sandeep
thumbnail
Isabela Beckers, modificado hace 12 años.

RE: ActionURL problem

New Member Mensajes: 13 Fecha de incorporación: 23/11/11 Mensajes recientes
i am sorry about my englishemoticon

In my portlet A , I include portlet b's page. and now can reach to portlet b's action.

but when returning from portlet b's action i didnt get the portlet b's page.
thumbnail
Sandeep Nair, modificado hace 12 años.

RE: ActionURL problem

Liferay Legend Mensajes: 1744 Fecha de incorporación: 6/11/08 Mensajes recientes
I see. Is it possible for you to attach the portlet

Regards,
Sandeep
thumbnail
Isabela Beckers, modificado hace 12 años.

RE: ActionURL problem

New Member Mensajes: 13 Fecha de incorporación: 23/11/11 Mensajes recientes
I did not write more code.


<liferay-portlet:actionurl name="methodName" portletname="BPortlet_WAR_Coreportlets" var="var1"></liferay-portlet:actionurl>


in A portlet

<aui:form name="Form" action="<%=var1.toString()%>" method="post">
.
		<aui:button type="submit" value="Next" name="Next" />
</aui:form>


B's Action method

public void methodName(ActionRequest request,
			ActionResponse response) throws PortalException, SystemException {

		response.setRenderParameter("jspPage", "/web/secondPortletspages/Bportletspage.jsp")
	}


normally if i use this action on B portlet, it is returning Bportletspage.jsp..
I hope explained clearly
thumbnail
Nagendra Kumar Busam, modificado hace 12 años.

RE: ActionURL problem

Liferay Master Mensajes: 678 Fecha de incorporación: 7/07/09 Mensajes recientes
It's weird - I hope it should work in both the cases
thumbnail
Sandeep Nair, modificado hace 12 años.

RE: ActionURL problem

Liferay Legend Mensajes: 1744 Fecha de incorporación: 6/11/08 Mensajes recientes
Is it possible for you to place plid of the target page in which portlet b is there

<liferay-portlet:actionurl name="methodName" [b]plid="targetPagesPlid" [ b] portletname="BPortlet_WAR_Coreportlets" var="var1"></liferay-portlet:actionurl>
thumbnail
Juan Carrey Labarta, modificado hace 12 años.

RE: ActionURL problem

Junior Member Mensajes: 31 Fecha de incorporación: 15/08/11 Mensajes recientes
I think you are trying to render a jsp that resides under portlet A when an action on portlet B is performed. Is that right ?
thumbnail
Nagendra Kumar Busam, modificado hace 12 años.

RE: ActionURL problem

Liferay Master Mensajes: 678 Fecha de incorporación: 7/07/09 Mensajes recientes
Can you provided directory structure of the portlet where you have anotherPage.jsp & which portlet it belongs to PortletA or PortletB