You can use a page action to refresh your list (when using SESSION scope).

Like this:

  | Stateful
  | @Scope(ScopeType.SESSION)
  | @Name("partsListFinder")
  | public class PartsListFinderBean implements PartsListFinder {
  |     @In(required=false)
  |     private String                  plName;
  |     
  |     @DataModel
  |     private List<PartsList>         partsLists;
  | 
  |     @PersistenceContext(type=PersistenceContextType.EXTENDED)
  |     private EntityManager           em;
  | 
  |     public void findPartsList() {
  |             partsLists = em.createQuery("from PartsList pl where pl.name 
like :name")
  |                            .setParameter("name", plName + '%')
  |                            .getResultList();
  |     }
  | 
  |     @Factory("partsLists")
  |     public void findPartsLists() {
  |             partsLists = em.createQuery("from PartsList").getResultList();
  |     }
  |          public void reload(){
  |             partsList = null;
  |          }
  |     @Destroy @Remove
  |     public void destroy() { }
  | }
  | 
Pages.xml:

  |  <page view-id="/PartsList.xhtml" action="#{partsListFinder.reload}">
  |     </page>
  | 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4053582#4053582

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4053582
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to