Hi.
Last year I developed an application using Vaadin 6.x which made use of PortletEvents, and managed to make it work on WebSphere Portal.
To send the events, I used the following code:
PortletApplicationContext2 ctx = (PortletApplicationContext2) mainWindow.getApp().getContext();
ctx.sendPortletEvent(mainWindow, new QName(nameSpace, eventName), data);
And to receive them, I used a class that implemented PortletListener, and added it like
PortletApplicationContext2 ctx = (PortletApplicationContext2) getContext();
ctx.addPortletListener(this, new XYZListener());
Now, I need the same functionality with Vaadin 7, but so far, PortletApplicationContext2 seems to be unavailable, and while I can access the method sendPortletEvent through VaadinPortletSession, this class has been deprecated.
VaadinPortletSession portletsession = (VaadinPortletSession) VaadinSession.getCurrent();
The class PortletListener seems to be available, but the method to add the listener is also available through VaadinPortletSession, which could be removed in any future version of Vaadin.
What is the Vaadin 7 way to handle events in portlets? I checked VaadinPortlet and VaadinPortletService and can’t find any method similar to sendPortletEvent, which class should be used instead of PortletApplicationContext2 or VaadinPortletSession?