[jboss-user] [JBoss Seam] - Injecting two instances of an Entity

seamNoobie do-not-reply at jboss.com
Tue Jan 30 22:17:51 EST 2007


I want to Inject two instance of the User entity into a controller:


  | @Entity
  | @Name("user")
  | public class User implements Serializable {
  | ...
  | 



  | 	@In(create=true)
  | 	@Out
  | 	private User user;
  | 
  | 	@In(value="userSearchCriteria")
  | 	private User userSearchCriteria;
  | 

Why??

"user" is the user being manipulated
"userSearchCriteria" is the User that holds (and is filled in) for search criteria.

If I go with:

  | 	@In(create=true)
  | 	@Out
  | 	private User user;
  | 
  | 	private User userSearchCriteria = new User();
  | 

then when I come back to this controller (using the back button or whatever) then the userSearchCriteria is pointing to the "user" being manipulated.

Any suggestions?



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

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



More information about the jboss-user mailing list