PDA

View Full Version : Need Call Back Functionality


jds968
02-12-2009, 05:39 PM
My scenario is an AS method (from Daemon/Data Layer method) calls my AS method: GetSessionID, which is part of my Authentication class.

GetSessionID, depending on the use-case, may request the user to signon login via my LoginPage.mxml..........where it prompts for User Name/Password for a given server (datasource).

Within my LoginPage.mxml (after pressing "Submit") there is logic to dispatch a custom event. I have a "ClientServerEventListener" method (also defined in my Authentication class) that gets fired when the dispatched event is caught. ClientServerEventListener proceeds to process the user's credentials (User Name, Password) and connect to the server........in order to retrieve a valid Session ID.

Question: How does my "ClientServerEventListener" method, which was triggered by an asynchronous process (LoginPage.mxml), send back the Session ID it retrieved to the original calling method: the Daemon/Data Layer that originally called "GetSessionID"?