1 Reply Latest reply on Oct 15, 2007 10:35 PM by Stuart Douglas

    Looking for Seam design ideas

    Kevin Pauli Newbie

      I'm trying to add a "password expiration" feature to a Seam-based application (Seam 1.2.1.GA).

      If a user's password has not been changed in 90 days, then I always want to redirect him to a screen where he'll have to change the password, regardless of the page he attempted to hit. (There is no requirement to try to remember his original URL and send him there when he's finished, so I'd just send him to the home page when done changing his password.)

      Obviously since this is an application-wide behavior, I'd like to only have to configure this once, and not have to code special logic for every page. Perhaps I would do it in components.xml? But how? Any ideas?

        • 1. Re: Looking for Seam design ideas
          Stuart Douglas Master

          Most seams app's probably have something like the following in their components.xml:

           <event type="org.jboss.seam.postAuthenticate">
           <action expression="#{redirect.returnToCapturedView}" />

          this is the config that redirects you to the page you where trying to hit after a login. Replace this with some custom logic that checks for expiration and the either manually returns redirect.returnToCapturedView() or returns the viewid of the password expiration page. You can even have the password expiration page call redirect.returnToCapturedView() when you are done.