问题
In the Code below, You can observe two things: 1) Default sorting is getting utilized. 2) Image based custom filter is used.
Problem I am facing : When I click on filter image default sorting is getting triggered. Need a way by which If I click on filter, default sorting doesn't get triggered. (This was achieved in Richface 3.3 by putting this custom filter in filter facet.)
Any help or hint would be greatly appreciated.
<rich:column sortBy="#{model.modVal}" label="Model Value"
sortable="true" id="modelVal" rendered="#{backingBean.renderMap['modVal']}">
<f:facet name="header">
<h:outputText value="Model Value" />
<h:graphicImage title="Filter"
value="#{backingBean.dataModel.modValFilter }">
<a4j:ajax event="click" render="filterCol"
execute="@form"
listener="#{backingBean.loadModalPanelData('modVal') }"
oncomplete="#{rich:component('filterCol')}.show()">
</a4j:ajax>
</h:graphicImage>
</f:facet>
<h:outputText value="#{model.modeVal}"
title="#{model.modelVal}" />
</rich:column>
回答1:
Use manual sorting, and place a click-able panel in your header for sorting, and another panel for filtering.
回答2:
The filter
facet has been deprecated in favour of the header
facet. So what you used to have in the filter
facet, you can place in the header facet:
<f:facet name="header">
<h:panelGrid>
<h:outputText value="Model Value"/>
<h:graphicImage title="Model Filter"/>
</h:panelGrid>
</f:facet>
来源:https://stackoverflow.com/questions/19353605/filter-facet-is-not-working-in-richface-4-3x