Calling update in assembler may be a good option. Using the DataServiceTransaction could be better:
DataServiceTransaction tx = DataServiceTransaction.begin(false);This snippet should get the job done on the server side. On the client side, you need to handle the FDS message:
Rate rate = ... // get the rate from some streaming data source
// do any necessary calculation
tx.updateItem("fds.rate", rate, null, null);
tx.commit();
<mx:script>
public function handleMessage(event):void {
if (rate.id == event.message.body[2].id) {
rate = event.message.body[2];
}
}
</mx:script>
<mx:label text="{rate.value}"/>
<mx:dataservice id="dsRate" destination="fds.rate" message="handleMessage(event)" />
No comments:
Post a Comment