0
votes

I'm working on a Liferay portlet with spring MVC portlet.

Is it possible to open new Jsp file or call render mapping method from resource mapping method?

1

1 Answers

0
votes

If you don't bother changing AJAX call to regular call, you can handle it nicely through processAction mapping, as after each action render mapping is automatically called. You can set render parameter(s) in action mapping and get in render mapping for conditional inclusion of view.

However, if you want to do it through AJAX call, you can handle redirection using javascript once the AJAX call is completed / failed. Liferay has provided javascript API to create dynamic URLs. You can create renderURL, set required parameters for it and change location of page as per your requirement.

For reference, you can see:
https://www.liferay.com/community/forums/-/message_boards/message/32061619 http://www.liferay.com/community/forums/-/message_boards/message/45486103 http://www.liferay.com/documentation/liferay-portal/6.2/development/-/ai/creating-portlet-urls-in-javascript-liferay-portal-6-2-dev-guide-07-en