Hi,
While looking at the RPC manager in the Dev Console, in the request section, there is RPCRequest and DSRequest.
What is the exact relationship between these two, and what is the workflow here? My understanding until now was that DSRequest is the higher-level representation, describing the intended purpose of the action, and RPCRequest is the lower-level representation, which was actually sent.
However, what I am seeing now seems to contradict this.
I have a form, having only three fields (login, username, email).
Saving a new record using this form generates two calls: there one for validation, and then one for the actual add. In the Developer Console, here is what I see about the second call:
DSRequest:
RPCRequest looks like this:
To have a full picture, here is the request as percieved by the server side:
The 3rd log (which was gathered from the server) is correct, but as you can see, the DSRequest shown by the RPC manager seems to contain several fields which were definitly not given by the user (like registration IP, date and password); these were generated and added on the server side, so they could not be part of the DSRequest! My guess would be that these fields are added here from the DSResponse, but is this intended? If yes, then what's the purpose?
* * *
On the other hand, the (supposedly) matching RPCRequest only contains what was actually given, which is nice, but it also says "operationType":"validate", which is weird for an add operation.
In fact, the "RPCRequest" part of the second (add) calls matches byte-to-byte to the RPCRequest part of the second (validate) call. It looks like it's just a copy of the first call, instead of the RPCRequest of the second call. Is this intended? If yes, then what's the puspose?
Thank you for your help:
Csillag
ps. I am using SmartGWT Power edition, nightly build from 02.23
While looking at the RPC manager in the Dev Console, in the request section, there is RPCRequest and DSRequest.
What is the exact relationship between these two, and what is the workflow here? My understanding until now was that DSRequest is the higher-level representation, describing the intended purpose of the action, and RPCRequest is the lower-level representation, which was actually sent.
However, what I am seeing now seems to contradict this.
I have a form, having only three fields (login, username, email).
Saving a new record using this form generates two calls: there one for validation, and then one for the actual add. In the Developer Console, here is what I see about the second call:
DSRequest:
Code:
{ "dataSource":"app_users_auto", "operationType":"add", "operationId":"registerUser", "componentId":"isc_DynamicForm_2", "data":{ "USER_LOGIN":"tomp", "USER_NAME":"TOMP", "USER_EMAIL":"t@o.mpa", "REGISTRATION_HOST_NAME":"127.0.0.1", "REGISTRATION_IP":"127.0.0.1", "ADMINISTRATOR":false, "USER_ID":13, "ALLOWED":true, "REGISTRATION_DATE":"2011-02-24T05:22:03", "USER_PASSWORD":"U5HofkkcGIZWDpG1F59t6vLOjUg=" }, "callback":{ "target":[DynamicForm ID:isc_DynamicForm_2], "methodName":"saveEditorReply" }, "willHandleError":true, "showPrompt":true, "prompt":"Saving form...", "oldValues":{ }, "clientContext":{ }, "requestId":"app_users_auto$6272" }
Code:
{ "actionURL":"http://127.0.0.1:8888/cogdemo/sc/IDACall", "showPrompt":false, "prompt":"Validating...", "transport":"xmlHttpRequest", "promptStyle":"cursor", "bypassCache":true, "data":{ "values":{ "USER_LOGIN":"tomp", "USER_NAME":"TOMP", "USER_EMAIL":"t@o.mpa" }, "operationConfig":{ "dataSource":"app_users_auto", "repo":null, "operationType":"validate" }, "validationMode":"full", "appID":"builtinApplication", "operation":"app_users_auto_validate", "oldValues":{ "USER_LOGIN":"tomp", "USER_NAME":"TOMP", "USER_EMAIL":"t@o.mpa" } } }
Code:
=== 2011-02-24 05:22:03,220 [0-24] DEBUG RPCManager - Request #1 (DSRequest) payload: { values:{ USER_LOGIN:"tomp", USER_NAME:"TOMP", USER_EMAIL:"t@o.mpa" }, operationConfig:{ dataSource:"app_users_auto", operationType:"add" }, componentId:"isc_DynamicForm_2", appID:"builtinApplication", operation:"registerUser", oldValues:{ }, criteria:{ } }
* * *
On the other hand, the (supposedly) matching RPCRequest only contains what was actually given, which is nice, but it also says "operationType":"validate", which is weird for an add operation.
In fact, the "RPCRequest" part of the second (add) calls matches byte-to-byte to the RPCRequest part of the second (validate) call. It looks like it's just a copy of the first call, instead of the RPCRequest of the second call. Is this intended? If yes, then what's the puspose?
Thank you for your help:
Csillag
ps. I am using SmartGWT Power edition, nightly build from 02.23
Comment