cancel
Showing results for 
Search instead for 
Did you mean: 

Pass the values of FacetFilter to the URL and thus to OData??

Former Member
0 Kudos

Hi ,

Need help in passing values in Facetfilter placed in view.xml .

How to bind the values selected in Filter to the URL.

  <FacetFilter

        id="facetfilter1"

        type="Simple"

        showPersonalization="true"

        showReset="true"

        reset="handleFacetFilterReset"

        lists="/{EntitySet}">

        <lists>

          <FacetFilterList

            title="CompanyCode"

            key="Compcode"

            multiselect="true"

            listClose="handleListClose"

            items="/{EntitySet}" >

            <items>

              <FacetFilterItem

                text="xyzcompany"

                key="0021" />

                <FacetFilterItem

                text="abccompany"

                key="0098" />              

            </items>

          </FacetFilterList>

           <FacetFilterList

            title="Dbcrind"

            key="Dbcrind"

            multiselect="true"

            listClose="handleListClose"

            items="/{EntitySet}" >

            <items>

              <FacetFilterItem

                text="Debit"

                key="S" />

                <FacetFilterItem

                text="Credit"

                key="H" />

            </items>

          </FacetFilterList>

        </lists>

      </FacetFilter>

First of all i get this error, as i used the code in FacetFilter sample:

[localIndex.html] Element sap.ui.core.mvc.XMLView#__xmlview2: aggregations with cardinality 0..n only allow binding paths as attribute value (wrong value: lists='/{EntitySet}') ==> THe variable there is the entity set name of Odata Model.

Please help me with code and where to plug in.

And please let me kow what should i fill in items, lists = ? in the facefilter tags.

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member187227
Participant
0 Kudos

Hi Santhosh Gowda and Chakri B ..

                    I'm also facing the same issue with same error how to bind the data with view please give some code to  go ahead. I'm trying this as 2 days thanks in advance.

santhu_gowdaz
Active Contributor
0 Kudos

"/{EntitySet}" is should be "{/EntitySet}".

Former Member
0 Kudos

I shall try it Santosh..

Can you please throw some light on how to collect the information from facetfilter and push it to OData

santhu_gowdaz
Active Contributor
Former Member
0 Kudos

Hi Santosh,

I was looking those from few days.

Could  not get the essence of otable , binding and how that would impact the URL.

And URL is passed in component.js

And we write this binding in Master.controller.js

Could not get the connection.

RenaldWittwer
Contributor
0 Kudos

Hello Chakri,

I found Your threat because I am looking for the same issue. Did you solve this problem.

In the following Link I found the following statement

http://help.sap.com Data Binding for Facet Filters

Applications using OData do not bind the FacetFilterItem.selected property since this is not available from the backend service. Fortunately, selections are maintained internally on the client by the FacetFilterList until the list is destroyed.


If I understand it right this means that selecting at the backend does not work for OData. But in this case Facet Filters are useless for OData, because Facet Filters are made for a huge amount of data and this can't be selected at the client.


Everybody is invited to discuss if I understand this right.


Best regards

Renald