|
#1
|
|||
|
|||
|
Hi Isomorphic,
I am using Restdatasource to fetch the data from database. I am creating a smartclient expected format response in which i want to set the status of the response. this status needs to be manually set ? or can i get the status directly ? One more thing , I am also using RPCManager to call one of the action class. I am calling RPCManager from one of javascript function , so how to get a status for that RPCrequest? Code:
function abcMethod(){
var abc="2";
isc.RPCManager.sendRequest( { data:abc, actionURL: "/moduleName/2/moduleAction_execute.action?abc="+abc } );
}
|
|
#2
|
|||
|
|||
|
#1 The message formats documented for RestDataSource show a <status> element (XML) or status property (JSON) - this is how you return status.
#2 use the callback and access rpcResponse.status |
|
#3
|
|||
|
|||
|
Hi Isomorphic,
Thanks for reply. but my concern is How will status set in XML response? Do I need to set it explicitely ?? |
|
#4
|
|||
|
|||
|
Not sure what the question is here - if you don't set it explicitly, how will it get set? To be clear: if you are not using the SmartClient server, your own server code is responsible for returning a correctly-formed response (which includes a status element).
There is a full discussion of the RestDataSource here, including several examples of valid responses. |