Liferay 6.0 widgetset compatibility issue

Hi
I am developing liferay 6.0 portlets and I am currently using the latest release of Vaadin i.e 6.4.6. According to Liferay documentation liferay 6.0 supports Vaadin as standard. But I cannot use the new features in Vaadin 6.4.6 such as Table column footer and header click because apparently Liferay has a widgetset which was built with an older version of vaadin i.e 6.3.4. I found that out by using vaadin debug mode. This is the warning I received…

The same application works fine in a stand alone servlet.
How can I use the latest vaadin features in a liferay portlet? Or will I always be dependent on the vaadin release used in building the liferay widgetset?

Regards
Nabeel

When upgrading the Vaadin version in Liferay, you also need to upgrade the widgetset and themes.

For Vaadin 6.4.6, you can find a pre-packaged ZIP with the required themes and widgetsets in
http://vaadin.com/download/release/6.4/6.4.6/other/vaadin-6.4.6-liferay.zip
so there is no need to collect/compile these yourself unless you use extra client side widgets not in the default widgetset.

Briefly (assuming the default Tomcat directory structure), replace webapps/ROOT/WEB-INF/lib/vaadin.jar with the latest (renaming it to “vaadin.jar” without a version number) and replace webapps/ROOT/html/VAADIN (or parts of it if you have added something there yourself) with the contents of the ZIP file.

Vaadin 6.4.6 also has a new theme called “liferay”, matching the look of AlloyUI - you can enable it as the portal-wide default Vaadin theme by adding the line “vaadin.theme=liferay” in portal-ext.properties.

There will soon be a portlet that makes using add-ons with custom widgets and compiling a custom widgetset on the portal easier.

Thanks for the quick response. That fixed my problem.
But why does vaadin have to use a shared widgetset and themes with liferay? IMHO wouldn’t it be better if each portlet came with its own widgetset? That way developers could deploy portlets on a liferay server from the liferay control panel even if they don’t have access to its filesystem.

It is possible for a portlet to define its own CSS rules from within the portlet, e.g. with the header-portlet-css in liferay-portlet.xml refering to a CSS-file in the portlet docroot/css directory - these will be applied in addition to the rules from the theme. This is not using the theme mechanism of Vaadin, though, so e.g. ThemeResource is not available for anything outside the standard themes.

Why it is strongly recommended that portlets do not use their own widgetsets is that you cannot run multiple portlets using different widgetsets on the same page. Managing the widgetset will get much easier with the widgetset compilation portlet - you’ll just need to drop the Vaadin add-ons used by any Vaadin portlet to a shared directory on the portal and click “compile widgetset”, and you’ll have a widgetset that can be used by all the portlets.

There is
an enhancement request
to investigate better methods for including themes (and widgetsets) in a (JSR-286) portlet. With portlet 1.0 (JSR-168), serving the theme from the portlet would not be a problem as there is a servlet behind the portlet.

Hi, Where or When should I get this nice bundle of vaadin themes, jars and widgetset for version 6.5?
Thanx a lot

For the pre-release 6.5.0.pre1: You can get
vaadin-6.5.0.pre1.jar
and
a ZIP with all the resources for Liferay
from
here
.

Follow the instructions
here
for installing them. If you are running Liferay 6.0.5, it is enough to replace vaadin.jar on the portal and replace the resource directories under VAADIN that are present in the ZIP with the extracted ones. For older Liferay versions, some more configuration in portal-ext.properties might be necessary.

If you are planning to use Vaadin add-on widgets, I would strongly recommend you also install
Vaadin Control Panel for Liferay
.

Great, many thanx!
Everytime I am amazed of speed of your answers!
That’s great!

Ok, it worked, I needed to copy:


vaadin.jar, gwt-user.jar, gwt-dev.jar
into
WEB-INF/lib

and
VAADIN
dir into
ROOT/html

to be able to compile widgetsets using that special Vaadin Control Panel portlet.

There is only one thing, this portlet doesn’t show correct vaadin version!
Where does it take it form? Some portal jar? (some property file inside?)…

Hi Henri,
is this prerelease version available through some Maven repository?
I know we can install localy from zip :slight_smile: but anyway.

Sure - in Maven central (and elsewhere) with the version number 6.5.0.pre1 .

Sorry, I didn’t find it through http://mvnrepository.com. Ibiblio mirror doesn’t contain it yet. But finally I found it here: https://repository.sonatype.org/content/groups/public/com/vaadin/vaadin/6.5.0.pre1/

The versions are immediately available at repository.sonatype.org and usually within an hour or so in Maven Central, but I have found replication from there to mvnrepository.com and some other mirrors can take days. This is not specific to Vaadin as far as I can tell.

I don’t think it’s specific to Vaddin, I am just pointing out it’s not synchronized.
For those who are interested, this is our Nexus setup: