0
我將richfaces 3.x應用程序遷移到4.x,在數據表上我需要添加未內置的排序功能,我添加了排序功能,但我需要爲排序設置圖標功能,我如何從richfaces組件ui jar中選擇圖標?我應該在項目中放置新的圖標,然後訪問它。RichFaces排序圖標
<rich:dataTable id="showsEventsTable">
<rich:column sortable="true" selfSorted="true"
sortBy="#{show.name}" sortorder="SortOrder.ascending" sortOrder="#{sortingBean.showNameOrder}">
<f:facet name="header">
<a4j:commandLink value="Show Name" render="showsEventsTable" action="#{sortingBean.sortByShowName()}"
styleClass="sortingColumn" status="waitStatus">
<span styleClass="#{sortingBean.sortOrder}"/>
<h:graphicImage value="??(what should go here if am accessing richfaces components jar)" library="org.richfaces"/>
</a4j:commandLink>
</f:facet>
<h:outputText value="#{show.name}" />
</rich:column>
</rich:dataTable>
在CSS文件
.ascending{
background-image: url("imgpath");
}
.descending{
background-image: url("imgpath");
}
.unsorted{
background-image: url("imgpath");
}
我的應用程序不會被遷移至4.5,好吧,我會將圖標添加到應用程序並嘗試使用它們。謝謝。 –
我添加了一個並且在css文件中,我有三個不同的類,其中三個圖像的值來自bean.sortOrder,但仍然不起作用。 –
你的答案工作絕對好,謝謝你的及時幫助。 –