title: JSF Session scoped
body: <p>so I found this issue, it is really weird..</p>
  
  <p>So I have this  xhtml page:</p>
  
  <pre><code>&lt;h:form&gt;
          &lt;rich:dataTable value="#{carsBean.myList}" var="car"&gt;
              &lt;rich:column&gt;
                  &lt;f:facet name="header"&gt;
                      &lt;h:outputText value="Name" /&gt;
                  &lt;/f:facet&gt;
                  &lt;h:inputText value="#{car.name}"&gt;
                      &lt;p:ajax event="keyup" listener="#{carsBean.print}" /&gt;
                  &lt;/h:inputText&gt;
              &lt;/rich:column&gt;
              &lt;rich:column&gt;
                  &lt;f:facet name="header"&gt;
                      &lt;h:outputText value="Company" /&gt;
                  &lt;/f:facet&gt;
                  &lt;h:inputText value="#{car.company}"&gt;
                      &lt;p:ajax event="keyup" listener="#{carsBean.print}" /&gt;
                  &lt;/h:inputText&gt;
              &lt;/rich:column&gt;
              &lt;rich:column&gt;
                  &lt;f:facet name="header"&gt;
                      &lt;h:outputText value="Address" /&gt;
                  &lt;/f:facet&gt;
                  &lt;h:inputText value="#{car.address}"&gt;
                      &lt;p:ajax event="keyup" listener="#{carsBean.print}" /&gt;
                  &lt;/h:inputText&gt;
              &lt;/rich:column&gt;
          &lt;/rich:dataTable&gt;
          &lt;h:commandButton value="save-empty"&gt;
  
          &lt;/h:commandButton&gt;
      &lt;/h:form&gt;
  </code></pre>
  
  <p>The following is the managedbean:</p>
  
  <pre><code>@ManagedBean(name="carsBean")
  @SessionScoped
  public class CarsBean implements Serializable {
  
      /**
       * 
       */
      private static final long serialVersionUID = -7818770780064447805L;
      private List&lt;Car&gt; myList;
      private String test;
  
      public CarsBean(){}
  
      public void print(){
          System.out.println("I got hit!");
      }
  
      /**
       * @return the myList
       */
      @PostConstruct
      void initialiseSession() {
          FacesContext fc = FacesContext.getCurrentInstance();
          fc.getExternalContext().getSession(true);
          if(myList==null){
              myList = new ArrayList&lt;Car&gt;();
          };
          if(myList.isEmpty()){
              for(int a=0;a&lt;10;a++){
                  myList.add(new Car("test","test","test"));
              }
          }
      }
  
      public List&lt;Car&gt; getMyList() {
          return myList;
      }
  
      /**
       * @param myList the myList to set
       */
      public void setMyList(List&lt;Car&gt; myList) {
          this.myList = myList;
      }
  
      public String getTest() {
          return test;
      }
  
      public void setTest(String test) {
          this.test = test;
      }
  
      public static class Car{
          private String name;
          private String company;
          private String address;
  
          public Car(){}
  
          public Car(String name, String company, String address) {
              super();
              this.name = name;
              this.company = company;
              this.address = address;
          }
  
          /**
           * @return the name
           */
          public String getName() {
              return name;
          }
          /**
           * @param name the name to set
           */
          public void setName(String name) {
              this.name = name;
          }
          /**
           * @return the company
           */
          public String getCompany() {
              return company;
          }
          /**
           * @param company the company to set
           */
          public void setCompany(String company) {
              this.company = company;
          }
          /**
           * @return the address
           */
          public String getAddress() {
              return address;
          }
          /**
           * @param address the address to set
           */
          public void setAddress(String address) {
              this.address = address;
          }
      }
  }
  </code></pre>
  
  <p>Now the aim is to save the users input in the sessionscope such that even if the user closes the tab or makes a new request the data gets persisted.</p>
  
  <p>The above code works, but I have noticed, when I remove the ajax events on the input box it dosent.</p>
  
  <p>Any ideas?</p>
  
  <p>THanks</p>