1 Reply Latest reply on Apr 24, 2007 2:42 PM by pmuir

    seam-gen , Authenticate and EntityHome

    hvram

      Hi
      My application uses the generate-entities to reverse engineer an existing DB schema . I am using the pages generated using seam-gen.

      I am trying to plug in the authentication and I am wondering what is the correct way to go about it .

      I did the following in Authenticator.java

      @Out (scope=Session)
      User user;

      and in the authenticate method I set the user object.

      But the pages generated by seam-gen refer to the UserHome object instead of user.

      When I try to do a
      @In (create=true)
      @Out (Scope=Session)
      UserHome userHome

      OR

      userHome = Component.getInstance("userHome)

      things do not work . The userHome object if viewed using the debug.seam shows illegalStateException for the Collection objects

      So should I

      a) rewrite the pages to refer to user instead of userHome . If that is the case can I use the persist methods of EntityHome or should I write those methods again

      b) Any other way to solve the problem ? Is there are different approach to authentication

      Thanks in Advance

      Regards
      Hari