I seem to be unable to get my own theme up and running in my Vaadin-Liferay-portlet.
An entier day of browsing the web & several fora have not solved my issue. I have tried numerous things though.
1/ I have the themefolder & css in my project within this folder: src/main/webapp/VAADIN/themes
2/ I have the same themefolder & css copied into this folder on my local tomcat/liferay installation: …\liferay-portal-6.0.6\tomcat-6.0.29\webapps\ROOT\html\VAADIN\themes
3/ the content of my personal (and VERY impressive ) css is here:
6/ The regular themes are in fact installed in my tomcat/liferay installation.
7/ I am using vaadin 6.7.1 & liferay 6.0.6
And I do not see any changes in my portlet…
any ideas anyone?
As a sidenote, I want to modify the appearance of a non-editable textfield.
What I want to try to do is set the textfield as not enabled (setEnabled(false)) and then through CSS modify the ‘graying-out’ of this field. Any suggestions for this are welcome as well
calling setTheme(String) should always have some effect. If you call it on a theme that it can’t find, the application should look completely broken (and I mean completely) and you should get this message into the log/console:
INFO: Requested resource [VAADIN/themes/aporj/styles.css]
not found from filesystem or through class loader. Add widgetset and/or theme JAR to your classpath or add files to WebContent/VAADIN folder.
I used setTheme(“aporj”); which was the result of keyboard bashing and is a theme that I don’t have
If you’re app looks fine, like the standard reindeer, then the line is not getting through, or then your one theme statement doesn’t have an effect for some reason.
I’d recommend temporarily changing @import “…/reindeer/styles.css”; to @import “…/runo/styles.css”;. then you’d at least see a distinct difference when your own theme kicks in.
Do you have some other Vaadin portlet deployed also? You cannot have two different themes overriding base css classes since those css files are loaded basically to the same html page.
@Johannes: No, I have no other portlets deployed at this point, so that can’t be the problem I think.
@Jens: Tried it and I didn’t see any real change… Though I must admit that the look & feel doesn’t really look like Runo nor Reindeer… I do notice there is a ‘liferay’ theme present as well… could that be the reason?
I noticed while testing the project you sent me earlier and then creating one myself similar to your example, that ROOT/html/VAADIN/themes/reindeer/styles.css is an empty file. Do you have the same? I was using Vaadin ControlPanel for Liferay. Are you using it also?
my reindeer/styles.css is not empty in my liferay installation.
Not using Control Panel for Liferay, just using the default liferay & tomcat bundle that is available on the liferay website.
Still puzzled…
Gonna try & get Firebug working now and see what gives
So I had a look at my portlet in Firefox & checked it with Firebug. I’m a bit worried now…
The layout in Firefox is completely messed up. Basically the ‘absoluteLayout’ created with the WYSIWYG editor that comes with Vaadin is ignored and it just seems to use a VerticalLayout all the way.
The ‘setReadOnly(true)’ seems to work in Firefox, but not in Chrome nor IE
Still no real changes to be seen due to the modifications made in my own Theme. Although I do see the theme name as being the correct one in Firebug
I find that Chrome is really quite aggressive with it’s caching of stylesheets; I usually find a hard refresh (i.e. Shift + Click on refresh icon) updates the css in the browser.