Vaadin portlets, just as all Vaadin applications, use a widget set to render the user interface in the browser and to handle the Ajax communication with the server-side application. While regular Vaadin applications use a widget set for each application, in portals the widget set is shared by all Vaadin portlets running in the portal. Liferay actually comes preinstalled with a precompiled version of the default portal widget set. However, many add-on components come with their own widget set, which needs to be compiled into the portal widget set. The Vaadin Control Panel for Liferay automates this compilation. You can also use it to just install a new version of the Vaadin library.
Vaadin Control Panel for Liferay is available for download from Vaadin
Directory. It is a WAR package, which you need to simply drop into Liferay's
deploy
folder. Once the deployment is done, the Vaadin
Control Panel should show up in the Liferay Control Panel.
Open the Vaadin section in the Liferay Control Panel. The initial state with is illustrated in Figure 13.5, “Initial State of Vaadin Control Panel for Liferay”.
Liferay comes with Vaadin preinstalled. To upgrade the preinstalled version to a newer one, follow the following steps. Notice that the Vaadin library is upgraded for all Vaadin portlets, so they must all be compatible with the new version.
Click Vaadin Jar Version.
in theIn the warning dialog that appears, read the message and if you want to go on with the upgrade, click
to proceed.Recompile the widget set as instructed below.
Redeploy all Vaadin portlets in Liferay, that is, copy the
WARs to the deploy
folder in Liferay.
The Google Web Toolkit (GWT) libraries required for the widget set compilation are also upgraded automatically.
When you need to compile the widget set, follow the following steps:
Place any add-on Jars containing widget sets, such as add-on
Jars, in the WEB-INF/lib
folder of
Liferay. Its exact location depends on the used server; for
example in Tomcat it is under the
webapps/ROOT
folder.
Click Add-on Directory to detect any new add-on libraries.
in theSelect the add-ons which you wish to compile into the widget set.
Click
if the libraries require any special libraries and add them.Click
to compile the widget set. The compilation can take several minutes.The compiled widget set is copied automatically to the proper folder and taken into use.