Permalink
Browse files

Merge remote branch 'toolman/master' into mergeAttempt

* toolman/master: (24 commits)
  merge fixes
  Removed accidental checked in target files.  added .gitignore for eclipse files
  Finally got 100% test coverage.  mock JS methods needed updating to match newer codebase JS
  0.9.2-SNAPSHOT startpoint
  POM tidyup
  Moved to 0.9.1 version
  CRLF fix
  valang updates
  Validate on submit in TLD
  Added support for field annotations on super class.
  Stopped onkeypress validation checking.
  removed annoying comment making lots of noise.
  Added per-input-type events. click on radio but not text input etc.
  Removed excessive handler addons
  Added remove event test to fix iE being a pain
  Improved event handling. Now only 1 event per field, not 1 per rule.
  event handler added to addRules items.
  Added better handler support
  date parsing moved out to generic place.
  client JS updates
  ...

Conflicts:
	pom.xml
	projects/pom.xml
  • Loading branch information...
2 parents eade2fb + 0d74cff commit fcba307f8427c8222b0b6ce1af6edbc9b1f98a21 @astubbs committed Apr 28, 2010
Showing 526 changed files with 3,529 additions and 6,969 deletions.
View
@@ -0,0 +1,88 @@
+# Welcome to SpringModules Fork!
+
+This is a resurrection of the extremely valuable and abandoned Spring-Modules project.
+
+The plan is to fully embrace Maven as the build tool and eventually throw out all the old build code.
+
+At this point, all the old jar libraries and _generated_ documentation have been pruned from the repository history.
+This pruning has reduced the size of the repository from 95m to 7m. Nice.
+
+The idea will be to slowly add one by one, as the are compile ready, to the parent module section, so they can be included.
+
+Remember, you can add issues to git-hub, and you can link them to the Jira issues. Ideally we need admin access to the SpringModules Jira, but that's a long shot. So, if there's a patch in Jira you want us to apply, create a git-hub issue for it.
+
+Msg/email me on antony.stubbs@gmail.com to discuss!
+
+# Mailing List
+
+Here are the essentials:
+
+* Group name: spring-modules-fork
+* Group home page: http://groups.google.com/group/spring-modules-fork
+* Group email address spring-modules-fork@googlegroups.com
+
+# Questions
+
+* Shall we change the name, or at least the Maven groupId?
+
+# Release
+
+Finally! After over a year of waiting, we are starting to release SNAPSHOT versions of 0.10. ATM, only the cache module has a 0.10-SNAPSHOT version. However, as we receive patches for other modules, those will get releases too.
+
+## Repository
+
+The releases are being hosted on my own server - so please, be nice and use a proxy like Nexus!
+
+Add this to your pom.xml:
+
+ <repositories>
+ <repository>
+ <id>sharca.com.repo</id>
+ <name>SharcaConsulting Repository</name>
+ <url>http://www.sharca.com/repository</url>
+ </repository>
+ </repositories>
+
+And use this as a dependency:
+
+ <dependency>
+ <groupId>org.springmodules</groupId>
+ <artifactId>spring-modules-cache</artifactId>
+ <version>0.10-SNAPSHOT</version>
+ </dependency>
+
+# Goals
+
+* Any module in this release will be built completely in with Maven
+* Apply the most annoying patches from Jira
+
+## So Far
+
+* anounced: http://stubbisms.wordpress.com/2009/07/08/spring-modules-fork/
+* uploaded
+* cache module migrated to Maven
+* all pom's applied from the patch under MOD-463 with some fixes
+* jar's and generated documentation removed
+* upgraded to Spring 2.5
+
+# Submitting Patches
+
+You have several options.
+
+The best option is to use git like it's intended, and commit to your local repo, push up to yoru github account and send a pull request, or talk about your feature branch on the mailing list.
+
+Otherwise, you can still generate patches using:
+
+* git format-patch origin
+
+And again, email the files to the mailing list or an issue on git-hub.
+
+But, if you don't want to get too involved with git pushing etc, then:
+
+ install git (If you're on windows, I suggest using git through cygwin. Mac I suggest installing git with MacPorts)
+ run git clone git://github.com/astubbs/spring-modules.git
+
+Make your changes - i.e. edit the code, apply a patch off of jira site etc...
+
+ git diff > my.patch
+ email the patch to the mailing list, or attach to an issue on git-hub
View
27 pom.xml
@@ -15,33 +15,6 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
- <profiles>
- <profile>
- <id>eclipse</id>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-eclipse-plugin</artifactId>
- <version>2.7</version>
- <configuration>
- <downloadSources>true</downloadSources>
- <downloadJavadocs>true</downloadJavadocs>
- <wtpversion>1.5</wtpversion>
- <ajdtVersion>none</ajdtVersion>
- <!--
- see: http://jira.codehaus.org/browse/MECLIPSE-558 and
- http://jira.codehaus.org/browse/MECLIPSE-594
- -->
- <additionalProjectnatures>
- <projectnature>org.springframework.ide.eclipse.core.springnature</projectnature>
- </additionalProjectnatures>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
<modules>
<module>projects</module>
<!--
View
@@ -11,6 +11,7 @@
<artifactId>projects</artifactId>
<version>0.10-SNAPSHOT</version>
<packaging>pom</packaging>
+
<modules>
<!-- <module>spring-modules-ant</module>
<module>spring-modules-aop</module> -->
@@ -31,7 +32,7 @@
<module>spring-modules-springmvc-extra</module>
<!-- <module>spring-modules-tapestry</module>-->
<!-- <module>spring-modules-template</module> -->
-<!-- <module>spring-modules-validation</module>-->
+ <module>spring-modules-validation</module>
<!-- <module>spring-modules-xt</module> -->
</modules>
@@ -1,7 +1,5 @@
-#Mon Feb 18 15:50:45 GMT 2008
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
+#Fri Jul 31 10:53:34 NZST 2009
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
@@ -0,0 +1,6 @@
+http\://www.springmodules.org/schema/ehcache=org.springmodules.cache.config.ehcache.EhCacheNamespaceHandler
+http\://www.springmodules.org/schema/jboss=org.springmodules.cache.config.jboss.JbossCacheNamespaceHandler
+http\://www.springmodules.org/schema/jcs=org.springmodules.cache.config.jcs.JcsNamespaceHandler
+http\://www.springmodules.org/schema/oscache=org.springmodules.cache.config.oscache.OsCacheNamespaceHandler
+http\://www.springmodules.org/schema/coherence=org.springmodules.cache.config.tangosol.CoherenceNamespaceHandler
+http\://www.springmodules.org/schema/gigaspaces=org.springmodules.cache.config.gigaspaces.GigaSpacesNamespaceHandler
@@ -0,0 +1,7 @@
+http\://www.springmodules.org/schema/cache/springmodules-cache.xsd=org/springmodules/cache/config/springmodules-cache.xsd
+http\://www.springmodules.org/schema/cache/springmodules-ehcache.xsd=org/springmodules/cache/config/ehcache/springmodules-ehcache.xsd
+http\://www.springmodules.org/schema/cache/springmodules-jboss.xsd=org/springmodules/cache/config/jboss/springmodules-jboss.xsd
+http\://www.springmodules.org/schema/cache/springmodules-jcs.xsd=org/springmodules/cache/config/jcs/springmodules-jcs.xsd
+http\://www.springmodules.org/schema/cache/springmodules-oscache.xsd=org/springmodules/cache/config/oscache/springmodules-oscache.xsd
+http\://www.springmodules.org/schema/cache/springmodules-tangosol.xsd=org/springmodules/cache/config/tangosol/springmodules-tangosol.xsd
+http\://www.springmodules.org/schema/cache/springmodules-gigaspaces.xsd=org/springmodules/cache/config/gigaspaces/springmodules-gigaspaces.xsd
@@ -0,0 +1,81 @@
+Annotation based client side validation
+
+New in 0.10 is (partial) client side support for your annotation based validation. This is still experimental, and assumes all the expressions to be in Valang (I am still unclear if/when OGNL is used). The client code does do cross field checks, but the targets must also be on the command object, and be rendered to <INPUT..> tags or similar - how else could it see the other fields! All supported validation annotations are converted to valang equivalents; we reuse the valang client side framework.
+
+Currently supported field annotations:
+
+* @Email
+* @Expression
+* @Expressions
+* @InTheFuture *
+* @InThePast *
+* @Length
+* @Max
+* @MaxLength
+* @MaxSize
+* @Min
+* @MinLength
+* @MinSize
+* @NotBlank
+* @NotEmpty
+* @NotNull
+* @Range
+* @RegExp
+* @Size
+
+Note that the @InThe(Future|Past) annotations will probably need an implementation of ValangValidator.Rule.prototype.parseDate; see below.
+
+Currently supported Class annotations:
+
+* @Expression
+* @Expressions
+
+
+To setup your client side validation, you will need:
+* A command object (bean) annotated with the spring modules validation annotations.
+* <%@taglib uri="/WEB-INF/tlds/valang.tld" prefix="vl"%> in your JSP
+* The valang_codebase.js file is either included directly (copy from inside JAR to your webapp) , or by using the <vl:codebase..> tag.
+* <vl:beanValidate commandName="[CommandObjectBeanName]" /> inluded on the page
+
+And it should just work!
+
+If you want to add support for other Annotations, you will need to author a Handler, and instantiate the converter
+to include the custom handler. The tag will automatically look for beans in the webapplicationcontext, and use it
+if available.
+
+example:
+
+
+<bean id="annotationConverter"
+ class="org.springmodules.validation.bean.annotation.javascript.taglib.CommandObjectToValangConverter">
+ <property name="registerFieldMethodHandlers" >
+ <set>
+ <!-- this bean implements Handler -->
+ <bean class="com.myCompany.ExampleHandler"/>
+ <bean class="com.myCompany.AnotherExampleHandler"/>
+ </set>
+ </property>
+</bean>
+
+
+
+The codebase has had some updates:
+
+* You can override ValangValidator.prototype.fieldValidationCallback = function(field, isValid, ruleCount); if you want something to happen when the per-field validation happens. If ruleCount == 0, isValid will be true, as no rules failed!
+* You can override ValangValidator.prototype.formValidationCallback = function(field, isValid); if you want something to happen on whole-form validation.
+* You should override ValangValidator.Rule.prototype.parseDate = function(dateString, fieldName); which is a javascript dateString -> JS Date function to support your intended date format. The default implementation uses the JavaScript Date.parse() method, which doesnt support many formats. Also, note that the field name is passed in so different fields can have differing formats.
+* The globalErrorsId and fieldErrorIdSuffix variables have been moved from global namespace into the ValangValidator object, and the logs ID has been made a variable also:
+** ValangValidator.prototype.globalErrorsId - the ID for all global (class level) errors to render to
+** ValangValidator.prototype.fieldErrorIdSuffix - the suffix to append to the field name to construct the ID of the error message target.
+** ValangValidator.Logger.logId - the ID to inject log messages into.
+** Can be set with the <vl:codebase logId="myLog" globalErrorsId="myGlobalErrors" fieldErrorIdSuffix="_myErrSuffix"/> tag if it is used.
+* The default logger has a huge performance improvement, now uses nested lists instead of simply appending to the innerHTML.
+
+
+
+
+
+
+
+
+
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.springmodules</groupId>
+ <artifactId>projects</artifactId>
+ <version>0.10-SNAPSHOT</version>
+ </parent>
+ <groupId>org.springmodules</groupId>
+ <artifactId>spring-modules-validation-parent</artifactId>
+ <version>0.9.2-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>spring-modules-validation</module>
+ <module>spring-modules-validation-base</module>
+ <module>spring-modules-validation-jdk15</module>
+ </modules>
+
+<!-- for temporary internal deploys.
+ <distributionManagement>
+ <repository>
+ <id>inhouse</id>
+ <name>inhouse</name>
+ <url>http://10.44.211.210:8081/nexus/content/repositories/inhouse</url>
+ </repository>
+ <snapshotRepository>
+ <id>inhouse.snapshot</id>
+ <name>inhouse.snapshot</name>
+ <url>http://10.44.211.210:8081/nexus/content/repositories/inhouse.snapshot</url>
+ </snapshotRepository>
+ </distributionManagement>
+-->
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.6</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.easymock</groupId>
+ <artifactId>easymock</artifactId>
+ <version>${version.easymock}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.easymock</groupId>
+ <artifactId>easymockclassextension</artifactId>
+ <version>${version.easymock}</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" output="target/classes" path="src/main/java"/>
+ <classpathentry kind="src" output="target/classes" path="target/generated-sources/javacc"/>
+ <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
+ <classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
@@ -0,0 +1,17 @@
+<projectDescription>
+ <name>spring-modules-validation-base</name>
+ <comment/>
+ <projects/>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
@@ -0,0 +1,5 @@
+#Fri Aug 21 10:20:59 NZST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.source=1.5
@@ -0,0 +1,9 @@
+#Wed Oct 14 09:56:08 NZDT 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=false
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1
Oops, something went wrong.

0 comments on commit fcba307

Please sign in to comment.