Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

SelectItem.setMultiple - JSON Criteria

$
0
0
Hello everyone,

I think I found some bug in v9.0p_2013-07-07/Pro Deployment).

I saved the criteria of my ListGrid into a record, saving this one into my DB:
Code:

record.setAttribute("CRITERIA", JSOUtils.encode(listGrid.getFilterEditorCriteria(true).asAdvancedCriteria().getJsObj()));
I reuse it like this:
Code:

AdvancedCriteria crit = new AdvancedCriteria(JSOUtils.decode(critString));
fetchData(crit);

This works just fine, except for the following filter:
Code:

SelectItem someFilterItem = new SelectItem("somefilter");
someFilterItem.setMultiple(true);
someField.setFilterEditorProperties(someFilterItem);

crit.values() returns:
Code:

{_constructor=AdvancedCriteria, operator=and, criteria=[{_constructor=AdvancedCriteria, operator=or, criteria=[{fieldName=someField, operator=iContains, value=value01}, {fieldName=someField, operator=iContains, value=value02}]}], $H=1}
The filter itself works just fine. Problem is: I don't see the marked entries in my Filter. Additionally, marking let's say "value03" and "value02" results in something like:
Code:

(value01||value02)&&(value02||value03)
Meaning the user has no access to the previously set criterias.

Hopefully this can be fixed. Or is there a workaround?

Thank you very much for any answer in advance,
Dennis Hardy.

Viewing all articles
Browse latest Browse all 4756

Trending Articles