7 Replies Latest reply on Oct 18, 2010 3:37 AM by Julien HENRY

    How to wrap rich:column in a facelet tag

    Julien HENRY Newbie



      I would like to create a custom facelet tag to add features to the existing rich:column tag.


      I have created the following file:




      <ui:composition xmlns:f="http://java.sun.com/jsf/core" xmlns:rich="http://richfaces.org/rich" xmlns:ui="http://java.sun.com/jsf/facelets">

          <rich:column id="#{id}" filterBy="#{filterBy}">

              <f:facet name="header">

                  <h:outputText styleClass="headerText" value="#{header}" />







      then I use it this way:




      <rich:table var="person" ...>

         <my:column id="col1" header="Name" filterBy="#{person.name}">#{person.name}</my:column>

         <my:column id="col2" header="Age">#{person.age}</my:column>




      The problem is the filter input field is displayed for the two columns even if I don't specify filterBy attribute.


      How can I set the filterBy attribute on rich:column only when it is also defined on the my:column tag?