Vaadin vs. Oracle WebCenter

Hi everybody,

I recently encountered a problem with the Vaadin portlet support when using it in scope of Oracle WebCenter (i.e. via the WSRP addon). As a result of this problem, triggering portlet events (and possibly actions) via the JSR268 API seems to become more or less impossible from within a Vaadin-based WSRP portlet producer.

What I found is this:

  • All major (UUID) communication between portlet producer and consumer gets modelled as a so-called WSRP “resource” url/request (fine with me!)
  • According to the JSR268 specification, triggering a portlet event is only permitted from within an “action” not “resource” request. To work around this limitation, the Vaadin com.vaadin.terminal.gwt.server.PortletApplicationContext2#sendEvent currently schedules a “dummy” portlet action pointing back to the current portlet itself, from whose handler it then proceeds with delivering the original portlet event (ok, so far!).
  • For that dummy portlet action request to be triggered correctly, the PortletApplicationContext2 class currently asks a Vaadin window instance to “open” a specially prepared ExternalResource (one that will trigger the portlet action request when navigated to).
  • The URL of that ExternalResource gets rewritten by the portlet consumer (i.e. WebCenter) before being handed-back to the browser from which originated the HTTP request (i.e. required by the JSR268 specification).
  • UNFORTUNATELY, it seems that simply navigating the browser to that particular rewritten URL (e.g. by setting window.location, like the GWT Window component does) is NOT enough to trigger the underlying action request. Instead, WebCenter seems to require that change of location to be made via a special JavaScript function, namely one that is generated automatically (by WebCenter or ADF) on a per-portlet basis (I assume this is to prevent CSRF attacks, etc.):
function adfpp2021620615_handleLocationChange(url)
    var form = document.forms["f1"]
.value = "true";
.value = "none";
.value = url;
    if (isURLForCurrentPage(url, form.action))
        window.location.href = url;
    return false;

Long story short, my question is this: How can I make the Vaadin and/or GWT Window component/widget respect this requirement and also delegate all attempt to change window.location to these particular functions instead of doing that directly? Has anyone else here ever tried to use portlet events while working with Oracle WebCenter as a portlet container?

Thanks in advance,


I am trying to create vaadin portlet and deploy it in OWC. Can you please describe the steps to create vaadin portlet with WSRP ?