Vaadin 14 Portlet Support release 1.0.0.beta5
Pre-releaseVaadin 14 Portlet Support release 1.0.0.beta5 is a beta release allowing development of Portlet applications based on Vaadin 14.
Changes since 1.0.0.beta4
Fixes
-
Fix uploading on Pluto portlets (#207)(#190)
Do not send extra url that gets partially duplicated. Update Pluto to 3.1.1 for security fixes. -
Copy headers from StreamResource to VaadinResponse (#203)
Copy all headers set on a StreamResource to VaadinResponse before writing contents. -
Support absolute URLs in PortletStreamResourceRegistry
Resource URL from MimeResponse can be either an absolute (e.g. in Liferay) or a relative URL.
For absolute URLs, PortletStreamResourceRegistry does not need to alter URL after resourceID is set. -
Ensure necessary scripts are loaded into page (#210)(#202)
In Liferay "Content Page" edit mode, Vaadin portlets are not directly added to the main page, but loaded into an iframe requesting the same page in preview mode, and then added to the main page through javascript, but they are detached from iframe before initialization is completed. This way, scripts needed to register the portlet web component are not added to the main document, so the webcomponent is not correctly rendered. This patch add an additional script to BootstrapHandler response that takes care to add needed script to main page and to postpone element registration until they are loaded. -
Not write UIDL sync message when RPC handling throws (#215)(#213)
Liferay container is so strict regards ServletResponse::setContentLength comparing to normal servlet containers and Apache Pluto portal, thus the PortalUidlRequestHandler works incorrectly in case of exception in the server-side listener: it writes the error meta info JSON into response, then appends sync UIDL JSON message, then calls setContentLength with the length of the sync UIDL message. Which in turn leads to an unpredictable JSON sent to client.
When this change is applied, UidlRequestHandler doesn't write sync UIDL message to the response once the RPC handler execution throws, but instead sends only an error message to the client.