In order to illustrate the flexibility of the framework, here we make use of the native Liferay "Web content" portlet to listen visioneo events, and update a simple multiselect widget accordingly. We can obviously do the same with any custom portlet application.
- See a similar example running a report instead of this dummy "Run stuff" action!
- See a similar example plugged to a server-side autocomplete parameter
How does it work?
From v1.4 we can attach an event ID to external parameters through portlet preferences. In the screenshot above we name it "event_municipality". Once an event is defined, each time the parameter has a new value it is broadcasted to other components on the same page.
How to catch these events from a custom portlet?
console.log(event); //run custom actions here!
This event object has a property "event.message" containing informations related to the parameter such name, value, label. For example: