Fórumok

How to set the Action defined in struts.xml to PortletURL

Kiran Jai, módosítva 12 év-val korábban

How to set the Action defined in struts.xml to PortletURL

Junior Member Bejegyzések: 38 Csatlakozás dátuma: 2012.04.09. Legújabb bejegyzések
Inside the JSP Page i have this for making a AJAX Request within Liferay

PortletURL portleturl = response.createRenderURL();
portleturl.setWindowState(LiferayWindowState.EXCLUSIVE);

I will pass this portleturl as a url to the below JQuery function


jQuery.ajax({
type: "POST",
url: portleturl ,
success: function(msg){
alert( "Data Saved: " + msg );
}});

This is my action mapping inside the struts.xml file


<action name="helloForm" class="com.action.Struts2Action">
<result name="input">/WEB-INF/view/index.jsp</result>
<result name="success">/WEB-INF/view/result.jsp</result>
</action>

Now please tell me how do i set the action named helloForm to the portleturl ??