I have a Flex component that is displaying content from multiple (specifically two) remote object calls. I can call both remote methods, get the results back, pass them off to their respective ItemRenderers, etc. with no trouble. What I need, though, is a way to determine if I get no results back from either function call, to dispatch an event to trigger the next view state, and I don't know how to do that. Something like:
protected function ticketConfigurationStateChangeHandler(event:Event):void
if(getPackagePromptsResult.lastResult.length == 0 && getTicketPromptsResult.lastResult.length == 0)
protected function ticketPrompts_creationCompleteHandler(event:FlexEvent):void
getTicketPromptsResult.token = registrationAPI.getTicketPrompts();
protected function packagePrompts_creationCompleteHandler(event:FlexEvent):void
getPackagePromptsResult.token = registrationAPI.getPackageCPrompts();
Any suggestions would be greatly appreciated...I know I need the event listeners to be able to get lastResult.length (and have it not be null) but I don't know how to set them up so I can automatically pass the user through the component and onto the next one if there are no results returned without having the user click a button or something similar on an otherwise blank component.
Thanks in advance!