PDA

View Full Version : Creating a Dynamic Dataset from a call to XML-RPC


sksamy
07-28-2005, 01:30 PM
Hi,
I am newbie to Lazlo. I am using XML-RPC in my application. I get the return data from the rpc call but I am not sure as to how i can get this into a dataset and bind my UI to it. I looked at LzDataNode.stringToLzData but this returns an LZDataElement. How can I get it into a dynamic dataset? Appreciate your help.

sksamy
07-28-2005, 01:55 PM
Solved. just used the dataobject attribute of the remotecall element. Here is an example code if it might help someone

<dataset name="loginresponse" />
......

<remotecall name="fr" funcname="login.doLogin" dataobject="loginresponse">


<method event="ondata" args="data">
loginStatus=data;
Debug.write('got data:', data);
var dp = canvas.datasets.loginresponse.getPointer();
Debug.write('login response',dp.serialize());
</method>

<method event="onerror" args="error">
Debug.write('onerror:', error);
</method>
</remotecall>