[jboss-user] [JBoss Seam] - Re: Multiple entities on page, and @Name conflict

Andy Gibson do-not-reply at jboss.com
Tue Nov 20 10:21:45 EST 2007


Well, rather than use named entity instances, you could just use references to them in a stateful backing bean : 

I.e.


  | 
  | class MyBackingBean 
  | 
  | ...
  |   private Entity entity1;
  |   private Entity entity2;
  | 
  |   public Entity getEntity1() {
  |     return entity1;
  |   }
  | 
  |   public Entity getEntity2() {
  |     return entity2;
  |   }
  | 
  | 
  | 

Which I believe is the preferred method to outjecting entity instances.

Cheers,

Andy


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

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



More information about the jboss-user mailing list