我有一个CellList,我想设置它的样式。我想要更改光标样式,即选定单元格的丑陋颜色。我检查了几个关于堆栈溢出的问题和讨论,但没有一个有效。我检查了一下这个:
How do I style a gwt 2.1 CellTables headers?
这是我的代码:
public interface CellListResource extends CellList.Resources {
public static CellListResource INSTANCE = GWT.create(CellListResource.class);
interface CellListStyle extends CellList.Style {
}
@Source({CellList.Style.DEFAULT_CSS, "CellTableStyle.css"})
CellListStyle style();
}
public SearchViewImpl() {
CompanyCell companyCell = new CompanyCell();
//it doesn't work :S
companiesList = new CellList<Company>(companyCell, CellListResource.INSTANCE);
rootElement = ourUiBinder.createAndBindUi(this);
loadingImage.setVisible(false);
}我是不是遗漏了什么?我清除了浏览器缓存,重启了服务器,F5 ....F5 (一次又一次地按刷新),什么也没有...!提前感谢您的帮助。
发布于 2012-11-27 12:47:25
确保注入css资源。
CellTableResources.INSTANCE.cellTableStyle().ensureInjected();
myCellTable = new CellTable<T>(Integer.MAX_VALUE,CellTableResources.INSTANCE);你可以点击下面的链接
发布于 2013-06-12 05:44:43
除了注入CSS之外,调用样式cellListStyle()而不仅仅是CellListStyle ()也很重要:
public interface CellListResource extends CellList.Resources {
public static CellListResource INSTANCE = GWT.create(CellListResource.class);
interface CellListStyle extends CellList.Style {}
@Override
@Source("cellListStyle.css")
CellListStyle cellListStyle();
}然后你就做了
CellListResource.INSTANCE.cellListStyle().ensureInjected();
companiesList = new CellList<Company>(companyCell, CellListResource.INSTANCE);https://stackoverflow.com/questions/11700458
复制相似问题