title: Why does JSF save component tree state?
body: <p>There appears to be a difference between managed bean state and component tree state.  You can control managed bean state by using annotations like <em>@RequestScoped</em> and <em>@SessionScoped</em>, but it seems you don't have a choice in whether the component tree state is saved or not (although you can choose whether it is saved on the server or client).</p>
  
  <p>It seems like component tree state should only be needed for the duration of a single request as a temporary data structure to help process a request. It should be rebuilt from scratch for each request.  With JSF 2.0 partial state saving makes the situation better because only form data is saved, but I don't understand why having even form data from the previous request is useful.</p>
  
  <p>If your application uses only request scope managed beans then it especially doesn't make sense to save component tree state between requests.  Even if your application has session scope managed beans I would assume that the managed beans would hold the state and the component tree still wouldn't need to have any state between requests. </p>