AJAX Inter-portlet communication
If you already tried the standard inter-portlet communication mechanism, you probably noticed your portal has to refresh the page when you send an event. It makes navigation less smooth as it could be with a full ajax communication, as described in this article. Check the 'storelet' live demo to see the difference between a standard portlet event and an ajax event. It is available in 2 versions:
- Storelet ajax events : selecting a report in the storelet does not refresh the whole page
- Storelet standard IPC events : selecting a report in the storelet triggers a page refresh
Client-side ajax eventing
How to send an ajax event
This call would synchronize reportlet windows present on the same page, with 2009 year and "1" view (year-to-date in demo reports). You must obviously build this query string with report parameters and values expected by your Birt reports. Furthermore, as you can see in the demo, "Back to previous report" toolbar option works perfectly with ajax events, whereas it is reinitialized by standard portlet events.
" object is defined as soon as at least a reportlet window is present on your portal page.
Getting parameters values from your input fields (on this example we are using jQuery to achieve that). If these values may contain special characters, you may need to encode them with "
- Building the query string: just concatenate parameters with "&" as a separator
- Sending this query string in an ajax event
If you already read the standard "inter-portlet communication" article, you may notice this html code below is very similar to the sample "processAction" java code.
You should always use alphanumeric values for parameter names and values when it is possible. But sometimes we won't have any other choice but dealing with special characters. A boolean argument allows to specifiy if parameters are encoded or not in a IPC message. By default, the framework considers it is encoded from v1.1.01
Your BIRT report actually receives ' hello #'
This time your BIRT report receives ' hello %23 '
11 April 2016
08 February 2016
06 November 2015
28 October 2015
26 October 2015
14 October 2015
08 October 2015
10 September 2015
07 April 2015
01 April 2015