Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

- removed commons and aop package (moved to projects/ folder)

  • Loading branch information...
commit 3f982bd67ddcab5fe5731dd6c6745cb6ae9517d0 1 parent 740ba4c
costin authored
View
145 src/java/org/springmodules/aop/framework/TouchingAfterReturningAdvice.java
@@ -1,145 +0,0 @@
-package org.springmodules.aop.framework;
-
-import java.lang.reflect.Method;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import ognl.Ognl;
-import ognl.OgnlException;
-
-import org.springframework.aop.AfterReturningAdvice;
-import org.springframework.beans.BeanWrapper;
-import org.springframework.beans.BeanWrapperImpl;
-import org.springframework.beans.BeansException;
-import org.springframework.util.MethodInvoker;
-
-/**
- * <p>Touches configurable properties on the return value of a method invocation.
- * This approach is an alternative to the open session in view pattern.
- *
- * <p>If the return value is a single object the properties are touched on this
- * object. If the return value is an instance of java.util.Collection or Object[]
- * the properties are touched on every element.
- *
- * <p>If no properties are specified collections will still be iterated entirely.
- *
- * <p>Property values can be either property names or maps containing property names
- * as keys and lists containing property names as values. Maps entries represent bean
- * properties (the key of the map entries) that are collections. All elements of those collection will
- * be touched by the properties (the values of the map entries). This construct can
- * be cascaded.
- *
- * <p>OGNL expressions are also supported. These expression will be executed after the properties
- * have been executed on the return value of the method invocation. To support the evaluation of collections
- * you can use the <code>#returned</code> variable in the OGNL context which holds the return value.
- *
- * <p>To load all elements of a returned collection instance use OGNL's pseudo-property size:
- *
- * <pre>
- * #returned.size
- * </pre>
- *
- * @author Steven Devijver
- * @since 20-06-2005
- *
- */
-public class TouchingAfterReturningAdvice implements AfterReturningAdvice {
-
- private Object[] properties = null;
- private String[] ognlExpressions = null;
-
- /**
- * <p>The [properties] properties takes a list of property strings.
- * The return value of the method invocation will be touched with these
- * properties.
- *
- * @param properties the property strings
- */
- public void setProperties(Object[] properties) {
- this.properties = properties;
- }
-
- /**
- * <p>The [ognl] property takes a list of OGNL expressions that will be
- * evaluated on the return value of the method invocation.
- *
- * @param ognlExpressions the OGNL expressions
- */
- public void setOgnl(String[] ognlExpressions) {
- this.ognlExpressions = ognlExpressions;
- }
-
- public void afterReturning(Object returnValue, Method method, Object[] args, Object target) throws Throwable {
- if (returnValue == null) {
- return;
- }
-
- if (returnValue instanceof MethodInvoker.VoidType) {
- return;
- } else if (returnValue instanceof Collection) {
- touch(((Collection)returnValue).toArray(), properties);
- } else if (returnValue instanceof Object[]) {
- touch((Object[])returnValue, properties);
- } else {
- touch(returnValue, properties);
- }
- touchOgnl(returnValue, ognlExpressions);
-
- }
-
- private static void touch(Object[] objects, Object[] properties) {
- for (int i = 0; objects != null && properties != null && i < objects.length; i++) {
- Object target = objects[i];
- touch(target, properties);
- }
- }
-
- private static void touch(Object target, Object[] properties) {
- BeanWrapper beanWrapper = new BeanWrapperImpl(target);
- for (int x = 0; properties != null && x < properties.length; x++) {
- Object property = properties[x];
- if (property instanceof String) {
- Object result = beanWrapper.getPropertyValue((String)property);
- if (result instanceof Collection) {
- ((Collection)result).size();
- }
- } else if (property instanceof Map) {
- for (Iterator iter = ((Map)property).keySet().iterator(); iter.hasNext();) {
- Object key = iter.next();
- Object tmpProperties = ((Map)property).get(key);
- if (!(key instanceof String)) {
- throw new IllegalArgumentException("Maps configured in the [properties] property should have a string key!");
- }
- if (!(tmpProperties instanceof Collection)) {
- throw new IllegalArgumentException("Maps configured in the [properties] property should have a list value!");
- }
- Object result = beanWrapper.getPropertyValue((String)key);
- if (result instanceof Collection) {
- touch(((Collection)result).toArray(), ((Collection)tmpProperties).toArray());
- } else if (result instanceof Object[]) {
- touch((Object[])result, ((Collection)tmpProperties).toArray());
- } else {
- touch(result, ((Collection)tmpProperties).toArray());
- }
- }
- } else {
- throw new IllegalArgumentException("[properties] property should only contain string and map instances!");
- }
- }
- }
-
- private static void touchOgnl(Object target, String[] ognlExpressions) {
- for (int i = 0; ognlExpressions != null && i < ognlExpressions.length; i++) {
- String ognlExpression = ognlExpressions[i];
- try {
- Map context = new HashMap();
- context.put("returned", target);
- Ognl.getValue(ognlExpression, context, target);
- } catch (OgnlException e) {
- throw new BeansException("Error occured while evaluating OGNL expression [" + ognlExpression + "]!", e) {};
- }
- }
- }
-}
View
39 src/java/org/springmodules/aop/framework/TouchingNameMatchMethodAdvisor.java
@@ -1,39 +0,0 @@
-package org.springmodules.aop.framework;
-
-import org.springframework.aop.support.NameMatchMethodPointcutAdvisor;
-import org.springframework.beans.factory.InitializingBean;
-
-/**
- * <p>Convenience class based on NameMatchMethodPointcutAdvisor that
- * has a TouchingAfterReturningAdvice advice.
- *
- * @author Steven Devijver
- * @since 21-06-2005
- * @see org.springframework.aop.support.NameMatchMethodPointcutAdvisor
- * @see org.springmodules.aop.framework.TouchingAfterReturningAdvice
- */
-public class TouchingNameMatchMethodAdvisor extends
- NameMatchMethodPointcutAdvisor {
-
- private TouchingAfterReturningAdvice advice = null;
-
- public TouchingNameMatchMethodAdvisor() {
- super();
- this.advice = new TouchingAfterReturningAdvice();
- setAdvice(advice);
- }
-
- /**
- * <p>Property to access the TouchingAfterReturningAdvice
- * configured with this advisor.
- *
- * <p>To access the [properties] and [ognl] properties of
- * TouchingAfterReturningAdvice use <code>touchingAdvice.properties</code>
- * and <code>touchingAdvice.ognl</code>.
- *
- * @return the TouchingAfterReturningAdvice instance
- */
- public TouchingAfterReturningAdvice getTouchingAdvice() {
- return this.advice;
- }
-}
View
4 src/test/META-INF/services/org.springmodules.jcr.SessionHolderProvider
@@ -1,4 +0,0 @@
-#
-# JackRabbit specific SessionHolderProvider.
-#
-org.springmodules.jcr.jackrabbit.support.JackRabbitSessionHolderProvider
View
133 src/test/org/springmodules/aop/framework/TouchingAfterReturningAdviceTests.java
@@ -1,133 +0,0 @@
-package org.springmodules.aop.framework;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import junit.framework.TestCase;
-
-import org.springframework.aop.framework.ProxyFactory;
-
-public class TouchingAfterReturningAdviceTests extends TestCase {
-
- public TouchingAfterReturningAdviceTests() {
- super();
- }
-
- private static final String BEAN_NAME = "Bean name";
-
- private Bean getBean() {
- Bean bean = new DefaultBean();
- bean.setBeans(new Bean[] {
- new DefaultBean() {
- {
- setBean(new DefaultBean());
- setBeans(new Bean[] { new DefaultBean() });
- }
- },
- new DefaultBean() {
- {
- setBeans(new Bean[] { new DefaultBean() });
- }
- }
- });
- bean.setBean(bean);
- bean.setOtherBeans(Arrays.asList(bean.getBeans()));
- return bean;
- }
-
-
- public void testTouchingAdvice() {
- Bean bean = (Bean)getProxy(getBean(), new String[] { "autoName" }, new String[] { "autoName"}, new String[] { "getBean" });
- bean.getBean();
- assertEquals(BEAN_NAME, bean.getName());
-
- bean = (Bean)getProxy(getBean(), new String[] { "autoName" }, new String[] { "#returned.{autoName}" }, new String[] { "getBeans" });
- Bean[] beans = bean.getBeans();
- assertEquals(BEAN_NAME, beans[0].getName());
- assertEquals(BEAN_NAME, beans[1].getName());
-
- bean = (Bean)getProxy(getBean(), new Object[] { "autoName" }, new String[] { "#returned.{autoName}" }, new String[] { "getOtherBeans" });
- List otherBeans = bean.getOtherBeans();
- assertEquals(BEAN_NAME, ((Bean)otherBeans.get(0)).getName());
- assertEquals(BEAN_NAME, ((Bean)otherBeans.get(1)).getName());
-
- Map map = new HashMap();
- List list = new ArrayList();
- list.add("autoName");
- map.put("beans", list);
- bean = (Bean)getProxy(getBean(), new Object[] { "autoName", map }, new String[] { "#returned.{beans.{autoName}}" }, new String[] { "getBeans" });
- beans = bean.getBeans();
- assertEquals(BEAN_NAME, beans[0].getName());
- assertEquals(BEAN_NAME, beans[1].getName());
- assertEquals(BEAN_NAME, beans[0].getBeans()[0].getName());
- assertEquals(BEAN_NAME, beans[1].getBeans()[0].getName());
- }
-
-
-
- private Object getProxy(Object target, Object[] properties, String[] ognl, String[] mappedNames) {
- TouchingNameMatchMethodAdvisor advisor = new TouchingNameMatchMethodAdvisor();
- advisor.setMappedNames(mappedNames);
- advisor.getTouchingAdvice().setProperties(properties);
- advisor.getTouchingAdvice().setOgnl(ognl);
- ProxyFactory pf = new ProxyFactory(target);
- pf.addAdvisor(advisor);
- return pf.getProxy();
- }
-
-
-
- public interface Bean {
- public Bean[] getBeans();
- public void setBeans(Bean[] beans);
- public List getOtherBeans();
- public void setOtherBeans(List otherBeans);
- public Bean getBean();
- public void setBean(Bean bean);
- public String getName();
- public String getAutoName();
- }
-
- public static class DefaultBean implements Bean {
- private Bean[] beans = null;
- private Bean bean = null;
- private List otherBeans = null;
- public String name = null;
-
- public Bean getBean() {
- return this.bean;
- }
-
- public Bean[] getBeans() {
- return this.beans;
- }
-
- public String getName() {
- return this.name;
- }
-
- public String getAutoName() {
- this.name = BEAN_NAME;
- return this.name;
- }
-
- public List getOtherBeans() {
- return this.otherBeans;
- }
-
- public void setBean(Bean bean) {
- this.bean = bean;
- }
-
- public void setBeans(Bean[] beans) {
- this.beans = beans;
- }
-
- public void setOtherBeans(List otherBeans) {
- this.otherBeans = otherBeans;
- }
- }
-}
View
94 src/test/org/springmodules/commons/lang/CommonsEnumPropertyEditorTests.java
@@ -1,94 +0,0 @@
-/*
- * Created on July 12, 2005
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- *
- * Copyright @2005 the original author or authors.
- */
-package org.springmodules.commons.lang;
-
-import org.apache.commons.lang.enums.Enum;
-
-import junit.framework.TestCase;
-
-/**
- *
- */
-public class CommonsEnumPropertyEditorTests extends TestCase {
-
- private CommonsEnumPropertyEditor editor;
-
- /*
- * @see TestCase#setUp()
- */
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- /*
- * Class under test for String getAsText()
- */
- public void testGetAsText() {
- editor = new CommonsEnumPropertyEditor(Country.class, false);
- editor.setValue(Country.US);
- assertEquals("US", editor.getAsText());
-
- editor = new CommonsEnumPropertyEditor(SecretQuestion.class, false);
- editor.setValue(SecretQuestion.LAST_FOUR_SSN);
- assertEquals(SecretQuestion.LAST_FOUR_SSN.getName(), editor.getAsText());
- }
-
- /*
- * Class under test for void setAsText(String)
- */
- public void testSetAsTextString() {
- editor = new CommonsEnumPropertyEditor(Country.class, false);
- editor.setAsText("US");
- assertEquals(Country.US, editor.getValue());
-
- editor = new CommonsEnumPropertyEditor(SecretQuestion.class, false);
- editor.setAsText(SecretQuestion.LAST_FOUR_SSN.getName());
- assertEquals(SecretQuestion.LAST_FOUR_SSN, editor.getValue());
- }
-
- public void testSetAsTestWithNullString() {
- editor = new CommonsEnumPropertyEditor(Country.class, true);
- editor.setAsText(null);
- assertNull(editor.getValue());
- }
-
- public void testSetAsTestWithEmptyString() {
- editor = new CommonsEnumPropertyEditor(Country.class, true);
- editor.setAsText("");
- assertNull(editor.getValue());
- }
-
- static class Country extends Enum {
- public static final Country US = new Country("US");
- public static final Country UK = new Country("United Kingdom");
-
- private Country(String name) {
- super(name);
- }
- }
-
- static class SecretQuestion extends Enum {
- public static final SecretQuestion FAVORITE_PET = new SecretQuestion("favoritePet");
- public static final SecretQuestion LAST_FOUR_SSN = new SecretQuestion("lastFourSsn");
-
- private SecretQuestion(String name) {
- super(name);
- }
- }
-
-}
View
69 src/test/org/springmodules/commons/validator/ConfigurableBeanValidatorTests.java
@@ -1,69 +0,0 @@
-
-package org.springmodules.commons.validator;
-
-import java.util.Locale;
-
-import junit.framework.TestCase;
-import org.easymock.MockControl;
-import org.apache.commons.validator.Validator;
-import org.apache.commons.validator.ValidatorResources;
-
-import org.springframework.core.io.Resource;
-import org.springframework.core.io.ClassPathResource;
-
-/**
- *
- * @author robh
- */
-public class ConfigurableBeanValidatorTests extends TestCase {
-
- public void testSupports() {
- ConfigurableBeanValidator validator = getValidator();
-
- assertTrue("Should support FooBean", validator.supports(FooBean.class));
- assertTrue("Should support String", validator.supports(String.class));
- }
-
- public void testGetLocale() {
- ConfigurableBeanValidator validator = getValidator();
- assertEquals(validator.getLocale(), Locale.getDefault());
- }
-
- public void testValidate() {
- FooBean bean = new FooBean();
- String formName = "myForm";
-
- MockControl ctl = MockControl.createControl(ValidatorFactory.class);
- ValidatorFactory factory = (ValidatorFactory)ctl.getMock();
-
- // expect call to get validator with args "fooBean", bean and null
- factory.getValidator(formName, bean, null);
- ctl.setReturnValue(getCommonsValidator());
-
- ctl.replay();
-
- ConfigurableBeanValidator validator = new ConfigurableBeanValidator();
- validator.setValidatorFactory(factory);
- validator.setFormName(formName);
- validator.validate(bean, null);
-
- ctl.verify();
- }
-
- private ConfigurableBeanValidator getValidator() {
- ConfigurableBeanValidator validator = new ConfigurableBeanValidator();
- validator.setFormName("fooBean");
-
- DefaultValidatorFactory factory = new DefaultValidatorFactory();
- factory.setValidationConfigLocations(new Resource[]{new ClassPathResource("testValidation.xml", getClass())});
-
- validator.setValidatorFactory(factory);
- return validator;
- }
-
- private Validator getCommonsValidator() {
- ValidatorResources res = new ValidatorResources();
- return new Validator(res);
- }
-
-}
View
71 src/test/org/springmodules/commons/validator/DefaultBeanValidatorTests.java
@@ -1,71 +0,0 @@
-
-package org.springmodules.commons.validator;
-
-import java.util.Locale;
-
-import junit.framework.TestCase;
-
-import org.springframework.core.io.Resource;
-import org.springframework.core.io.ClassPathResource;
-
-import org.easymock.MockControl;
-import org.apache.commons.validator.Validator;
-import org.apache.commons.validator.ValidatorResources;
-
-/**
- * @author robh
- */
-public class DefaultBeanValidatorTests extends TestCase {
-
- public void testSupports() {
- DefaultBeanValidator validator = getValidator();
-
- assertTrue(validator.supports(FooBean.class));
- assertFalse(validator.supports(String.class));
- }
-
- public void testSupportsWithFullyQualifiedName() {
- DefaultBeanValidator validator = getValidator();
- validator.setUseFullyQualifiedClassName(true);
-
- assertTrue(validator.supports(FooBarBean.class));
- assertFalse(validator.supports(String.class));
- }
-
- public void testGetLocale() {
- DefaultBeanValidator validator = getValidator();
- assertEquals(validator.getLocale(), Locale.getDefault());
- }
-
- public void testValidate() {
- FooBean bean = new FooBean();
-
- MockControl ctl = MockControl.createControl(ValidatorFactory.class);
- ValidatorFactory factory = (ValidatorFactory)ctl.getMock();
-
- // expect call to get validator with args "fooBean", bean and null
- factory.getValidator("fooBean", bean, null);
- ctl.setReturnValue(getCommonsValidator());
-
- ctl.replay();
-
- DefaultBeanValidator validator = new DefaultBeanValidator();
- validator.setValidatorFactory(factory);
- validator.validate(bean, null);
-
- ctl.verify();
- }
-
- private DefaultBeanValidator getValidator() {
- DefaultBeanValidator validator = new DefaultBeanValidator();
- DefaultValidatorFactory factory = new DefaultValidatorFactory();
- factory.setValidationConfigLocations(new Resource[]{new ClassPathResource("testValidation.xml", getClass())});
- validator.setValidatorFactory(factory);
- return validator;
- }
-
- private Validator getCommonsValidator() {
- ValidatorResources res = new ValidatorResources();
- return new Validator(res);
- }
-}
View
70 src/test/org/springmodules/commons/validator/DefaultValidatorFactoryTests.java
@@ -1,70 +0,0 @@
-
-package org.springmodules.commons.validator;
-
-import java.util.Locale;
-import java.util.HashMap;
-
-import junit.framework.TestCase;
-
-import org.springframework.beans.FatalBeanException;
-import org.springframework.core.io.ClassPathResource;
-import org.springframework.core.io.Resource;
-import org.springframework.validation.Errors;
-
-import org.apache.commons.validator.Validator;
-import org.easymock.MockControl;
-
-/**
- * @author robh
- */
-public class DefaultValidatorFactoryTests extends TestCase {
-
- public void testWithNoValidationConfigLocations() throws Exception {
- try {
- new DefaultValidatorFactory().afterPropertiesSet();
- fail("Should not be able to initialize a DefaultValidatorFactory without any config locations");
- }
- catch (FatalBeanException ex) {
- // success
- }
- }
-
- public void testSetValidationConfigLocations() throws Exception {
- DefaultValidatorFactory factory = getFactory();
-
- assertNotNull("ValidatorResources should not be null", factory.getValidatorResources());
- }
-
-
- public void testHasRulesForBean() throws Exception {
- DefaultValidatorFactory factory = getFactory();
- assertTrue(factory.hasRulesForBean("fooBean", Locale.getDefault()));
- assertFalse(factory.hasRulesForBean("barBean", Locale.getDefault()));
- }
-
- public void testGetValidator() throws Exception {
- DefaultValidatorFactory factory = getFactory();
-
- MockControl control = MockControl.createControl(Errors.class);
-
- Errors errors = (Errors) control.getMock();
- Object bean = new Object();
-
- Validator val = factory.getValidator("fooBean", bean, errors);
- assertSame(val.getParameterValue(Validator.BEAN_PARAM), bean);
- assertSame(val.getParameterValue(DefaultValidatorFactory.ERRORS_KEY), errors);
- }
-
- private DefaultValidatorFactory getFactory() throws Exception {
- DefaultValidatorFactory factory = new DefaultValidatorFactory();
-
- factory.setValidationConfigLocations(getConfigLocations());
-
- factory.afterPropertiesSet();
- return factory;
- }
-
- private Resource[] getConfigLocations() {
- return new Resource[]{new ClassPathResource("testValidation.xml", getClass())};
- }
-}
View
120 src/test/org/springmodules/commons/validator/FieldChecksTests.java
@@ -1,120 +0,0 @@
-
-package org.springmodules.commons.validator;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import junit.framework.TestCase;
-import org.apache.commons.validator.Field;
-import org.apache.commons.validator.ValidatorAction;
-import org.easymock.MockControl;
-
-import org.springframework.validation.Errors;
-
-/**
- * @author robh
- */
-public class FieldChecksTests extends TestCase {
-
-
- public void testExtractValueWithString() {
- String bean = "Rob Harrop";
- String result = FieldChecks.extractValue(bean, null);
-
- assertEquals("Should return the bean itself", bean, result);
- }
-
- public void testExtractValueWithMap() {
- String name = "Rob Harrop";
- String property = "name";
-
- Field field = new Field();
- field.setProperty(property);
-
- Map bean = new HashMap();
- bean.put(property, name);
-
- String result = FieldChecks.extractValue(bean, field);
-
- assertEquals("Should return Map entry", name, result);
- }
-
- public void testExtractWithJavaBean() {
- String name = "Rob Harrop";
- int age = 23;
-
- String property1 = "name";
- String property2 = "age";
-
- Field field1 = createFieldForProperty(property1);
- Field field2 = createFieldForProperty(property2);
-
- MockValidationBean validationBean = new MockValidationBean();
- validationBean.setName(name);
- validationBean.setAge(age);
-
- String nameResult = FieldChecks.extractValue(validationBean, field1);
- assertEquals(name, nameResult);
-
- String ageResult = FieldChecks.extractValue(validationBean, field2);
- assertEquals("" + age, ageResult);
- }
-
- public void testExtractWithNullBean() {
- String result = FieldChecks.extractValue(null, new Field());
- assertNull(result);
- }
-
- public void testValidateRequiredSuccess() {
- MockValidationBean bean = new MockValidationBean();
- bean.setName("Rob Harrop");
-
- Field field = createFieldForProperty("name");
-
- boolean result = FieldChecks.validateRequired(bean, null, field, null);
- assertTrue(result);
- }
-
- public void testValidateRequiredError() {
- MockValidationBean bean = new MockValidationBean();
- Field field = createFieldForProperty("name");
-
- MockControl control = MockControl.createControl(Errors.class);
-
- ValidatorAction validatorAction = new ValidatorAction();
- Errors errors = (Errors) control.getMock();
-
- boolean result = FieldChecks.validateRequired(bean, validatorAction, field, errors);
- assertFalse(result);
- }
-
- private Field createFieldForProperty(String property) {
- Field field = new Field();
- field.setProperty(property);
- return field;
- }
-
- public static class MockValidationBean {
-
-
- private String name;
-
- private int age;
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public int getAge() {
- return age;
- }
-
- public void setAge(int age) {
- this.age = age;
- }
- }
-}
View
10 src/test/org/springmodules/commons/validator/FooBarBean.java
@@ -1,10 +0,0 @@
-
-package org.springmodules.commons.validator;
-
-/**
- *
- * @author robh
- */
-public class FooBarBean extends FooBean {
-
-}
View
28 src/test/org/springmodules/commons/validator/FooBean.java
@@ -1,28 +0,0 @@
-
-package org.springmodules.commons.validator;
-
-/**
- *
- * @author robh
- */
-public class FooBean {
-
- private String name;
- private String emailAddress;
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getEmailAddress() {
- return emailAddress;
- }
-
- public void setEmailAddress(String emailAddress) {
- this.emailAddress = emailAddress;
- }
-}
View
25 src/test/org/springmodules/commons/validator/testValidation.xml
@@ -1,25 +0,0 @@
-<!DOCTYPE form-validation PUBLIC
- "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.1//EN"
- "http://jakarta.apache.org/commons/dtds/validator_1_1.dtd">
-
-<form-validation>
- <global>
- <validator name="required"
- classname="org.apache.commons.validator.TestValidator"
- method="validateRequired"
- methodParams="java.lang.Object,org.apache.commons.validator.Field"
- msg="errors.required"/>
- </global>
- <formset>
- <form name="fooBean">
- <field property="name" depends="required">
- <arg key="nameForm.firstname.displayname"/>
- </field>
- </form>
- <form name="org.springmodules.commons.validator.FooBarBean">
- <field property="emailAddress" depends="required">
- <arg key="foo"/>
- </field>
- </form>
- </formset>
-</form-validation>
Please sign in to comment.
Something went wrong with that request. Please try again.