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.
visioneoManagerIPC" 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'
Birt required / facultative parameters 11 April 2016
Document & rendering caches 08 February 2016
How to define reports access permissions 06 November 2015
How to define a portal repository 28 October 2015
Inter-portlet communication 26 October 2015
Server-side Autocomplete 14 October 2015
How to disable the load fragment window 08 October 2015
How to automatically adjust charts size 10 September 2015
How to hide parameters labels 07 April 2015
How to add reports & subfolders 01 April 2015
Birt reports compatibility 310914 Views
How to add reports & subfolders 303586 Views
How to build your own theme 288416 Views
How to modify reportlet styles 287069 Views
Inter-portlet communication 276430 Views
Document & rendering caches 273381 Views
Birt required / facultative parameters 263023 Views
Report data volume 262497 Views
Reports datasources: Stored Procedure vs SQL query 247243 Views
How to automatically adjust charts size 232602 Views