Themes not working in Liferay

I am having trouble getting themes to work in Liferay. I have the temes installed under ROOT/html/VAADIN, and a portal-ext.properties file under \ROOT\WEB-INF

The properties are as follows:

# Path under which the VAADIN directory is located.
# (/html is the default so it is not needed.)
vaadin.resources.path=/html

# Portal-wide widget set
vaadin.widgetset=com.vaadin.portal.gwt.PortalDefaultWidgetSet

# Theme to use
vaadin.theme=reindeer

My buttons are showing up as just labels, yet they still function as buttons.

Any Suggestions?

Thanks

Update:

Using this.getTheme() in the Application has shown me that the current theme is null. I need to figure out how to have the theme set as the default for the portal. Any suggestions? I’m going to keep at this, but any help is appreciated.

I have also tried putting the portal-ext.properties under \ROOT\WEB-INF\classes. My assumption is that the portal is not finding or checking for this properties override file, but I can’t figure out a way to verify.

UPDATE: I was able to verify via the server logs that the properties file is being used in the configuration.

Which Vaadin version are you using? Are you sure your theme and widgetset resources match the version of Vaadin.

I would recommend trying the
Vaadin Control Panel for Liferay
to upgrade the Vaadin version in the portal and recompile the widgetset.

I currently do have the Vaadin Control Panel installed, and have updated and complied widget set for 6.7.0. I did get the theme working, but am not sure why. Here are a few questions that I have that might help me understand why it is now working.

  1. Is it necessary to do setTheme(“themename”) in the Application init() method? I thought that it would be defaulted to what the Liferay portal had specified in the portal-ext.properties file, but it didn’t seem to do that.

  2. Is it necessary to have the themes built in your .war file under …/VAADIN/themes/themename?

  3. After setting the theme, and putting the themes in the .war, the themes have started working. The only issue is that i’m not sure if it is using the ones in the ROOT/WEB-INF/html on the server, or the ones in the .war. I would like it to use the ones provided int the /html folder as I am going to develop multiple portlets using Vaadin, and want a consistent style which is modified in only one directory.

Thanks

So I got the theme working consistently now. I haven’t taken the time to find the root cause of the problem, but it sees to be a combination of two issues.

  1. Related to launching the Liferay 6 bundle on Tomcat out of the Eclipse Liferay IDE.

  2. All the themes in the server html directory had 0kb .png files. I extracted the themes from the vaadin jar and placed them over the old directory and that seemed to fix the issue. (This explains why the button images were not showing up.)

Hi,

I was using Liferay control panel 0.9.0 with a vaadin 6.5.4 version and it was well.

I installed yesterday the new control panel (1.0.0) in order to upgrade to 6.7.1 version.
I also changed vaadin jar in portlet and recompiled the widgetset, as suggested.

I have the same issue. My theme is not considered and my portlet is printed without Vaadin stylesheet.

Edit : I have the same problem with 0kb resources in theme.

Is it a known issue of the new Liferay control panel ? I really apreciated to be able to upgrade with a simple clic but maybe it is not as magical as it appeared ?

Yeah, I think this might be a bug, but am not sure. Try what I did above to fix the 0kb issue:

I did it yesterday as you said and it worked.

I also think it’s a bug.

This issue has been fixed in version 1.0.1 of the Vaadin Control Panel for Liferay which was uploaded to the directory a couple of minutes ago.

The new version can be downloaded from
https://vaadin.com/directory#addon/vaadin-control-panel-for-liferay