[jboss-cvs] jboss-seam/examples/registration/src/org/jboss/seam/example/registration ...

Gavin King gavin.king at jboss.com
Wed Sep 27 20:36:56 EDT 2006


  User: gavin   
  Date: 06/09/27 20:36:56

  Modified:    examples/registration/src/org/jboss/seam/example/registration  
                        Register.java RegisterAction.java
  Log:
  this is the first example so it must be SIMPLE
  
  Revision  Changes    Path
  1.4       +1 -4      jboss-seam/examples/registration/src/org/jboss/seam/example/registration/Register.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Register.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/registration/src/org/jboss/seam/example/registration/Register.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -b -r1.3 -r1.4
  --- Register.java	9 Aug 2006 20:30:08 -0000	1.3
  +++ Register.java	28 Sep 2006 00:36:56 -0000	1.4
  @@ -1,13 +1,10 @@
  -//$Id: Register.java,v 1.3 2006/08/09 20:30:08 ssilvert Exp $
  +//$Id: Register.java,v 1.4 2006/09/28 00:36:56 gavin Exp $
   package org.jboss.seam.example.registration;
   
   import javax.ejb.Local;
  -import javax.faces.context.FacesContext;
   
   @Local
   public interface Register
   {
  -   public void logClientIP(FacesContext facesContext);
  -
      public String register();
   }
  \ No newline at end of file
  
  
  
  1.14      +4 -26     jboss-seam/examples/registration/src/org/jboss/seam/example/registration/RegisterAction.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: RegisterAction.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/registration/src/org/jboss/seam/example/registration/RegisterAction.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -b -r1.13 -r1.14
  --- RegisterAction.java	9 Aug 2006 20:30:08 -0000	1.13
  +++ RegisterAction.java	28 Sep 2006 00:36:56 -0000	1.14
  @@ -1,14 +1,11 @@
  -//$Id: RegisterAction.java,v 1.13 2006/08/09 20:30:08 ssilvert Exp $
  +//$Id: RegisterAction.java,v 1.14 2006/09/28 00:36:56 gavin Exp $
   package org.jboss.seam.example.registration;
   
   import java.util.List;
   
   import javax.ejb.Stateless;
  -import javax.faces.context.ExternalContext;
  -import javax.faces.context.FacesContext;
   import javax.persistence.EntityManager;
   import javax.persistence.PersistenceContext;
  -import javax.servlet.ServletRequest;
   
   import org.jboss.seam.annotations.In;
   import org.jboss.seam.annotations.Logger;
  @@ -30,25 +27,6 @@
      @Logger
      private Log log;
      
  -   /**
  -    * This demonstrates passing a parameter to an action from 
  -    * pages.xml.  In this case, we call this method using
  -    * <page view-id="/registered.jsp" 
  -    *       action="#{register.logClientIP(facesContext)}" /> 
  -    *
  -    * Note that facesContext is a reserved word that always
  -    * binds to the current FacesContext instance.
  -    */
  -   public void logClientIP(FacesContext facesContext)
  -   {
  -      ExternalContext extCtx = facesContext.getExternalContext();
  -      if (extCtx.getRequest() instanceof ServletRequest)
  -      {
  -         ServletRequest request = (ServletRequest)extCtx.getRequest();
  -         log.info("Registered user from IP: " + request.getRemoteAddr());
  -      }
  -   }
  -
      public String register()
      {
         List existing = em.createQuery("select username from User where username=:username")
  
  
  



More information about the jboss-cvs-commits mailing list