Hey,
I stumbled upon an issue, where the ValuesManager.getValues() returns the following:
{"title"="VALDZHIA", "code"="ADMINISTRATION", "roles"=null, "_id"="UG0", "_lastUpdated"=null, "_action"="UPDATE", "_selection_10"=true}
note the _lastUpdated and roles - they are both null.
Now, the request being passed to the server, ends up converting null values to "null" strings, which kinda breaks my stuff:
I am using latest nightly of 3.1d:
SmartClient Version: SNAPSHOT_v8.3d_2012-10-12/LGPL Development Only (built 2012-10-12)
Am I missing something, like some flag on datasource?At the moment I'm using:
Any pointers would be much appreciated!
regards,
Andrius
I stumbled upon an issue, where the ValuesManager.getValues() returns the following:
{"title"="VALDZHIA", "code"="ADMINISTRATION", "roles"=null, "_id"="UG0", "_lastUpdated"=null, "_action"="UPDATE", "_selection_10"=true}
note the _lastUpdated and roles - they are both null.
Now, the request being passed to the server, ends up converting null values to "null" strings, which kinda breaks my stuff:
Code:
{
dataSource:"UG",
operationType:"update",
componentId:"isc_ValuesManager_2",
data:"{\r \"dataSource\":\"UG\", \r \"operationType\":\"update\", \r \"componentId\":\"isc_ValuesManager_2\", \r \"data\":{\r \"title\":\"VALDZHIA\", \r \"code\":\"ADMINISTRATION\", \r \"roles\":\"null\", \r \"_id\":\"UG0\", \r \"_rev\":\"8-6fcd425a62fa872eb6bac5c8b4251a86\", \r \"_lastUpdated\":\"null\", \r \"_action\":\"UPDATE\", \r \"_selection_10\":true\r }, \r \"oldValues\":{\r \"title\":\"VALDZHIA\", \r \"code\":\"ADMINISTRATION\", \r \"roles\":[\r \"PRICING_MANAGER\"\r ], \r \"_id\":\"UG0\", \r \"_rev\":\"8-6fcd425a62fa872eb6bac5c8b4251a86\", \r \"_lastUpdated\":\"null\", \r \"_action\":\"UPDATE\", \r \"_selection_10\":true\r }\r}",
callback:{
target:[ValuesManager ID:isc_ValuesManager_2],
methodName:"saveEditorReply"
},
showPrompt:true,
prompt:"Saving form...",
oldValues:{
title:"VALDZHIA",
code:"ADMINISTRATION",
roles:[
"PRICING_MANAGER"
]
},
requestId:"UG$6278",
clientContext:{
},
fallbackToEval:false,
afterFlowCallback:"isc_ValuesManager_2.$49z(dsRequest, dsResponse, data)",
editor:[ValuesManager ID:isc_ValuesManager_2],
bypassCache:true,
isRestRequest:true,
dataFormat:"json",
contentType:"application/json"
}
SmartClient Version: SNAPSHOT_v8.3d_2012-10-12/LGPL Development Only (built 2012-10-12)
Am I missing something, like some flag on datasource?At the moment I'm using:
Code:
restDataSource.setDataFormat(DSDataFormat.JSON);
OperationBinding update = new OperationBinding();
update.setOperationType(DSOperationType.UPDATE);
update.setDataProtocol(DSProtocol.POSTMESSAGE);
regards,
Andrius
Comment