I am using a datatable with both sorting and filtering. When I click on a inputText to enter a filtering criteria, it directly sorts the datatable by the selected column. Here is the xhtml code. How can I prevent that the datatable will be sorted when I click on the inputtext?
<rich:column filterExpression="#{fn:containsIgnoreCase(gate.serial, gateListAction.selectorSerial)}" sortBy= "#{gate.serial}"> <f:facet name="header"> <h:inputText value="#{gateListAction.selectorSerial}" id="inputSerial"> <a4j:support event="onkeyup" reRender="gateList" requestDelay="500" oncomplete="setCarriageToEnd(event);"/> </h:inputText> </f:facet> <h:outputText value="#{gate.serial}" /> </rich:column>
Found the solutions for this problem. I added the following to the h:inputText
<h:inputText value="#{gateListAction.selectorSerial}" id="inputSerial" onclick="Event.stop(event);">