Hi Support Team,
We are licensed users of SmartGWT. version : 'v11.0p_2019-06-05/Enterprise Deployment'
I am facing some problems when converting client json into serverside advanced criteria.
We save criteria from filterbuilder and later we execute that criterion by converting server-side AdvancedCriteria.
When we save, we are encoding criteria using the below code
--
JSONEncoder jsonEncoder = new JSONEncoder();
jsonEncoder.setDateFormat(JSONDateFormat.DATE_CONSTRUCTOR);
String condition =jsonEncoder.encode(filterBuilder.getCriteria().getJsObj());
------------------
In Server code we create AdvancedCriteria using
AdvancedCriteria ac = AdvancedCriteria.decodeClientCriteria(roadmap.getCondition());
-----------------------------------------
Condition String:
{ "_constructor":"AdvancedCriteria", "operator":"and", "criteria":[ { "fieldName":"startDate", "operator":"equals", "value":{ "_constructor":"RelativeDate", "value":"$today" } } ] }
----------------------------
The error we are getting is:
Trying to compare date type field 'startDate' with org.apache.commons.collections.map.LinkedMap type value in criterion 'equals'
-----------------------
Please advise what wrong thing we are doing
Thanks,
Revan
We are licensed users of SmartGWT. version : 'v11.0p_2019-06-05/Enterprise Deployment'
I am facing some problems when converting client json into serverside advanced criteria.
We save criteria from filterbuilder and later we execute that criterion by converting server-side AdvancedCriteria.
When we save, we are encoding criteria using the below code
--
JSONEncoder jsonEncoder = new JSONEncoder();
jsonEncoder.setDateFormat(JSONDateFormat.DATE_CONSTRUCTOR);
String condition =jsonEncoder.encode(filterBuilder.getCriteria().getJsObj());
------------------
In Server code we create AdvancedCriteria using
AdvancedCriteria ac = AdvancedCriteria.decodeClientCriteria(roadmap.getCondition());
-----------------------------------------
Condition String:
{ "_constructor":"AdvancedCriteria", "operator":"and", "criteria":[ { "fieldName":"startDate", "operator":"equals", "value":{ "_constructor":"RelativeDate", "value":"$today" } } ] }
----------------------------
The error we are getting is:
Trying to compare date type field 'startDate' with org.apache.commons.collections.map.LinkedMap type value in criterion 'equals'
-----------------------
Please advise what wrong thing we are doing
Thanks,
Revan
Comment