Hello
I have to decorate my filterEditorCriteria with another criteria to be calculated dinamically (I don't know that criteria in compile time); so I introduced a chunk that, in a fetch event, composes criteria with filterEditorCriteria and a prefilterCriteria.
I saw, on SmartGwt consolle, that filterEditorCriteria is composed like an AND of Criterias (i.e: AND of filters on a listGrid); but when filterEditorCriteria was composed by one criteria I noticed that:
No problem in a stand alone criteria, but in a composite of Criteria here's what happens:
expected that operator:"and" had almost two criterias; yet there is only one.
I do this work around
but I ask for another possible solution.
I have to decorate my filterEditorCriteria with another criteria to be calculated dinamically (I don't know that criteria in compile time); so I introduced a chunk that, in a fetch event, composes criteria with filterEditorCriteria and a prefilterCriteria.
I saw, on SmartGwt consolle, that filterEditorCriteria is composed like an AND of Criterias (i.e: AND of filters on a listGrid); but when filterEditorCriteria was composed by one criteria I noticed that:
Code:
operator":"and", "criteria":[ { "fieldName":"fieldXYZ", "operator":"iContains", "value":"Nico" } ]
Code:
{ "dataSource":"TheDataSource", "operationType":"fetch", "componentId":"isc_CardinisListWidget_ListGridExt_2", "data":{ "query":{ "criteria":{ "operator":"and", "criteria":[ { "operator":"and", "criteria":[ { "fieldName":"XYZ", "operator":"iContains", "value":"Nico" } ] }, { "operator":"and", "criteria":[ { "fieldName":"OtherField", "operator":"equals", "value":1 }, { "fieldName":"status", "operator":"notEqual", "value":"CA" } ] } ] }, }
I do this work around
Code:
"criteria":[ { "fieldName":"fieldXYZ", "operator":"iContains", "value":"Nico" }, {} ]
Comment