0 Replies Latest reply on Jun 17, 2010 4:42 PM by quebequiano

    object oriented programming in Flex

    quebequiano Level 1

      Hi!

       

      I have an application: Flex/Java/BlazeDs/MySql.

       

      I created an user class: user.java and its equivalent in as.

       

      in java I have:

       

      user java with the following properties:

       

      String name;

      String login;

      String password;

      String address....

      ......

       

      and the methods:

       

      signin(login,password);

      logout();

      change_password(old,new);

       

      .....

       

      When I want to sign into the web i only have to type (from the flexPart):

       

      userRO.signin.addEventListener.....

      userRO.signin(login, password) (Remote Object).

       

       

      Then i sign into the DB and I put inside the flex session object (FlexSession) the user object (on the java side).

       

      Until this moment everything is fine.

       

      The problem comes when I want to change the password to the current logged user.

       

      I write:

       

      userRO.changePassword.addEventListener(getCurrentUserHandler,...)

      userRO.changePassword(old,new);

       

      And this is not right, because it is not operating over the user who is logged in.

       

      My question is very simple... how could I operate on the object of the user who is currently logged  and make operations like change_password, change_email... in a good way!

       

       

       

      Thanks a lot!