title: JSF2 (Mojarra) View Scope Managed Bean wants all members to be Serializable
body: <p>I am trying to convert a session scoped JSF managed bean to view scoped. However, when I try to access the xhtml page for this bean, then i get the following error:</p>
  
  <p>java.io.NotSerializableException: foo.bar.SomeDaoClass</p>
  
  <p>I have a member of a helper DAO that I use to delegate persistence related tasks within the bean. If I make this DAO class implement Serializable then  other UIComponent references start causing the same errors!</p>
  
  <p>The main use case is that I have a link on the click of which I open a jquery lightbox pop-up showing the xhtml page which is backed by a session bean. When the user clicks the submit button on the pop-up form, I remove the session bean programatically. The problem is if the user clicks the close button of the pop-up itself, and clicks on another link pointing to another id, then the same values are shown (being session scoped)!</p>
  
  <p>I would like to use the view scope to preserve values while viewing this form in a pop-up and when the user clicks the close button of the pop-up, the values may be discarded.</p>