5 Replies Latest reply on Oct 20, 2013 2:44 AM by Amit Bhati

    Filter facet not supported by Richface 4.3x

    Amit Bhati Newbie

      I have a extended data table with both sorting and filtering functionality. Filtering is invoked by a graphic image.

      In Richfaces 3.3 I used to put a sorting button in header facet and filter image in filter facet. But while migrating from Richface 3.3x to 4.3x, It seems the filter facet is no longer supported.

      If I put filtering image in header facet then when I click on the image even sorting is getting invoked as it is linked to header. Please help me with the work around for filter facet in Richface 4.3x.

      Link to the code Snippet with richface 3.3x for reference: https://gist.github.com/Amit460021/6986344

        • 1. Re: Filter facet not supported by Richface 4.3x
          Brian Leathem Master

          you are unable to have multiple clickable areas in your column header?

          • 2. Re: Filter facet not supported by Richface 4.3x
            Amit Bhati Newbie

            Yes in one way, you are correct.

            In column header, clicking anywhere(including this added custom region) invokes the sorting along with custom function. we want to invoke 

            this function for popup custom filter.

             

            In Richfaces3.4, it was achieved by putting this custom filter in filter facet. In that way header click was invoking sorting and this region(filter facet) click

            was invoking custom filter function.

             

            Now as we don't have the filter facet, we need a way to make this implemented functionality work.

            As per the requirement we need to have a custom filter with popup with option to select the filter value(much like excel).

            • 3. Re: Filter facet not supported by Richface 4.3x
              Amit Bhati Newbie

              I am posting the code for one of my rich:column of the extended data table.

               

              <rich:column sortBy="#{model.modVal}" label="Model Value" sortable="true" id="modelVal"  rendered="#{backingBean.renderMap['modVal']}">
                  <f:facet name="header">
                      <h:outputText value="Model Value" />
                      <h:graphicImage title="Filter"
                                      value="#{backingBean.dataModel.modValFilter }">
                          <a4j:ajax event="click" render="filterCol"
                                    execute="@form"
                                    listener="#{backingBean.loadModalPanelData('modVal') }"
                                    oncomplete="#{rich:component('filterCol')}.show()">
                          </a4j:ajax>
                      </h:graphicImage>
                  </f:facet>
                  <h:outputText value="#{model.modeVal}" title="#{model.modelVal}" />
              </rich:column>
              

               

              In the Code, You can observe two things:

              1) Default sorting is getting utilized.

              2) Image based custom filter is used.

               

              Problem I am facing : When I click on filter image default sorting is getting triggered.

              Need a way by which If I click on filter, default sorting doesn't get triggered. (This was achieved in Richface 3.3 by putting this custom filter in filter facet.)

               

              Any help or hint would be greatly appreciated.

              • 4. Re: Filter facet not supported by Richface 4.3x
                Brian Leathem Master

                What if you use manual sorting, and place a click-able panel in your header for sorting, and another panel for filtering?

                • 5. Re: Filter facet not supported by Richface 4.3x
                  Amit Bhati Newbie

                  Thanks, custom sorting is the only way of achieving what I am trying to do.