v11.1p_2021-06-29/Pro Deployment (built 2021-06-29)
Following on from my previous question about serializing FilterBuilder criteria. Can you confirm if the following server-side API is meant to correctly decode all client-generated JSON?
https://www.smartclient.com/smartgwt...a.lang.String-
Such that the following is expected to work?
It appears to work for most criteria we've tried to-date, but I've found a valid criteria that I can generate via the client, that the server-side AdvanceCriteria class appears to throw an error for and wanted to check if it was bad usage on our part, or a bug.
Working examples
Broken example - uses a range
generates error
Following on from my previous question about serializing FilterBuilder criteria. Can you confirm if the following server-side API is meant to correctly decode all client-generated JSON?
https://www.smartclient.com/smartgwt...a.lang.String-
Such that the following is expected to work?
Code:
FilterBuilder fb = new FilterBuilder(); String json = fb.getCriteria().asString(); // Send json String to server com.isomorphic.criteria.AdvancedCriteria ac = com.isomorphic.criteria.AdvanceCriteria.decodeClientCriteria(json);
Working examples
Code:
{ \"_constructor\":\"AdvancedCriteria\", \"operator\":\"and\", \"criteria\":[ { \"fieldName\":\"theDate\", \"operator\":\"equals\", \"value\":isc.DateUtil.createLogicalDate(2021, 7, 31) } ] }
Code:
{ \"_constructor\":\"AdvancedCriteria\", \"operator\":\"and\", \"criteria\":[ { \"fieldName\":\"theDate\", \"operator\":\"equals\", \"value\":{ \"_constructor\":\"RelativeDate\", \"value\":\"$today\" } } ] }
Broken example - uses a range
Code:
{ \"_constructor\":\"AdvancedCriteria\", \"operator\":\"and\", \"criteria\":[ { \"operator\":\"iBetweenInclusive\", \"fieldName\":\"theDate\", \"start\":{ \"_constructor\":\"RelativeDate\", \"value\":\"$today\", \"rangePosition\":\"start\" }, \"end\":isc.DateUtil.createLogicalDate(2021, 7, 31) } ] }
ERROR RangeOperator - Unknown class for range comparison class org.apache.commons.collections4.map.LinkedMap
Comment