Skip to Content
0

UI5 Complex Expression Binding with filter

Jun 22, 2017 at 01:16 PM

183

avatar image

Dear Gurus,

I have an XML View with a list and OData binding, and want to filter the list by default based on some dynamic criteria..

When I hardcode values '2017' and '05' the filter values arrive in the backend.

<List id="wageTypeList"
items="{ path: '/CorrectionHeaders', filters: [{ path: 'Pabrj', operator: 'EQ', value1: '2017' },{ path: 'Pabrp', operator: 'EQ', value1: '05' }],templateShareable:false }">

That is great, but I want to replace the hard coded values with dynamic values payrollYear and payrollPeriod coming from a JSONModel assigned to the view:

new JSONModel(
{
payrollYear: sYear,
payrollPeriod: sPeriod,
payrollYearPeriod: sYear + sPeriod
}

I've tried many syntaxes to replace the hard coded values, but all of them run into "Syntax error" or "Bad value" when executing teh view.

What would be the proper syntax, if it is supported ? Is it supported ?

Thank you

P.S.: I know how to bind the list manually in the view controller and filter the OData binding, but this is not how I want to solve, I want to use expression binding.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Jun Wu Jun 22, 2017 at 01:26 PM
0

I think it is not supported yet.

Share
10 |10000 characters needed characters left characters exceeded