title: ManagedBean keeps returning same query results (Session/View Scope?)
body: <p>I have the following in an index.xhtml page.</p>
  
  <pre><code>&lt;h:form id="findForm"&gt;
          &lt;h:panelGrid columns="2" cellpadding="5"&gt;                
              &lt;p:outputLabel value="Name" for="name"/&gt;
              &lt;p:inputText id="name" value="#{finder.name}"/&gt;
  
              &lt;f:facet name="footer"&gt;
                  &lt;p:commandButton value="Find"
                  action="#{finder.gotoFoundPage}"/&gt;
              &lt;/f:facet&gt;
          &lt;/h:panelGrid&gt;
  &lt;/h:form&gt;
  </code></pre>
  
  <p>And here's a cut down version of the next page, found.xhtml.</p>
  
  <pre><code>    &lt;p:dataTable id="myTable" var="item" 
          value="#{finder.byName}" rowKey="#{item.name}" 
          paginator="true" rows="20" 
          selection="#{finder.selectedItem}" selectionMode="single"&gt;
  
          &lt;p:column headerText="Name" sortBy="#{item.name}"
                  filterBy="#{item.name}" id="name"&gt;
              #{item.name}
          &lt;/p:column&gt;
      &lt;/p:dataTable&gt;
  </code></pre>
  
  <p>Both xhtml pages use the same mananged bean. When I click on the CommandButton from index.xhtml, it navigates to the found.xhtml page which also uses the Finder bean (currently ViewScoped). The problem is that the Finder bean will not get the #{finder.name} (which user inputs in index page and needs to be passed to found page) unless I make the Finder bean SessionScoped.</p>
  
  <p>So if I make it SessionScoped, then the problem is that found.xhtml page keeps displaying the same values in the found page upon a new search at the man page. The same values even though the values in the database have changed. My understanding is that if I make it ViewScoped, it will perform a new query each time the page loads in order to update the displayed values. But not sure how to do this.</p>
  
  <pre><code>@EJBs({@EJB(name="ejb/MyBean1", beanInterface=IMyBean1.class),
         @EJB(name="ejb/MyBean2", beanInterface=IMyBean2.class)})
  @ManagedBean(name="finder")
  @ViewScoped
  public class Finder implements Serializable {
  
      // ...
  
      public String gotoFoundPage() {
          return "found?faces-redirect=true";
      } 
  </code></pre>
  
  <p>Anyone have ideas?</p>