1 Reply Latest reply on Apr 6, 2008 5:18 PM by cliffy2009

    Flex and coldfusion login

    cliffy2009
      Can someone tell me how I can create a popup login system using a coldfusion mx 7 backend. thank you.
        • 1. Re: Flex and coldfusion login
          cliffy2009 Level 1
          Check credentials then remove pop up? How can I remove the Popup login box after successful login? please help me...


          private function handleLoginSucess(eventObj:Event):void {
          //Get the member object from the LoginForm component

          PopUpManager.removePopUp(this)


          LoginForm.mxml
          public function resultGetMemberByUserNameAndPassword(event:ResultEvent):void {

          //used for debugging - shows details about result
          //returned by the CFC method
          //Alert.show( ObjectUtil.toString(event.result) );

          /*result returned is a Member object
          cast the result returned to a Member class
          and assign it to our Member object*/
          __member = event.result as Member ;

          //remove text in the login input fields
          username.text="";
          password.text="";

          // Define event object, initialize it, then dispatch it.
          dispatchEvent(new Event("loginSuccess"));
          PopUpManager.removePopUp(this)

          } //end function getMemberByUserNameAndPassword

          private function processLogin():void {


          //change state back to the default so the errorLogin state doesn't appear again

          currentState = '';

          //Alert.show("Processing Login...");
          MemberService.getMemberByUserNameAndPassword(username.text, password.text);


          }//end function processLogin

          }