11 Replies Latest reply on Dec 14, 2007 10:10 AM by Andy Gibson

    How do I reload a Data Model on a SessionBean everytime it i

    Casey Boyd Novice

      Bean...

      
      @Name("usermanager")
      @Stateful
      @Scope(SESSION)
      @Restrict("#{identity.loggedIn}")
      public class UserManager implements UserManagerInterface {
      
       @DataModel("users")
       private List<User> users;
      
       @Factory("users")
       public List<User> getUsers() { }
      
      }
      
      


      Page...

      
      <ui:composition xmlns="http://www.w3.org/1999/xhtml"
       xmlns:s="http://jboss.com/products/seam/taglib"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:a4j="http://richfaces.org/a4j"
       xmlns:rich="http://richfaces.org/rich"
       template="layout/template.xhtml">
      
       <ui:define name="body">
      
       <h:form>
      
       <rich:dataTable id="tblUsers" var="varUser" value="#{users}">
      
       <f:facet name="header">
       <rich:column><h:outputText value="Name" /></rich:column>
       </f:facet>
       <rich:column><h:outputText value="#{varUser.name}" /></rich:column>
      
       </rich:dataTable>
      
       </h:form>
      
       </ui:define>
      
      </ui:composition>
      


      I want the datatable to be reloaded every time the page is rendered....