0 Replies Latest reply on May 14, 2007 8:44 AM by Salvatore Insalaco

    Event context ends before the response

    Salvatore Insalaco Newbie

      I've a very simple xhtml (facelets) page called "p1.xhtml" with this code:

       <h:form>
       <h:inputText value="#{testAction.x}"/>
       <h:commandButton value="Click me!" action="#{testAction.doSomething}"/>
       </h:form>
      

      TestAction is a bean with this code:
      @Name("testAction")
      public class TestAction {
       public String x;
       ..... getter and setter of x .....
       public String doSomething() { return "/p1.seam"; }
      

      I've got a strange behaviour: if the scope of the TestAction component is EVENT, the value of the text field is NOT present in the text field after the submit (even if it gets correctly submitted).
      If the scope of the TestAction component is CONVERSATION (even with NO long running conversation active) the value is present (it appears in the text box after the submit).

      Now, shouldn't the EVENT scope last for a request / response cycle (even the response render?). It seems like the component gets destroyed and recreated before the render response phase.
      Shouldn't the CONVERSATION scope last as the EVENT one when there's no active long-running conversation?

      Thank you for your support.

      Salvatore Insalaco