3 Replies Latest reply on May 16, 2008 10:42 AM by Ilya Shaikovsky

    Can I create a Combo-filtered DataTable without Bean ?

    Frank Newbie

      Dear all,
      I'd like to use rich data table with filters. In one column there's a textfield and in another a combo box. Is it possible to use the built-in filtering as in this example but with the combo box ?

      <ui:composition xmlns="http://www.w3.org/1999/xhtml"
       <rich:dataTable value="#{capitalsBean.capitals}" var="cap">
       <f:facet name="header">
       <rich:column colspan="2" >
       <h:outputText value="Filtering Example"/>
       <rich:column breakBefore="true">
       <h:outputText value="State Name"/>
       <h:outputText value="State Capital"/>
       <rich:column filterBy="#{cap.state}" filterEvent="onkeyup">
       <f:facet name="header">
       <h:outputText value=" " title="Hack due to bug. Shuold be remoevd till release"></h:outputText>
       <h:outputText value="#{cap.state}"/>
       <rich:column filterBy="#{cap.name}" filterEvent="onkeyup">
       <h:outputText value="#{cap.name}"/>

      By the way I've found a more complex example that uses in fact a Combo Box but it's made to use a Complex filterExpression /Methon.

      I just need to set a Combo box as Header for the column.
      How can I do it without using a Bean ?