1 Reply Latest reply on Jun 21, 2007 4:16 PM by carstenrudat

    Question on JSF lifecyle -> alter model in apply application

      Hi all,

      I use JSF 1.2 RI on JBoss 5 Beta 2 and I try to update a backing bean in the application phase like this:

      public class MyBean{
       ...
       protected MyDataStructure m; // + getter/setter
      
       public String anActionMethodWithOutcome() {
       ...
       setM(new MyDataStructure());
       ...
       return outcome;
       }
      }
      


      Before the call of anActionMethodWithOutcome() m is null. At the last line of anActionMethodWithOutcome() m is set to a correct value. No other setM() is called. BUT, when the response renders the screen and a getter-method is called, I see in the debugger, that m is null :-(

      I think, it has anything to do with the livecycle of jsf... Is there a way to update the model and have this modification still at response time?

      Best regards,
      Carsten

        • 1. Re: Question on JSF lifecyle -> alter model in apply applica

          Just to add some information:

          My backing bean is session scoped. I have a value binding of inputText-component to my datastructure and I also have a component binding (get/setUIComponent).

          Again, it seams to me that my backing bean's state is saved. After that I update my bean in the invoke application phase and this has no effect...

          Any idea?