2 Replies Latest reply on Jan 30, 2007 11:55 PM by tony.herstell1

    Injecting two instances of an Entity

    tony.herstell1

      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?