3 Replies Latest reply on May 20, 2009 1:02 PM by Timothy Potter

    Sample Web 2.0-style User Registration Solution using RichFa

    Timothy Potter Newbie

      I've just posted a sample project (with source code) that uses Seam with RichFaces to implement a Web 2.0-style user registration system. The sample employs the following features:

      * Conversations
      * Remember Me (persistent tokens)
      * Rich Modal Panels
      * Hibernate Validator and beanValidator
      * Seam CAPTCHA
      * Email verification / account activation
      * Facelets for email
      * Many uses of A4J / AJAX
      * Using SeamTest / TestNG

      If interested, please see: http://thelabdude.blogspot.com/2009/05/user-registration-solution-using-jboss.html

        • 1. Re: Sample Web 2.0-style User Registration Solution using Ri
          Jay Balunas Master

          This looks really great! I'm not all the way through the article but that is a really great use the technology!!! I also really like the write up, nice technical content :-)

          I'll give it a show when I get a chance, and provide some feedback.

          Would you be interested in integrating a form of this into the RichFaces or Seam project as an example?

          RichFaces Project Lead

          • 2. Re: Sample Web 2.0-style User Registration Solution using Ri
            Mark LoSacco Newbie

            I agree, this is a really great sample/write-up. I wish I had something like this to look at/start from when I was beginning my app. Much of what you have done I have already implemented, though in many cases not nearly as cleanly/elegantly. I want to go back and incorporate some of your ideas over time.

            Thanks for sharing this!


            • 3. Re: Sample Web 2.0-style User Registration Solution using Ri
              Timothy Potter Newbie

              I encountered a few issues while building this example that I'd like to raise awareness of:

              1) Asynchronous Email ... I tried sending the account activation email asynchronously but the inactiveNewUser component used by the EL in the template was null when the email template was rendered. I tried putting this component into EVENT scope (and even tried SESSION scope) to no avail. Should an asynchronous event have access to EVENT scope? If not, it should at least be able to see objects in SESSION scope ...

              Has anyone been able to use asynchronous email in Seam 2.1.1.GA?

              2) When trying to implement Remember Me (using persistent tokens) the documentation suggested that I should have the following in my components.xml:

              <event type="org.jboss.seam.security.notLoggedIn">
               <action execute="#{redirect.captureCurrentView}"/>
               <action execute="#{identity.tryLogin()}"/>
              <event type="org.jboss.seam.security.loginSuccessful">
               <action execute="#{redirect.returnToCapturedView}"/>

              This didn't seem to trigger the identity.tryLogin operation ... so I resorted to triggering it manually using a page action:

              <action execute="#{identity.tryLogin}" if="#{not identity.loggedIn}"/>

              This may because of how I've configured things in pages.xml since I don't have a specific login page ???

              3) The Identity.EVENT_LOGIN_SUCCESSFUL event was not raised by the rememberMe component upon successful auto-login. I resorted to observing the Identity.EVENT_POST_AUTHENTICATE instead ... is this the expected behavior?