1 Reply Latest reply on Mar 10, 2010 10:17 PM by cash1981

    Login and injection

    juanignaciosl

      We're facing a problem with login and injection. In brief, after pressing login button, components are instantiated and injection resolved before observers are called.


      We have an @Observer( { "org.jboss.seam.security.loginSuccessful" }). It initializes some personal data which is used at many pages. You can login through home.seam flawlessly, but if you go directly into a page that depends upon a component which injects that personal data, after you press login you'll get an exception because injected value is null.


      As a workaround we're using @In(required = false), but that's not what we want, since it could lead into null values of basic data.

        • 1. Re: Login and injection
          cash1981

          Is this a question? I don't see any question marks.
          Do you mean you have injections on the component that observs? You need to provide some more data. What do you mean go directly into a page. Is this without login? Of course your observer hasnt kicked in if the user is hasn't logged in.