[seam-commits] Seam SVN: r10670 - in modules/trunk/faces: src/main/java/org/jboss/seam/faces and 1 other directories.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Tue Apr 28 02:14:13 EDT 2009


Author: shane.bryzak at jboss.com
Date: 2009-04-28 02:14:13 -0400 (Tue, 28 Apr 2009)
New Revision: 10670

Added:
   modules/trunk/faces/src/main/java/org/jboss/seam/faces/annotations/
   modules/trunk/faces/src/main/java/org/jboss/seam/faces/annotations/Converter.java
   modules/trunk/faces/src/main/java/org/jboss/seam/faces/annotations/Validator.java
Modified:
   modules/trunk/faces/pom.xml
   modules/trunk/faces/src/main/java/org/jboss/seam/faces/FacesMessages.java
Log:
add faces annotations

Modified: modules/trunk/faces/pom.xml
===================================================================
--- modules/trunk/faces/pom.xml	2009-04-28 06:08:43 UTC (rev 10669)
+++ modules/trunk/faces/pom.xml	2009-04-28 06:14:13 UTC (rev 10670)
@@ -42,7 +42,11 @@
          <groupId>org.jboss.webbeans</groupId>
          <artifactId>jsr299-api</artifactId>
          <scope>provided</scope>
-      </dependency>
+      </dependency>         
+      <dependency>
+         <groupId>org.jboss.webbeans</groupId>
+         <artifactId>webbeans-logging</artifactId>
+      </dependency> 
    </dependencies>
 
 </project>

Modified: modules/trunk/faces/src/main/java/org/jboss/seam/faces/FacesMessages.java
===================================================================
--- modules/trunk/faces/src/main/java/org/jboss/seam/faces/FacesMessages.java	2009-04-28 06:08:43 UTC (rev 10669)
+++ modules/trunk/faces/src/main/java/org/jboss/seam/faces/FacesMessages.java	2009-04-28 06:14:13 UTC (rev 10670)
@@ -1,9 +1,11 @@
 package org.jboss.seam.faces;
 
+import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
+import javax.context.ConversationScoped;
 import javax.faces.application.FacesMessage;
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
@@ -18,6 +20,7 @@
  * @author Gavin King
  * @author Pete Muir
  */
+ at ConversationScoped
 public class FacesMessages extends StatusMessages
 {
    /**

Added: modules/trunk/faces/src/main/java/org/jboss/seam/faces/annotations/Converter.java
===================================================================
--- modules/trunk/faces/src/main/java/org/jboss/seam/faces/annotations/Converter.java	                        (rev 0)
+++ modules/trunk/faces/src/main/java/org/jboss/seam/faces/annotations/Converter.java	2009-04-28 06:14:13 UTC (rev 10670)
@@ -0,0 +1,32 @@
+package org.jboss.seam.faces.annotations;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Allows a Seam component to act as a JSF converter. The
+ * annotated class must be a Seam component, and must
+ * implement javax.faces.convert.Converter.
+ * 
+ * @author Gavin King
+ *
+ */
+ at Target(TYPE)
+ at Retention(RUNTIME)
+ at Documented
+public @interface Converter
+{
+   /**
+    * The JSF converter id. Default to the component name.
+    */
+   String id() default "";
+   /**
+    * If specified, register this component as the default
+    * converter for a type.
+    */
+   Class forClass() default void.class;
+}

Added: modules/trunk/faces/src/main/java/org/jboss/seam/faces/annotations/Validator.java
===================================================================
--- modules/trunk/faces/src/main/java/org/jboss/seam/faces/annotations/Validator.java	                        (rev 0)
+++ modules/trunk/faces/src/main/java/org/jboss/seam/faces/annotations/Validator.java	2009-04-28 06:14:13 UTC (rev 10670)
@@ -0,0 +1,27 @@
+package org.jboss.seam.faces.annotations;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Allows a Seam component to act as a JSF validator. The
+ * annotated class must be a Seam component, and must
+ * implement javax.faces.validator.Validator.
+ * 
+ * @author Gavin King
+ *
+ */
+ at Target(TYPE)
+ at Retention(RUNTIME)
+ at Documented
+public @interface Validator
+{
+   /**
+    * The JSF validator id. Default to the component name.
+    */
+   String id() default "";
+}




More information about the seam-commits mailing list