1 Reply Latest reply on Oct 17, 2005 8:07 AM by Gavin King

    inputText with initial value from a different bean than back

    Bogdan Solomon Newbie

      I wanted to know if it is possible to have an inputText field that would display the initial value from a different bean then the one that the value is saved into.

      I basically have a user that logs in and is saved into a bean called User. Later the user could want to change his profile, all this information is saved into a bean called Profile. However I would want the initial value in my form to be displayed from User.

      I tried something like

       private String username;

      in my ProfileAction but I get an exception
      In attribute requires value for component: #{user.username}

      I am also injecting the User bean into it and tried to initialize the values in the constructor of ProfileAction but I get NullException. I know user is not Null because I am displaying information from it in one of my web pages.

      Also tried to use managed beans in faces-config.xml but Seam is hidding the managed beans so that doesn't work either.