thanks for the hint to migrate to RC1:
Another hint for people migrating from M2 to RC1, you may have to change your flex code that handle the login result event.
I was using the following code
which does not work anymore in RC1 since user details are now returned by the server upon loginCode:// Handle successful login. private function LoginResultEvent(event:ResultEvent, token:Object=null):void { switch (event.result) { case "success": Alert.show("Login OK: "); dispatcher.dispatchEvent(new LoginEvent(LoginEvent.LOGIN_SUCCESSFUL)); break; default: } }
Extracted from reference documentation here is a code that works
Code:var token:AsyncToken = myChannelSet.login("jeremy","atlanta"); token.addResponder( new AsyncResponder( function(event:ResultEvent, token:Object = null):void { if (event.result.authorities.indexOf("ROLE_ADMIN") >= 0) { displayAdminPanel(event.result.name); } else { displayUserPanel(event.result.name); } }, function(event:FaultEvent, token:Object = null):void { displayErrorMessage("Login Failed: "+event.fault.faultString); } ) );
BTW Thanks for the RC1, I can't wait testing the messaging feature!
Pierre


Reply With Quote