Author: alexsmirnov
Date: 2008-07-03 15:24:07 -0400 (Thu, 03 Jul 2008)
New Revision: 9413
Added:
trunk/sandbox/ui/beanValidator/src/main/java/META-INF/
trunk/sandbox/ui/beanValidator/src/main/java/META-INF/MANIFEST.MF
trunk/sandbox/ui/beanValidator/src/main/java/org/richfaces/component/
trunk/sandbox/ui/beanValidator/src/main/java/org/richfaces/component/UIBeanValidator.java
trunk/sandbox/ui/beanValidator/src/main/java/org/richfaces/validator/
trunk/sandbox/ui/beanValidator/src/main/java/org/richfaces/validator/BeanValidator.java
trunk/sandbox/ui/beanValidator/src/test/java/org/richfaces/component/
trunk/sandbox/ui/beanValidator/src/test/java/org/richfaces/component/JSFComponentTest.java
Removed:
trunk/sandbox/ui/beanValidator/src/main/java/org/richfaces/ui/component/
trunk/sandbox/ui/beanValidator/src/test/java/org/richfaces/ui/component/
Modified:
trunk/sandbox/ui/beanValidator/pom.xml
trunk/sandbox/ui/beanValidator/src/main/config/component/beanValidator.xml
trunk/sandbox/ui/beanValidator/src/main/templates/org/richfaces/ui/htmlBeanValidator.jspx
Log:
Create stub projects for a Bean Validator and Flex integration
Modified: trunk/sandbox/ui/beanValidator/pom.xml
===================================================================
--- trunk/sandbox/ui/beanValidator/pom.xml 2008-07-03 17:40:59 UTC (rev 9412)
+++ trunk/sandbox/ui/beanValidator/pom.xml 2008-07-03 19:24:07 UTC (rev 9413)
@@ -1,50 +1,66 @@
-<?xml version="1.0"?><project>
- <parent>
- <artifactId>ui</artifactId>
- <groupId>org.richfaces.sandbox</groupId>
- <version>3.2.2-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.richfaces.ui</groupId>
- <artifactId>beanValidator</artifactId>
- <name>beanValidator</name>
- <version>3.2.2-SNAPSHOT</version>
- <build>
- <plugins>
- <plugin>
- <groupId>org.richfaces.cdk</groupId>
- <artifactId>maven-cdk-plugin</artifactId>
- <version>3.2.2-SNAPSHOT</version>
- <executions>
- <execution>
- <phase>generate-sources</phase>
- <goals>
- <goal>generate</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <library>
- <prefix>org.richfaces.ui</prefix>
- <taglib>
- <shortName>beanValidator</shortName>
- </taglib>
- </library>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.richfaces.framework</groupId>
- <artifactId>richfaces-impl</artifactId>
- <version>3.2.2-SNAPSHOT</version>
- </dependency>
- </dependencies>
+<?xml version="1.0"?>
+<project>
+ <parent>
+ <artifactId>ui</artifactId>
+ <groupId>org.richfaces.sandbox</groupId>
+ <version>3.2.2-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>beanValidator</artifactId>
+ <name>beanValidator</name>
+ <version>3.2.2-SNAPSHOT</version>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>maven-cdk-plugin</artifactId>
+ <version>3.2.2-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <library>
+ <prefix>org.richfaces.ui</prefix>
+ <taglib>
+ <shortName>beanValidator</shortName>
+ </taglib>
+ </library>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.framework</groupId>
+ <artifactId>richfaces-impl</artifactId>
+ <version>3.2.2-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-validator</artifactId>
+ <version>3.1.0.CR1</version>
+ <exclusions>
+ <exclusion>
+ <artifactId>hibernate-core</artifactId>
+ <groupId>org.hibernate</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>slf4j-api</artifactId>
+ <groupId>org.slf4j</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
</project>
\ No newline at end of file
Modified: trunk/sandbox/ui/beanValidator/src/main/config/component/beanValidator.xml
===================================================================
--- trunk/sandbox/ui/beanValidator/src/main/config/component/beanValidator.xml 2008-07-03
17:40:59 UTC (rev 9412)
+++ trunk/sandbox/ui/beanValidator/src/main/config/component/beanValidator.xml 2008-07-03
19:24:07 UTC (rev 9413)
@@ -3,21 +3,21 @@
<components>
<component>
- <name>org.richfaces.ui.BeanValidator</name>
- <family>org.richfaces.ui.BeanValidator</family>
- <classname>org.richfaces.ui.component.html.HtmlBeanValidator</classname>
- <superclass>org.richfaces.ui.component.UIBeanValidator</superclass>
+ <name>org.richfaces.BeanValidator</name>
+ <family>org.richfaces.BeanValidator</family>
+ <classname>org.richfaces.component.html.HtmlBeanValidator</classname>
+ <superclass>org.richfaces.component.UIBeanValidator</superclass>
<description>
<![CDATA[
]]>
</description>
<renderer generate="true" override="true">
- <name>org.richfaces.ui.BeanValidatorRenderer</name>
+ <name>org.richfaces.BeanValidatorRenderer</name>
<template>org/richfaces/ui/htmlBeanValidator.jspx</template>
</renderer>
<tag>
- <name>beanValidator</name>
- <classname>org.richfaces.ui.taglib.BeanValidatorTag</classname>
+ <name>ajaxValidator</name>
+ <classname>org.richfaces.taglib.BeanValidatorTag</classname>
<superclass>
org.ajax4jsf.webapp.taglib.HtmlComponentTagBase
</superclass>
@@ -38,4 +38,17 @@
</property>
-->
</component>
+ <validator generate="false">
+ <id>org.richfaces.BeanValidator</id>
+ <classname>org.richfaces.validator.BeanValidator</classname>
+ <description>
+ <![CDATA[Validate Input by the Bean/Hibernate validator annotations]]>
+ </description>
+ <tag>
+ <name>beanValidator</name>
+ <classname>org.richfaces.taglib.BeanValidatorTag</classname>
+ <superclass>javax.faces.webapp.ValidatorELTag</superclass>
+ </tag>
+ </validator>
+
</components>
Added: trunk/sandbox/ui/beanValidator/src/main/java/META-INF/MANIFEST.MF
===================================================================
--- trunk/sandbox/ui/beanValidator/src/main/java/META-INF/MANIFEST.MF
(rev 0)
+++ trunk/sandbox/ui/beanValidator/src/main/java/META-INF/MANIFEST.MF 2008-07-03 19:24:07
UTC (rev 9413)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Property changes on: trunk/sandbox/ui/beanValidator/src/main/java/META-INF/MANIFEST.MF
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied:
trunk/sandbox/ui/beanValidator/src/main/java/org/richfaces/component/UIBeanValidator.java
(from rev 9412,
trunk/sandbox/ui/beanValidator/src/main/java/org/richfaces/ui/component/UIBeanValidator.java)
===================================================================
---
trunk/sandbox/ui/beanValidator/src/main/java/org/richfaces/component/UIBeanValidator.java
(rev 0)
+++
trunk/sandbox/ui/beanValidator/src/main/java/org/richfaces/component/UIBeanValidator.java 2008-07-03
19:24:07 UTC (rev 9413)
@@ -0,0 +1,19 @@
+/**
+ *
+ */
+
+package org.richfaces.component;
+
+import javax.faces.component.UIComponentBase;
+
+/**
+ * JSF component class
+ *
+ */
+public abstract class UIBeanValidator extends UIComponentBase {
+
+ public static final String COMPONENT_TYPE = "org.richfaces.ui.BeanValidator";
+
+ public static final String COMPONENT_FAMILY =
"org.richfaces.ui.BeanValidator";
+
+}
Property changes on:
trunk/sandbox/ui/beanValidator/src/main/java/org/richfaces/component/UIBeanValidator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/sandbox/ui/beanValidator/src/main/java/org/richfaces/validator/BeanValidator.java
===================================================================
---
trunk/sandbox/ui/beanValidator/src/main/java/org/richfaces/validator/BeanValidator.java
(rev 0)
+++
trunk/sandbox/ui/beanValidator/src/main/java/org/richfaces/validator/BeanValidator.java 2008-07-03
19:24:07 UTC (rev 9413)
@@ -0,0 +1,26 @@
+/**
+ *
+ */
+package org.richfaces.validator;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.validator.Validator;
+import javax.faces.validator.ValidatorException;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class BeanValidator implements Validator {
+
+ /* (non-Javadoc)
+ * @see javax.faces.validator.Validator#validate(javax.faces.context.FacesContext,
javax.faces.component.UIComponent, java.lang.Object)
+ */
+ public void validate(FacesContext context, UIComponent component, Object
convertedValue)
+ throws ValidatorException {
+ // TODO Auto-generated method stub
+
+ }
+
+}
Property changes on:
trunk/sandbox/ui/beanValidator/src/main/java/org/richfaces/validator/BeanValidator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
trunk/sandbox/ui/beanValidator/src/main/templates/org/richfaces/ui/htmlBeanValidator.jspx
===================================================================
---
trunk/sandbox/ui/beanValidator/src/main/templates/org/richfaces/ui/htmlBeanValidator.jspx 2008-07-03
17:40:59 UTC (rev 9412)
+++
trunk/sandbox/ui/beanValidator/src/main/templates/org/richfaces/ui/htmlBeanValidator.jspx 2008-07-03
19:24:07 UTC (rev 9413)
@@ -5,9 +5,9 @@
xmlns:ui="
http://ajax4jsf.org/cdk/ui"
xmlns:u="
http://ajax4jsf.org/cdk/u"
xmlns:x="
http://ajax4jsf.org/cdk/x"
- class="org.richfaces.ui.renderkit.html.BeanValidatorRenderer"
+ class="org.richfaces.renderkit.html.BeanValidatorRenderer"
baseclass="org.ajax4jsf.renderkit.AjaxComponentRendererBase"
- component="org.richfaces.ui.component.UIBeanValidator"
+ component="org.richfaces.component.UIBeanValidator"
<f:clientid var="clientId"/>
<div id="#{clientId}"
Copied:
trunk/sandbox/ui/beanValidator/src/test/java/org/richfaces/component/JSFComponentTest.java
(from rev 9412,
trunk/sandbox/ui/beanValidator/src/test/java/org/richfaces/ui/component/JSFComponentTest.java)
===================================================================
---
trunk/sandbox/ui/beanValidator/src/test/java/org/richfaces/component/JSFComponentTest.java
(rev 0)
+++
trunk/sandbox/ui/beanValidator/src/test/java/org/richfaces/component/JSFComponentTest.java 2008-07-03
19:24:07 UTC (rev 9413)
@@ -0,0 +1,53 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.component;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+import javax.faces.component.UIComponent;
+
+/**
+ * Unit test for simple Component.
+ */
+public class JSFComponentTest
+ extends TestCase
+{
+ /**
+ * Create the test case
+ *
+ * @param testName name of the test case
+ */
+ public JSFComponentTest( String testName )
+ {
+ super( testName );
+ }
+
+
+ /**
+ * Rigourous Test :-)
+ */
+ public void testComponent()
+ {
+ assertTrue( true );
+ }
+}
Property changes on:
trunk/sandbox/ui/beanValidator/src/test/java/org/richfaces/component/JSFComponentTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain