TouchKit Theme Customization Issues

I am unable to get the customizations to a theme to load the first time the application is invoked. Please help! Each time the application is launched for a new Session, no theme customizations show. If the application is restarted via ?restartApplication, the customizations go away. Once the application has been launched and then the page refreshed - the customizations show. I have been banging my head against this for what seems like weeks and nothing seems to make sense.

Is there anyone who can assist me here? Is it a bad idea to try to change the theme for the touchkit add-on? Again, theme customizations work - but NEVER on the initial application launch. I have followed the themeing instructions time and time again to no avail and have set up new projects as tests and now I am hoping against all hope that someone here can answer. My company has bought licenses for touchkit and we are seriously considering trashing the project and moving to dedicated iOS development due to theme and navigation issues. We would prefer to develop in Java, but this minor roadblock has become a source of frustration and pain and is a serious delay to our project.

Here is what we have done:

Created a new theme inheriting from the …/base/styles.css

We are using the TouchKitApplicationServlet.

We call setTheme(“our-theme”) immediately upon application launch.

We are using AppFoundation, FormBinder, and MultiButton addons in addition to TouchKit.


Hard to say what is wrong exactly without access to your app. TouchKit’s CSS files are loaded with rather new GWT feature called resource bundles. My wild guess is that maybe those and your own theme customizations gets loaded in random order depending on how the app is loaded? If this is the case it should be solvable by just using a stronger selector.

Another guess is that your setting the theme too late. If you are using theme in your top level windows (and sub class Window) you are safe if you set the theme in the constructor. If you are using “application level” setTheme call, you should call it in init or even preferably in the constructor. If called in the onBrowserDetailsReady function it is too late as the “host html page” containing links to CSS files is already sent to client.


BTW. We have a Pro Account service via you can contact our Vaadin experts directly. This way you can get your issues quickly solved instead of banging your head towards to wall.
Go for pro.

Thank you so much. I knew it had to be something simple…

I am pretty familiar with CSS and it was such a pain to see that the changes weren’t being carried forward. I very much appreciate your assistance.

It was the case that setTheme() was being called in onBrowserDetailsReady().