Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Kamesh Sampath
Liferay and Vaadin Theme Sharing
July 3, 2012 6:43 PM
Answer

Kamesh Sampath

Rank: Regular Member

Posts: 159

Join Date: May 26, 2010

Recent Posts

Hello,

I am developing an Liferay Portal application with Vaadin as the UI framework. I am kind of creating themes and want to know how to know if there is a way to share the themes between Vaadin and Liferay ?

All I see now is that I can create a theme in Vaadin and make its styles.css import custom.css from my liferay theme ?

If any one has tried it please let me know HOW-to, tips/tricks if any ?

~Kamesh
David H Nebinger
RE: Liferay and Vaadin Theme Sharing
July 3, 2012 7:32 PM
Answer

David H Nebinger

Rank: Liferay Legend

Posts: 7004

Join Date: September 1, 2006

Recent Posts

The two don't mix well...

Liferay uses it's own set of classes for the style constructs, and Vaadin uses it's own.

The other problem that you have is the difference in how the themes are loaded. The portal loads the Liferay theme and applies it to the page. Vaadin, through the magic of the GWT side of the house (I think), loads the Vaadin theme separately. They really don't share context, files, styles, or anything.

If you check out the /html/VAADIN/themes/liferay/styles.css, you'll see that the Vaadin folks basically just stole the style information from the classic theme and used it to decorate the appropriate Vaadin-based styles.

We tried initially intermingling the two by defining our own style classes in our Liferay theme and adding the style names to the Vaadin widgets, but the Vaadin widgets never would hook up to the right class from the Liferay theme.

We eventually decided it wasn't worth our time trying to figure out and basically treat the two themes (Liferay and Vaadin) as separate projects and manually keep them in sync.
Kamesh Sampath
RE: Liferay and Vaadin Theme Sharing
July 4, 2012 11:08 AM
Answer

Kamesh Sampath

Rank: Regular Member

Posts: 159

Join Date: May 26, 2010

Recent Posts

I too had the same thought. I guess it better to maintain them as separate. Thanks for your thoughts.
Eric Smith
RE: Liferay and Vaadin Theme Sharing
July 22, 2013 1:19 PM
Answer

Eric Smith

Rank: Junior Member

Posts: 58

Join Date: August 28, 2012

Recent Posts

We're maintaining our themes separately as well. We have our Liferay theme in a standard Liferay project (using Liferay Dev Studio). Right now we just manually put our Vaadin theme in ROOT/html/VAADIN/themes/, which isn't great for source control, multiple developers and environments.

How are you managing your Vaadin theme? I saw in a different post that David has his in a Liferay hook, but I don't understand how that can be accomplished.

Eric
David H Nebinger
RE: Liferay and Vaadin Theme Sharing
July 23, 2013 6:09 AM
Answer

David H Nebinger

Rank: Liferay Legend

Posts: 7004

Join Date: September 1, 2006

Recent Posts

Treat it as a JSP hook; you're basically replacing a file in the Liferay environment w/ an override file in your hook. That way the hook project can have the Vaadin theme, is part of the SDK, and can be placed under revision control.
Jack Bakker
RE: Liferay and Vaadin Theme Sharing
July 23, 2013 11:09 AM
Answer

Jack Bakker

Rank: Liferay Master

Posts: 598

Join Date: January 3, 2010

Recent Posts

Cool idea, thanks David