-
1. Re: rich:EXTENDEDdataTable filterBy contains instead of startsWith
ilya_shaikovsky Feb 15, 2010 7:42 AM (in response to eugenbesel)1 of 1 people found this helpfulhttp://livedemo.exadel.com/richfaces-demo/richfaces/filteringFeature.jsf?tab=ex-usage&cid=121451
check filterMethod and filterExpression usage.
-
2. Re: rich:EXTENDEDdataTable filterBy contains instead of startsWith
eugenbesel Feb 24, 2010 11:50 AM (in response to ilya_shaikovsky)hello Ilja,
thank you for your advice. I took a look at this example.
I saw, that the filter Method take a Objectvalue.
public boolean filterStates(Object current) {
Capital currentCapital = (Capital)current;
if (filterValue.length()==0) {
return true;
}
if (currentCapital.getState().toLowerCase().startsWith(filterValue.toLowerCase())) {
return true;
}else {
return false;
}
}and this method is used in jsp. like <rich:column filterMethod="#{filteringBean.filterStates}">
how about <rich:columns ...
without filterMethod I made:
<rich:columns id="col_#{col}" value="#{searchModul.columns}"
var="col" index="ind"
filterBy="#{data[ind]}" filterEvent="onkeyup" sortBy="#{data[ind]}"
sortOrder="#{searchModul.sortOrders[col]}"
filterValue="#{searchModul.columnFilterValues[col]}">with Bean:
public Map<String, Object> getColumnFilterValues() {
return columnFilterValues;
}public void setColumnFilterValues(Map<String, Object> columnFilterValues) {
this.columnFilterValues = columnFilterValues;
}so how should it work with filterMethod ????
thank you for your answer.