This content has been marked as final.
Show 2 replies
-
1. Re: Dynamic Filtering of Dynamic Columns based on external d
konstantin.mishin Apr 17, 2009 8:35 AM (in response to icampista)We suggest to you to try to use # instead of $ in filterExpression.
-
2. Re: Dynamic Filtering of Dynamic Columns based on external d
icampista Apr 17, 2009 11:44 AM (in response to icampista)I have tried that, but did not work. Thanks anyway.
I have found an alternative solution. The curious thing is that the fn:containsIgnoreCase breaks the EL expression. Somehow it never gets resolved. The JSTL EL of the facelets is not working.
The workaround is that I created a map wrapper with an equivalent function. At the end I got:<rich:dataTable value="#{usersDataTable.model}" var="row" id="table" rows="10"> <rich:columns var="col" value="#{usersDataTable.columns}" index="ind" filterExpression="${(ind != usersDataTable.selectedColumnIndex) || ((usersDataTable.filterValue != null) and (usersDataTable.filterValue != '') and (usersDataTable.containsIgnoreCase(row[ind].value) eq 'true')) }"> <f:facet name="header"> <h:outputText value="#{column.header}" /> </f:facet> <h:outputText value="#{row[ind].value}" /> </rich:column> </c:forEach> </rich:dataTable>
The function usersDataTable.containsIgnoreCase is alreday aware of the filterValue, so there is no need to pass a 2nd parameter, which is anyway impossible as map wrapper (overwritting the Map.get(Object key) function).
Now the question is WHY the JSTL function is not working. I have even defined a custom facelets taglib function and as well is not working. Really strange.