我想为不同的行添加不同的样式,哪种方法最好?UiBinder FlexTable风格
我想这(它不工作,没有错误,但完全没有变化):
- 两个接口:
公共接口StatiscticsTableResources扩展ClientBundle {
public static final StatiscticsTableResources INSTANCE = GWT.create(StatiscticsTableResources.class);
@Source("StatisticsTableCss.css")
StatisticsTableCss css();
}
public interface StatisticsTableCss延伸CssResource {
String tableOddRow();
}
- THE CSS
.tableOddRow { 背景色:#aeaaa2; 颜色:蓝色; }
- APLLYING花柱
ftStatistics.getRowFormatter()addStyleName(I,StatiscticsTableResources.INSTANCE.css()tableOddRow()。)。
您是否检查过(例如,使用Firebug)该样式实际上是否已应用?您可以在CSS文件中将其标记为'@ external',以便GWT编译器不会混淆它的名称 - 使它更易于调试。 – 2010-03-04 01:13:14