【发布时间】:2012-07-30 13:56:56
【问题描述】:
我使用 Tabris 编写了一个 Web 应用程序。我在 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);
如果我这样做,当我刷新浏览器时,我的 css 文件中定义的样式不会被应用。仅在第一次应用(重启服务器并打开 Web 应用程序后)。
请查看完整的源代码here。它使用 default.css 文件的副本。 请参阅this picuture。
很有意思的是没有出现刷新问题,如果我使用这样的默认主题:
//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);
期待您的回答。
【问题讨论】:
标签: eclipse-rap tabris