[jboss-user] [JBoss Seam] - Re: Problem starting converstaion and setting state from HTT

c_eric_ray do-not-reply at jboss.com
Fri Jul 21 09:58:55 EDT 2006


I was using a url fragment and that is incorrect. You should use the filename of the view that contains the component in question.

However, petemuir suggested an even cleaner solution (IMO) because it's contained in the code and alleviates the need for the xml file. Here's what I did instead of using the pages.xml file.

  |   @DataModel
  |   private List<PackageEntity> packages;
  |   
  |   @Factory("packages")
  |   public void load() {
  |     packages = em.createQuery("from PackageEntity").getResultList();
  |   }
  | 

the load() method, annotated with @Factory("packages"), is used to initalize the "named" property (that property being "packages"). This is done before the page is rendered making this a great way to initialize state before the page is display.

Eric Ray

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

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3959898



More information about the jboss-user mailing list