Css HtmlPanelGrid.setRowClasses()存在问题
我还有一个问题!我正在尝试从bean配置HtmlPanelGrid。我将panelGrid绑定到这个bean,并希望设置css行类。 以下是me stylesheet.css:Css HtmlPanelGrid.setRowClasses()存在问题,css,jsf,Css,Jsf,我还有一个问题!我正在尝试从bean配置HtmlPanelGrid。我将panelGrid绑定到这个bean,并希望设置css行类。 以下是me stylesheet.css: .list-row-even { background-color: silver; } .list-row-odd { background-color: red; } 我的jsf页面: <rich:tab label="Top-List" id="screenTop"> <
.list-row-even {
background-color: silver;
}
.list-row-odd {
background-color: red;
}
我的jsf页面:
<rich:tab label="Top-List" id="screenTop">
<h:panelGrid id="topListTable" binding="#{chartBean.topListTable}" />
</rich:tab>
还有我的豆子:
public TopListChartWrapper(Iterator<Entry> treeIt) {
this.grid = new HtmlPanelGrid();
//this.grid.setBgcolor("yellow");
this.grid.setColumns(2);
this.grid.setBorder(0);
this.grid.setCellpadding("0");
this.grid.setCellspacing("0");
this.grid.setWidth("100%");
this.grid.setRowClasses("list-row-even, list-row-odd");
this.treeIterator = treeIt;
this.prepareGrid();
}
有什么想法吗?也许我需要在某个地方注册我的样式表
谢谢 对不起-忘了这个问题 我找出了问题所在: 我需要更换线路: link href=。/css/default.css rel=样式表类型=文本/css 关于这一点:
谢谢 你忘了告诉我这个问题。啊,样式表没有加载。以后请你更清楚这个问题。我是这里的新生儿吗?我怎样才能把这个问题设为答案? link href="#{facesContext.externalContext.requestContextPath}/css/default.css" rel="styleSheet" type="text/css"/