PDA

View Full Version : Using sync() response to control code flow



hoitomt
22 Feb 2011, 8:57 AM
Hi,
How do you read the response from a sync transaction? My store has an ajax proxy. I'm listening for the 'exception' event and that works for popping a message box. But I don't know how to control flow with it. Here is what I want to do - pseudo code

remoteStore.sync()
if(sync is successful)
take action A
else
take action B

I can create an alert on exception using the listener but I can't figure out how to actually control the flow

Thanks