one GWT CssResource, two implementations (css files)
public interface ReviewPanelStyle extends CssResource {...}
@Source("BlueReviewPanelStyle.css")
ReviewPanelStyle BlueReviewPanelStyle();
@Source("YellowReviewPanelStyle.css")
ReviewPanelStyle YellowReviewPanelStyle();
We would think that this should work, however it does not.
The color of elements styled (regardless of weather associated with the Yellow or Blue css) will be styled based on the order of these two lines.
Resources.INSTANCE.YellowReviewPanelStyle().ensureInjected();
Resources.INSTANCE.BlueReviewPanelStyle().ensure开发者_StackOverflow中文版Injected();
As a work around I duplicated ReviewPanelStyle (ReviewPanelStyle2), but I rather not...any ideas?
Scoping of obfuscated class names is defined by the return type of the CssResource accessor method
Defining two separate interfaces for each style should do the trick. More information at http://code.google.com/webtoolkit/doc/latest/DevGuideClientBundle.html#Scope
精彩评论