Question

I wrote a web application using Tabris. I set the style of the application myself using following lines in the ApplicationConfiguration:

application.addStyleSheet("SandboxTheme", "sandbox.css");
application.addStyleSheet("SandboxTheme", "sandbox-table.css");
Map<String, String> properties = ImmutableMap.of(WebClient.THEME_ID, "SandboxTheme");
application.addEntryPoint("/sandbox", EntryPoint.class, properties);

If I do it likes this, I have the situation that the style defined in my css files are not applied when I refresh the browser. It is only applied the first time (after restarting the server and opening the web application).

Please see the full source code here. It uses a copy of the default.css file. And please see this picuture.

Very intersting is that the refresh problem does not appear, if I use the default theme like this:

//application.addStyleSheet("SandboxTheme", "sandbox.css");
//application.addStyleSheet("SandboxTheme", "sandbox-table.css");
application.addStyleSheet(RWT.DEFAULT_THEME_ID, "sandbox-table.css");
//Map<String, String> properties = ImmutableMap.of(WebClient.THEME_ID, "SandboxTheme");
application.addEntryPoint("/sandbox", EntryPoint.class, null);

Looking forward to your anwers.

Was it helpful?

Solution

This sounds strange. I guess this is a tabris bug. Without further investigation I can only guess what the problem is. I have opened a Tabris issue to track it down, see https://github.com/eclipsesource/tabris/issues/13

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top