Highlighted

How to display success message after Remote service call

Avatar

Avatar

KumarBeura

Avatar

KumarBeura

KumarBeura

22-01-2009

Hi ,

I am currently using Flex form for adding/updating user
personal details.On submit button click ,i am submitting details to
server by calling RPC remote service.For calling remote service i
am using penneframework. On penneframework, Remote service call
result are populated in RemoteResult object. It dont have any other
event method for handling result event.For errror handling, i have
defaultHandler for displaying error message.



Here i am having two requirements

1. I should be able to track RPC response, so that i can
display success message to user along with DB generated ID.

2. I need to reset all form field after receiving RPC
response.



Here my question is

1.How i can track server response, so that i can display
success or error message.

2. Is their any event or coding technique which i can use for
solving this issue.





Thanks

Kumar

Replies

Highlighted

Avatar

Avatar

levancho

Avatar

levancho

levancho

28-01-2009

you can do following way :




quote:





var token:AsyncToken =
YourRemoteClass.remoteMethod(param1,param2);



token.addResponder(new AsyncResponder(

function(data:Object, token:Object):void {



// tadaaa response

},



function(info:Object, token:Object):void {



//ooooo , noo, failure

},

token

));