Actually, GateIn currently doesn't use serveResource to process AJAX actions of portlets. To make an actions with ajax call, add "ajaxRequest=true" query parameter to your action url --> only the portlets that is triggered processAction or processEvent will be rerendered. Your portlet response will be wrapped in a predefined structured xml document, and then portal JS (PortalHttpRequest.js in eXoResources.war) will find and update your portlet html on the page
I think the easiest way is to use WebUI framework that come with GateIn (you should reference an example portlet : GateIn/testsuite/webuibasedsamples)
Thanks for your quick response Vu, i would love make this ajax feature work.
I created in a simple jsp this action URL, with the ajaxRequest=true parameter
<portlet:param name="action" value="event"/>
<portlet:param name="ajaxRequest" value="true"/>
When this actionURL is triggered, in the processAction method i log the request parameter map and i can confirm that it contains the ajaxRequest=true parameter. However even with this parameter, there is a full page render and i still read in the catalina log:
Apr 25, 2012 12:43:53 AM org.exoplatform.portal.webui.application.UIPortletActionListener$ProcessEventsActionListener execute
INFO: Events were generated outside the scope of an AJAX call, hence will make a full render of the page
I may have something more to setup to make it work?
My portlet must run on several portals, so i should not be able to use the gatein WebUI framework: i try to make it work only with the JSR 286 api and jQuery.