You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by gp...@apache.org on 2009/11/13 03:48:58 UTC

svn commit: r835712 [17/19] - in /myfaces/extensions/validator/branches/branch_for_jsf_2_0: ./ assembly/ assembly/src/ assembly/src/main/ assembly/src/main/assembly/ assembly/src/main/resources/ component-support/ component-support/generic-support/ com...

Added: myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/metadata/transformer/RequiredMetaDataTransformer.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/metadata/transformer/RequiredMetaDataTransformer.java?rev=835712&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/metadata/transformer/RequiredMetaDataTransformer.java (added)
+++ myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/metadata/transformer/RequiredMetaDataTransformer.java Fri Nov 13 02:48:45 2009
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.myfaces.extensions.validator.baseval.metadata.transformer;
+
+import org.apache.myfaces.extensions.validator.core.metadata.CommonMetaDataKeys;
+import org.apache.myfaces.extensions.validator.core.metadata.MetaDataEntry;
+import org.apache.myfaces.extensions.validator.internal.UsageInformation;
+import org.apache.myfaces.extensions.validator.internal.UsageCategory;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author Gerhard Petracek
+ * @since 1.x.1
+ */
+@UsageInformation(UsageCategory.INTERNAL)
+public class RequiredMetaDataTransformer extends AbstractValidationParameterAwareTransformer
+{
+    public Map<String, Object> transformMetaData(MetaDataEntry metaDataEntry)
+    {
+        Map<String, Object> results = new HashMap<String, Object>();
+        results.put(CommonMetaDataKeys.WEAK_REQUIRED, true);
+        return results;
+    }
+}

Added: myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/metadata/transformer/SkipMetaDataTransformer.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/metadata/transformer/SkipMetaDataTransformer.java?rev=835712&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/metadata/transformer/SkipMetaDataTransformer.java (added)
+++ myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/metadata/transformer/SkipMetaDataTransformer.java Fri Nov 13 02:48:45 2009
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.myfaces.extensions.validator.baseval.metadata.transformer;
+
+import org.apache.myfaces.extensions.validator.core.metadata.MetaDataEntry;
+import org.apache.myfaces.extensions.validator.core.metadata.CommonMetaDataKeys;
+import org.apache.myfaces.extensions.validator.internal.UsageInformation;
+import org.apache.myfaces.extensions.validator.internal.UsageCategory;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author Gerhard Petracek
+ * @since 1.x.2
+ */
+@UsageInformation(UsageCategory.INTERNAL)
+public class SkipMetaDataTransformer  extends AbstractValidationParameterAwareTransformer
+{
+    protected Map<String, Object> transformMetaData(MetaDataEntry metaDataEntry)
+    {
+        Map<String, Object> results = new HashMap<String, Object>();
+        results.put(CommonMetaDataKeys.SKIP_VALIDATION, true);
+        return results;
+    }
+}

Added: myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/metadata/transformer/ValidatorMetaDataTransformer.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/metadata/transformer/ValidatorMetaDataTransformer.java?rev=835712&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/metadata/transformer/ValidatorMetaDataTransformer.java (added)
+++ myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/metadata/transformer/ValidatorMetaDataTransformer.java Fri Nov 13 02:48:45 2009
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.myfaces.extensions.validator.baseval.metadata.transformer;
+
+import org.apache.myfaces.extensions.validator.baseval.annotation.Validator;
+import org.apache.myfaces.extensions.validator.core.metadata.CommonMetaDataKeys;
+import org.apache.myfaces.extensions.validator.core.metadata.MetaDataEntry;
+import org.apache.myfaces.extensions.validator.internal.UsageInformation;
+import org.apache.myfaces.extensions.validator.internal.UsageCategory;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.List;
+import java.util.ArrayList;
+
+/**
+ * @author Gerhard Petracek
+ * @since 1.x.1
+ */
+@UsageInformation(UsageCategory.INTERNAL)
+public class ValidatorMetaDataTransformer  extends AbstractValidationParameterAwareTransformer
+{
+    protected Map<String, Object> transformMetaData(MetaDataEntry metaDataEntry)
+    {
+        Map<String, Object> results = new HashMap<String, Object>();
+        Validator annotation = metaDataEntry.getValue(Validator.class);
+
+        Class[] validators = annotation.value();
+
+        List<String> value = new ArrayList<String>();
+
+        for(Class currentClass : validators)
+        {
+            if(currentClass.getSimpleName().toLowerCase().contains(CommonMetaDataKeys.EMAIL))
+            {
+                value.add(CommonMetaDataKeys.EMAIL);
+            }
+            value.add(currentClass.getName());
+        }
+
+        results.put(CommonMetaDataKeys.CUSTOM, value);
+
+        return results;
+    }
+}

Added: myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/strategy/DoubleRangeStrategy.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/strategy/DoubleRangeStrategy.java?rev=835712&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/strategy/DoubleRangeStrategy.java (added)
+++ myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/strategy/DoubleRangeStrategy.java Fri Nov 13 02:48:45 2009
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.myfaces.extensions.validator.baseval.strategy;
+
+import org.apache.myfaces.extensions.validator.baseval.annotation.DoubleRange;
+import org.apache.myfaces.extensions.validator.baseval.annotation.SkipValidationSupport;
+import org.apache.myfaces.extensions.validator.core.metadata.MetaDataEntry;
+import org.apache.myfaces.extensions.validator.core.validation.strategy.AbstractValidationStrategy;
+import org.apache.myfaces.extensions.validator.internal.UsageInformation;
+import org.apache.myfaces.extensions.validator.internal.UsageCategory;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.validator.DoubleRangeValidator;
+import javax.faces.validator.ValidatorException;
+
+/**
+ * @author Gerhard Petracek
+ * @since 1.x.1
+ */
+@SkipValidationSupport
+@UsageInformation(UsageCategory.INTERNAL)
+public class DoubleRangeStrategy extends AbstractValidationStrategy
+{
+    protected void processValidation(FacesContext facesContext,
+            UIComponent uiComponent, MetaDataEntry metaDataEntry,
+            Object convertedObject) throws ValidatorException
+    {
+
+        DoubleRange annotation = metaDataEntry.getValue(DoubleRange.class);
+        DoubleRangeValidator doubleRangeValidator = (DoubleRangeValidator)facesContext.getApplication()
+                                                        .createValidator("javax.faces.DoubleRange");
+
+        doubleRangeValidator.setMinimum(annotation.minimum());
+        doubleRangeValidator.setMaximum(annotation.maximum());
+
+        doubleRangeValidator.validate(facesContext, uiComponent, convertedObject);
+    }
+}

Added: myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/strategy/JoinValidationStrategy.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/strategy/JoinValidationStrategy.java?rev=835712&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/strategy/JoinValidationStrategy.java (added)
+++ myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/strategy/JoinValidationStrategy.java Fri Nov 13 02:48:45 2009
@@ -0,0 +1,108 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.myfaces.extensions.validator.baseval.strategy;
+
+import org.apache.myfaces.extensions.validator.baseval.annotation.JoinValidation;
+import org.apache.myfaces.extensions.validator.baseval.annotation.extractor.DefaultPropertyScanningMetaDataExtractor;
+import org.apache.myfaces.extensions.validator.core.metadata.MetaDataEntry;
+import org.apache.myfaces.extensions.validator.core.metadata.extractor.MetaDataExtractor;
+import org.apache.myfaces.extensions.validator.core.validation.strategy.AbstractValidationStrategy;
+import org.apache.myfaces.extensions.validator.core.validation.strategy.ValidationStrategy;
+import org.apache.myfaces.extensions.validator.core.property.PropertyDetails;
+import org.apache.myfaces.extensions.validator.util.ExtValUtils;
+import org.apache.myfaces.extensions.validator.internal.UsageInformation;
+import org.apache.myfaces.extensions.validator.internal.UsageCategory;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.validator.ValidatorException;
+import javax.faces.FacesException;
+
+/**
+ * @author Gerhard Petracek
+ * @since 1.x.1
+ */
+@UsageInformation(UsageCategory.INTERNAL)
+@Deprecated
+public class JoinValidationStrategy extends AbstractValidationStrategy
+{
+    public void processValidation(FacesContext facesContext,
+                                  UIComponent uiComponent, MetaDataEntry metaDataEntry,
+                                  Object convertedObject) throws ValidatorException
+    {
+        try
+        {
+            validateJoinValidation(facesContext, uiComponent, metaDataEntry, convertedObject);
+        }
+        catch (FacesException t)
+        {
+            throw t;
+        }
+        catch (Throwable t)
+        {
+            if(this.logger.isWarnEnabled())
+            {
+                this.logger.warn("this class is replaced by a meta-data storage filter. " +
+                        "if it gets invoked and an exception occurs, a custom syntax is used." +
+                        "this class might be used by an old add-on. please check for a newer version.");
+            }
+        }
+    }
+
+    private void validateJoinValidation(FacesContext facesContext,
+                                        UIComponent uiComponent,
+                                        MetaDataEntry metaDataEntry,
+                                        Object convertedObject)
+    {
+        MetaDataExtractor extractor = DefaultPropertyScanningMetaDataExtractor.getInstance();
+
+        String[] targetExpressions = metaDataEntry.getValue(JoinValidation.class).value();
+
+        ValidationStrategy validationStrategy;
+
+        PropertyDetails propertyDetails;
+        for (String targetExpression : targetExpressions)
+        {
+            propertyDetails = ExtValUtils
+                .createPropertyDetailsForNewTarget(metaDataEntry, targetExpression);
+
+            for (MetaDataEntry entry : extractor.extract(facesContext, propertyDetails).getMetaDataEntries())
+            {
+                validationStrategy = ExtValUtils.getValidationStrategyForMetaData(entry.getKey());
+
+                if (validationStrategy != null)
+                {
+                    if(ExtValUtils.processMetaDataEntryAfterSkipValidation(validationStrategy.getClass(), entry))
+                    {
+                        continue;
+                    }
+
+                    validationStrategy.validate(facesContext, uiComponent, entry, convertedObject);
+                }
+                else
+                {
+                    if(logger.isTraceEnabled())
+                    {
+                        logger.trace("no validation strategy found for " + entry.getValue());
+                    }
+                }
+            }
+        }
+    }
+}

Added: myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/strategy/JpaValidationStrategy.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/strategy/JpaValidationStrategy.java?rev=835712&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/strategy/JpaValidationStrategy.java (added)
+++ myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/strategy/JpaValidationStrategy.java Fri Nov 13 02:48:45 2009
@@ -0,0 +1,202 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.myfaces.extensions.validator.baseval.strategy;
+
+import org.apache.myfaces.extensions.validator.core.metadata.CommonMetaDataKeys;
+import org.apache.myfaces.extensions.validator.core.metadata.MetaDataEntry;
+import org.apache.myfaces.extensions.validator.core.validation.strategy.AbstractAnnotationValidationStrategy;
+import org.apache.myfaces.extensions.validator.core.validation.message.resolver.AbstractValidationErrorMessageResolver;
+import org.apache.myfaces.extensions.validator.core.validation.exception.RequiredValidatorException;
+import org.apache.myfaces.extensions.validator.internal.Priority;
+import org.apache.myfaces.extensions.validator.internal.ToDo;
+import org.apache.myfaces.extensions.validator.internal.UsageInformation;
+import org.apache.myfaces.extensions.validator.internal.UsageCategory;
+import org.apache.myfaces.extensions.validator.util.ExtValUtils;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.validator.ValidatorException;
+import javax.faces.application.FacesMessage;
+import javax.persistence.Basic;
+import javax.persistence.Column;
+import javax.persistence.ManyToOne;
+import javax.persistence.OneToOne;
+import javax.persistence.Id;
+import java.lang.annotation.Annotation;
+
+/**
+ * @author Gerhard Petracek
+ * @since 1.x.1
+ */
+@UsageInformation(UsageCategory.INTERNAL)
+public class JpaValidationStrategy extends AbstractAnnotationValidationStrategy
+{
+    private boolean useFacesBundle = false;
+    private static final String VALIDATE_LENGTH = "length";
+
+    private String violation;
+    private int maxLength;
+
+    public void processValidation(FacesContext facesContext,
+                                  UIComponent uiComponent,
+                                  MetaDataEntry metaDataEntry,
+                                  Object convertedObject) throws ValidatorException
+    {
+        Annotation annotation = metaDataEntry.getValue(Annotation.class);
+        if (annotation instanceof Column)
+        {
+            validateColumnAnnotation((Column) annotation, convertedObject);
+        }
+        else if (annotation instanceof Basic)
+        {
+            validateBasicAnnotation((Basic) annotation, convertedObject);
+        }
+        else if (annotation instanceof Id)
+        {
+            checkRequiredConvertedObject(convertedObject);
+        }
+        else if (annotation instanceof OneToOne)
+        {
+            validateOneToOneAnnotation((OneToOne) annotation, convertedObject);
+        }
+        else if (annotation instanceof ManyToOne)
+        {
+            validateManyToOneAnnotation((ManyToOne) annotation, convertedObject);
+        }
+    }
+
+    private void validateColumnAnnotation(Column column, Object convertedObject) throws ValidatorException
+    {
+        if (!column.nullable())
+        {
+            checkRequiredConvertedObject(convertedObject);
+        }
+
+        if (convertedObject == null)
+        {
+            return;
+        }
+
+        if (convertedObject instanceof String
+                && column.length() < ((String) convertedObject).length())
+        {
+            this.violation = VALIDATE_LENGTH;
+            this.maxLength = column.length();
+            throw new ValidatorException(getValidationErrorFacesMessage(null));
+        }
+    }
+
+    private void validateBasicAnnotation(Basic basic, Object convertedObject) throws ValidatorException
+    {
+        if (!basic.optional())
+        {
+            checkRequiredConvertedObject(convertedObject);
+        }
+    }
+
+    private void validateOneToOneAnnotation(OneToOne oneToOne, Object convertedObject)
+    {
+        if (!oneToOne.optional())
+        {
+            checkRequiredConvertedObject(convertedObject);
+        }
+    }
+
+    private void validateManyToOneAnnotation(ManyToOne manyToOne, Object convertedObject)
+    {
+        if (!manyToOne.optional())
+        {
+            checkRequiredConvertedObject(convertedObject);
+        }
+    }
+
+    @ToDo(Priority.MEDIUM)
+    private void checkRequiredConvertedObject(Object convertedObject) throws ValidatorException
+    {
+        if (convertedObject == null || ("".equals(convertedObject) && ExtValUtils.interpretEmptyStringValuesAsNull()))
+        {
+            this.violation = CommonMetaDataKeys.REQUIRED;
+            throw new RequiredValidatorException(getValidationErrorFacesMessage(null));
+        }
+    }
+
+    protected String getValidationErrorMsgKey(Annotation annotation)
+    {
+        if (VALIDATE_LENGTH.equals(this.violation))
+        {
+            return "field_too_long";
+        }
+        else
+        {
+            return "field_required";
+        }
+    }
+
+    protected String getErrorMessageDetail(Annotation annotation)
+    {
+        String message = super.getErrorMessageDetail(annotation);
+
+        if (VALIDATE_LENGTH.equals(this.violation))
+        {
+            return message.replace("{0}", "" + this.maxLength);
+        }
+        else
+        {
+            return message;
+        }
+    }
+
+    @Override
+    protected String resolveMessage(String key)
+    {
+        String result = super.resolveMessage(key);
+        String marker = AbstractValidationErrorMessageResolver.MISSING_RESOURCE_MARKER;
+
+        if((marker + key + marker).equals(result))
+        {
+            this.useFacesBundle = true;
+        }
+
+        return result;
+    }
+
+    @Override
+    protected boolean processAfterValidatorException(FacesContext facesContext,
+                                                     UIComponent uiComponent,
+                                                     MetaDataEntry metaDataEntry,
+                                                     Object convertedObject,
+                                                     ValidatorException e)
+    {
+        FacesMessage facesMessage = e.getFacesMessage();
+
+        if(this.useFacesBundle)
+        {
+            if(VALIDATE_LENGTH.equals(this.violation))
+            {
+                ExtValUtils.replaceWithDefaultMaximumMessage(facesMessage, this.maxLength);
+            }
+            else
+            {
+                ExtValUtils.replaceWithDefaultRequiredMessage(facesMessage);
+            }
+        }
+
+        return super.processAfterValidatorException(facesContext, uiComponent, metaDataEntry, convertedObject, e);
+    }
+}

Added: myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/strategy/LengthStrategy.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/strategy/LengthStrategy.java?rev=835712&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/strategy/LengthStrategy.java (added)
+++ myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/strategy/LengthStrategy.java Fri Nov 13 02:48:45 2009
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.myfaces.extensions.validator.baseval.strategy;
+
+import org.apache.myfaces.extensions.validator.baseval.annotation.Length;
+import org.apache.myfaces.extensions.validator.baseval.annotation.SkipValidationSupport;
+import org.apache.myfaces.extensions.validator.core.metadata.MetaDataEntry;
+import org.apache.myfaces.extensions.validator.core.validation.strategy.AbstractValidationStrategy;
+import org.apache.myfaces.extensions.validator.internal.UsageInformation;
+import org.apache.myfaces.extensions.validator.internal.UsageCategory;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.validator.LengthValidator;
+import javax.faces.validator.ValidatorException;
+
+/**
+ * @author Gerhard Petracek
+ * @since 1.x.1
+ */
+@SkipValidationSupport
+@UsageInformation(UsageCategory.INTERNAL)
+public class LengthStrategy extends AbstractValidationStrategy
+{
+    protected void processValidation(FacesContext facesContext,
+            UIComponent uiComponent, MetaDataEntry metaDataEntry,
+            Object convertedObject) throws ValidatorException
+    {
+        Length annotation = metaDataEntry.getValue(Length.class);
+        LengthValidator lengthValidator = (LengthValidator)facesContext.getApplication()
+                                            .createValidator("javax.faces.Length");
+
+        lengthValidator.setMinimum(annotation.minimum());
+        lengthValidator.setMaximum(annotation.maximum());
+
+        lengthValidator.validate(facesContext, uiComponent, convertedObject);
+    }
+}

Added: myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/strategy/LongRangeStrategy.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/strategy/LongRangeStrategy.java?rev=835712&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/strategy/LongRangeStrategy.java (added)
+++ myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/strategy/LongRangeStrategy.java Fri Nov 13 02:48:45 2009
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.myfaces.extensions.validator.baseval.strategy;
+
+import org.apache.myfaces.extensions.validator.baseval.annotation.LongRange;
+import org.apache.myfaces.extensions.validator.baseval.annotation.SkipValidationSupport;
+import org.apache.myfaces.extensions.validator.core.metadata.MetaDataEntry;
+import org.apache.myfaces.extensions.validator.core.validation.strategy.AbstractValidationStrategy;
+import org.apache.myfaces.extensions.validator.internal.UsageInformation;
+import org.apache.myfaces.extensions.validator.internal.UsageCategory;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.validator.LongRangeValidator;
+import javax.faces.validator.ValidatorException;
+
+/**
+ * @author Gerhard Petracek
+ * @since 1.x.1
+ */
+@SkipValidationSupport
+@UsageInformation(UsageCategory.INTERNAL)
+public class LongRangeStrategy extends AbstractValidationStrategy
+{
+    protected void processValidation(FacesContext facesContext,
+            UIComponent uiComponent, MetaDataEntry metaDataEntry,
+            Object convertedObject) throws ValidatorException
+    {
+
+        LongRange annotation = metaDataEntry.getValue(LongRange.class);
+        LongRangeValidator longRangeValidator = (LongRangeValidator)facesContext.getApplication()
+                                                    .createValidator("javax.faces.LongRange");
+
+        longRangeValidator.setMinimum(annotation.minimum());
+        longRangeValidator.setMaximum(annotation.maximum());
+
+        longRangeValidator.validate(facesContext, uiComponent, convertedObject);
+    }
+}

Added: myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/strategy/PatternStrategy.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/strategy/PatternStrategy.java?rev=835712&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/strategy/PatternStrategy.java (added)
+++ myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/strategy/PatternStrategy.java Fri Nov 13 02:48:45 2009
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.myfaces.extensions.validator.baseval.strategy;
+
+import org.apache.myfaces.extensions.validator.baseval.annotation.Pattern;
+import org.apache.myfaces.extensions.validator.baseval.annotation.SkipValidationSupport;
+import org.apache.myfaces.extensions.validator.core.metadata.MetaDataEntry;
+import org.apache.myfaces.extensions.validator.core.validation.strategy.AbstractAnnotationValidationStrategy;
+import org.apache.myfaces.extensions.validator.internal.UsageInformation;
+import org.apache.myfaces.extensions.validator.internal.UsageCategory;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.validator.ValidatorException;
+
+/**
+ * @author Gerhard Petracek
+ * @since 1.x.1
+ */
+@SkipValidationSupport
+@UsageInformation(UsageCategory.INTERNAL)
+public class PatternStrategy extends AbstractAnnotationValidationStrategy<Pattern>
+{
+    protected void processValidation(FacesContext facesContext,
+            UIComponent uiComponent, MetaDataEntry metaDataEntry,
+            Object convertedObject) throws ValidatorException
+    {
+        Pattern annotation = metaDataEntry.getValue(Pattern.class);
+
+        for (String expression : annotation.value())
+        {
+            if (convertedObject == null
+                    || !java.util.regex.Pattern.compile(expression).matcher(
+                            convertedObject.toString()).matches())
+            {
+                throw new ValidatorException(new FacesMessage(
+                        FacesMessage.SEVERITY_ERROR,
+                        getErrorMessageSummary(annotation),
+                        getErrorMessageDetail(annotation).replace("{0}", expression)));
+            }
+        }
+    }
+
+    protected String getValidationErrorMsgKey(Pattern annotation)
+    {
+        return annotation.validationErrorMsgKey();
+    }
+}

Added: myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/strategy/RequiredStrategy.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/strategy/RequiredStrategy.java?rev=835712&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/strategy/RequiredStrategy.java (added)
+++ myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/strategy/RequiredStrategy.java Fri Nov 13 02:48:45 2009
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.myfaces.extensions.validator.baseval.strategy;
+
+import org.apache.myfaces.extensions.validator.baseval.annotation.Required;
+import org.apache.myfaces.extensions.validator.baseval.annotation.SkipValidationSupport;
+import org.apache.myfaces.extensions.validator.core.metadata.MetaDataEntry;
+import org.apache.myfaces.extensions.validator.core.validation.strategy.AbstractAnnotationValidationStrategy;
+import org.apache.myfaces.extensions.validator.core.validation.message.resolver.AbstractValidationErrorMessageResolver;
+import org.apache.myfaces.extensions.validator.core.validation.exception.RequiredValidatorException;
+import org.apache.myfaces.extensions.validator.internal.UsageInformation;
+import org.apache.myfaces.extensions.validator.internal.UsageCategory;
+import org.apache.myfaces.extensions.validator.util.ExtValUtils;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.validator.ValidatorException;
+import java.util.Map;
+import java.util.Collection;
+
+/**
+ * @author Gerhard Petracek
+ * @since 1.x.1
+ */
+@SkipValidationSupport
+@UsageInformation(UsageCategory.INTERNAL)
+public class RequiredStrategy extends AbstractAnnotationValidationStrategy<Required>
+{
+    private boolean useFacesBundle = false;
+
+    public void processValidation(FacesContext facesContext,
+            UIComponent uiComponent, MetaDataEntry metaDataEntry,
+            Object convertedObject) throws ValidatorException
+    {
+        if (convertedObject == null || convertedObject.equals("") ||
+                (convertedObject instanceof Collection && ((Collection)convertedObject).isEmpty()) ||
+                (convertedObject instanceof Map && ((Map)convertedObject).isEmpty()))
+        {
+            throw new RequiredValidatorException(
+                    getValidationErrorFacesMessage(metaDataEntry.getValue(Required.class)));
+        }
+    }
+
+    protected String getValidationErrorMsgKey(Required annotation)
+    {
+        return annotation.validationErrorMsgKey();
+    }
+
+    @Override
+    protected String resolveMessage(String key)
+    {
+        String result = super.resolveMessage(key);
+        String marker = AbstractValidationErrorMessageResolver.MISSING_RESOURCE_MARKER;
+
+        if((marker + key + marker).equals(result))
+        {
+            this.useFacesBundle = true;
+        }
+
+        return result;
+    }
+
+    @Override
+    protected boolean processAfterValidatorException(FacesContext facesContext,
+                                                     UIComponent uiComponent,
+                                                     MetaDataEntry metaDataEntry,
+                                                     Object convertedObject,
+                                                     ValidatorException e)
+    {
+        if(this.useFacesBundle)
+        {
+            ExtValUtils.replaceWithDefaultRequiredMessage(e.getFacesMessage());
+        }
+
+        return super.processAfterValidatorException(facesContext, uiComponent, metaDataEntry, convertedObject, e);
+    }
+}

Added: myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/strategy/SkipValidationStrategy.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/strategy/SkipValidationStrategy.java?rev=835712&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/strategy/SkipValidationStrategy.java (added)
+++ myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/strategy/SkipValidationStrategy.java Fri Nov 13 02:48:45 2009
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.myfaces.extensions.validator.baseval.strategy;
+
+import org.apache.myfaces.extensions.validator.baseval.annotation.SkipValidation;
+import org.apache.myfaces.extensions.validator.core.property.PropertyInformationKeys;
+import org.apache.myfaces.extensions.validator.core.metadata.MetaDataEntry;
+import org.apache.myfaces.extensions.validator.core.validation.strategy.ValidationStrategy;
+import org.apache.myfaces.extensions.validator.core.el.ValueBindingExpression;
+import org.apache.myfaces.extensions.validator.util.ExtValUtils;
+import org.apache.myfaces.extensions.validator.internal.UsageInformation;
+import org.apache.myfaces.extensions.validator.internal.UsageCategory;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.validator.ValidatorException;
+
+/**
+ * @author Gerhard Petracek
+ * @since 1.x.1
+ */
+@UsageInformation(UsageCategory.INTERNAL)
+public class SkipValidationStrategy implements ValidationStrategy
+{
+    public void validate(FacesContext facesContext,
+                                  UIComponent uiComponent,
+                                  MetaDataEntry metaDataEntry,
+                                  Object convertedObject) throws ValidatorException
+    {
+        String[] valueBindingExpressions = metaDataEntry.getValue(SkipValidation.class).value();
+
+        for(String valueBindingExpression : valueBindingExpressions)
+        {
+            if(Boolean.TRUE.equals(ExtValUtils.getELHelper().getValueOfExpression(
+                facesContext, new ValueBindingExpression(valueBindingExpression))))
+            {
+                metaDataEntry.setProperty(PropertyInformationKeys.SKIP_VALIDATION, true);
+                break;
+            }
+        }
+    }
+}
\ No newline at end of file

Added: myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/strategy/ValidatorStrategy.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/strategy/ValidatorStrategy.java?rev=835712&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/strategy/ValidatorStrategy.java (added)
+++ myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/strategy/ValidatorStrategy.java Fri Nov 13 02:48:45 2009
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.myfaces.extensions.validator.baseval.strategy;
+
+import org.apache.myfaces.extensions.validator.baseval.annotation.Validator;
+import org.apache.myfaces.extensions.validator.baseval.annotation.SkipValidationSupport;
+import org.apache.myfaces.extensions.validator.core.metadata.MetaDataEntry;
+import org.apache.myfaces.extensions.validator.core.validation.strategy.AbstractValidationStrategy;
+import org.apache.myfaces.extensions.validator.util.ClassUtils;
+import org.apache.myfaces.extensions.validator.internal.UsageInformation;
+import org.apache.myfaces.extensions.validator.internal.UsageCategory;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.validator.ValidatorException;
+
+/**
+ * @author Gerhard Petracek
+ * @since 1.x.1
+ */
+@SkipValidationSupport
+@UsageInformation(UsageCategory.INTERNAL)
+public class ValidatorStrategy extends AbstractValidationStrategy
+{
+    protected void processValidation(FacesContext facesContext,
+            UIComponent uiComponent, MetaDataEntry metaDataEntry,
+            Object convertedObject) throws ValidatorException
+    {
+
+        Class<? extends javax.faces.validator.Validator>[] validatorClasses =
+            metaDataEntry.getValue(Validator.class).value();
+
+        javax.faces.validator.Validator validator;
+        for (Class validatorClassName : validatorClasses)
+        {
+            validator = (javax.faces.validator.Validator) ClassUtils
+                    .tryToInstantiateClass(validatorClassName);
+
+            if (validator == null)
+            {
+                if(logger.isTraceEnabled())
+                {
+                    logger.trace(validatorClassName.getName() + " not found");
+                }
+
+                continue;
+            }
+            validator.validate(facesContext, uiComponent, convertedObject);
+        }
+    }
+}

Added: myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/CrossValidationPhaseListener.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/CrossValidationPhaseListener.java?rev=835712&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/CrossValidationPhaseListener.java (added)
+++ myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/CrossValidationPhaseListener.java Fri Nov 13 02:48:45 2009
@@ -0,0 +1,168 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.myfaces.extensions.validator.crossval;
+
+import org.apache.myfaces.extensions.validator.util.CrossValidationUtils;
+import org.apache.myfaces.extensions.validator.util.JsfUtils;
+import org.apache.myfaces.extensions.validator.util.ReflectionUtils;
+import org.apache.myfaces.extensions.validator.util.ExtValUtils;
+import org.apache.myfaces.extensions.validator.internal.UsageInformation;
+import org.apache.myfaces.extensions.validator.internal.UsageCategory;
+import org.apache.myfaces.extensions.validator.crossval.strategy.AbstractCrossValidationStrategy;
+import org.apache.myfaces.extensions.validator.crossval.storage.CrossValidationStorage;
+import org.apache.myfaces.extensions.validator.crossval.storage.CrossValidationStorageEntry;
+import org.apache.myfaces.extensions.validator.PropertyValidationModuleKey;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.event.PhaseEvent;
+import javax.faces.event.PhaseId;
+import javax.faces.event.PhaseListener;
+import javax.faces.validator.ValidatorException;
+import javax.faces.FacesException;
+import javax.faces.context.FacesContext;
+
+/**
+ * This phase listener processes cross validation as soon as it finds a special request scoped storage.<br/>
+ * So it's possible to add information during the process validation phase. At the end of this phase it gets processed.
+ * After that the storage gets reseted.<p/>
+ * If you provide a custom extension and you add the same storage type within a different phase,
+ * it also gets processed at the end of that phase.
+ *
+ * @author Gerhard Petracek
+ * @since 1.x.1
+ */
+@UsageInformation(UsageCategory.INTERNAL)
+public class CrossValidationPhaseListener implements PhaseListener
+{
+    private boolean isInitialized = false;
+    private static final long serialVersionUID = -5333405897635742732L;
+
+    public void afterPhase(PhaseEvent event)
+    {
+        try
+        {
+            CrossValidationStorage crossValidationStorage = CrossValidationUtils.getOrInitCrossValidationStorage();
+            for (CrossValidationStorageEntry entry : crossValidationStorage.getCrossValidationStorageEntries())
+            {
+                try
+                {
+                    if(!ExtValUtils.executeGlobalBeforeValidationInterceptors(
+                            FacesContext.getCurrentInstance(),
+                            entry.getComponent(),
+                            entry.getConvertedObject(),
+                            CrossValidationStorageEntry.class.getName(),
+                            entry,
+                            PropertyValidationModuleKey.class))
+                    {
+                        continue;
+                    }
+
+                    //call init-method
+                    if(entry.getValidationStrategy() instanceof AbstractCrossValidationStrategy)
+                    {
+                        ReflectionUtils.tryToInvokeMethod(
+                                entry.getValidationStrategy(),
+                                ReflectionUtils.tryToGetMethod(
+                                        entry.getValidationStrategy().getClass(),
+                                        "initCrossValidation",
+                                        CrossValidationStorageEntry.class),
+                                entry);
+                    }
+
+                    /*
+                     * validation
+                     */
+                    entry.getValidationStrategy().processCrossValidation(entry, crossValidationStorage);
+                }
+                catch (ValidatorException validatorException)
+                {
+                    boolean addMessage = true;
+
+                    if(entry.getValidationStrategy() instanceof AbstractCrossValidationStrategy)
+                    {
+                        try
+                        {
+                            addMessage = (Boolean)ReflectionUtils.tryToInvokeMethod(
+                                    entry.getValidationStrategy(),
+                                    ReflectionUtils.tryToGetMethod(
+                                            entry.getValidationStrategy().getClass(),
+                                            "processAfterCrossValidatorException",
+                                            CrossValidationStorageEntry.class,
+                                            validatorException.getClass()),
+                                    entry,
+                                    validatorException);
+                        }
+                        catch (Throwable e)
+                        {
+                            throw new FacesException(e);
+                        }
+                    }
+
+                    if(addMessage)
+                    {
+                        FacesMessage facesMessage = validatorException.getFacesMessage();
+
+                        if (facesMessage != null &&
+                                facesMessage.getSummary() != null && facesMessage.getDetail() != null)
+                        {
+                            ExtValUtils.tryToAddViolationMessageForComponentId(entry.getClientId(), facesMessage);
+                        }
+
+                        ExtValUtils.tryToBlocksNavigationForComponentId(entry.getClientId(), facesMessage);
+                    }
+                }
+                finally
+                {
+                    ExtValUtils.executeGlobalAfterValidationInterceptors(
+                            FacesContext.getCurrentInstance(),
+                            entry.getComponent(),
+                            entry.getConvertedObject(),
+                            CrossValidationStorageEntry.class.getName(),
+                            entry,
+                            PropertyValidationModuleKey.class);
+                }
+            }
+        }
+        finally
+        {
+            CrossValidationUtils.resetCrossValidationStorage();
+        }
+    }
+
+    public void beforePhase(PhaseEvent event)
+    {
+        if (!isInitialized)
+        {
+            if (WebXmlParameter.DEACTIVATE_CROSSVALIDATION != null
+                    && WebXmlParameter.DEACTIVATE_CROSSVALIDATION.equalsIgnoreCase("true"))
+            {
+                JsfUtils.deregisterPhaseListener(this);
+            }
+            else
+            {
+                isInitialized = true;
+            }
+        }
+    }
+
+    public PhaseId getPhaseId()
+    {
+        return PhaseId.ANY_PHASE;
+    }
+}

Added: myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/WebXmlParameter.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/WebXmlParameter.java?rev=835712&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/WebXmlParameter.java (added)
+++ myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/WebXmlParameter.java Fri Nov 13 02:48:45 2009
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.myfaces.extensions.validator.crossval;
+
+import org.apache.myfaces.extensions.validator.util.WebXmlUtils;
+import org.apache.myfaces.extensions.validator.internal.UsageInformation;
+import org.apache.myfaces.extensions.validator.internal.UsageCategory;
+
+/**
+ * centralized in order that these information arn't spread over the complete code base
+ *
+ * @author Gerhard Petracek
+ * @since 1.x.1
+ */
+@UsageInformation(UsageCategory.INTERNAL)
+public interface WebXmlParameter
+{
+    static final String DEACTIVATE_CROSSVALIDATION = WebXmlUtils
+            .getInitParameter("DEACTIVATE_CROSSVALIDATION");
+}
\ No newline at end of file

Added: myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/annotation/DateIs.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/annotation/DateIs.java?rev=835712&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/annotation/DateIs.java (added)
+++ myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/annotation/DateIs.java Fri Nov 13 02:48:45 2009
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.myfaces.extensions.validator.crossval.annotation;
+
+import org.apache.myfaces.extensions.validator.internal.UsageInformation;
+import org.apache.myfaces.extensions.validator.internal.UsageCategory;
+import org.apache.myfaces.extensions.validator.core.validation.parameter.ValidationParameter;
+import org.apache.myfaces.extensions.validator.core.validation.parameter.ViolationSeverity;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+import java.lang.annotation.Documented;
+import java.text.DateFormat;
+
+/**
+ * @author Gerhard Petracek
+ * @since 1.x.1
+ */
+@Target({METHOD, FIELD})
+@Retention(RUNTIME)
+@Documented
+@UsageInformation(UsageCategory.API)
+public @interface DateIs
+{
+    String[] valueOf();
+
+    /*
+     * optional section
+     */
+
+    DateIsType type() default DateIsType.same;
+
+    String validationErrorMsgKey() default "";
+
+    String notBeforeErrorMsgKey() default "wrong_date_not_before";
+
+    String notAfterErrorMsgKey() default "wrong_date_not_after";
+
+    String notEqualErrorMsgKey() default "wrong_date_not_equal";
+
+    int errorMessageDateStyle() default DateFormat.MEDIUM;
+
+    Class<? extends ValidationParameter>[] parameters() default ViolationSeverity.Error.class;
+}
\ No newline at end of file

Added: myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/annotation/DateIsType.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/annotation/DateIsType.java?rev=835712&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/annotation/DateIsType.java (added)
+++ myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/annotation/DateIsType.java Fri Nov 13 02:48:45 2009
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.myfaces.extensions.validator.crossval.annotation;
+
+import org.apache.myfaces.extensions.validator.internal.ToDo;
+import org.apache.myfaces.extensions.validator.internal.Priority;
+import org.apache.myfaces.extensions.validator.internal.UsageInformation;
+import org.apache.myfaces.extensions.validator.internal.UsageCategory;
+
+/**
+ * @author Gerhard Petracek
+ * @since 1.x.1
+ */
+@ToDo(value = Priority.MEDIUM, description = "beforeOrSame, afterOrSame")
+@UsageInformation(UsageCategory.API)
+public enum DateIsType
+{
+    before, after, same
+}

Added: myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/annotation/Equals.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/annotation/Equals.java?rev=835712&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/annotation/Equals.java (added)
+++ myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/annotation/Equals.java Fri Nov 13 02:48:45 2009
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.myfaces.extensions.validator.crossval.annotation;
+
+import org.apache.myfaces.extensions.validator.internal.UsageInformation;
+import org.apache.myfaces.extensions.validator.internal.UsageCategory;
+import org.apache.myfaces.extensions.validator.core.validation.parameter.ValidationParameter;
+import org.apache.myfaces.extensions.validator.core.validation.parameter.ViolationSeverity;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+import java.lang.annotation.Documented;
+
+/**
+ * @author Gerhard Petracek
+ * @since 1.x.1
+ */
+@Target({METHOD, FIELD})
+@Retention(RUNTIME)
+@Documented
+@UsageInformation(UsageCategory.API)
+public @interface Equals
+{
+    String[] value();
+
+    String validationErrorMsgKey() default "duplicated_content_required";
+
+    Class<? extends ValidationParameter>[] parameters() default ViolationSeverity.Error.class;
+}
\ No newline at end of file

Added: myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/annotation/NotEquals.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/annotation/NotEquals.java?rev=835712&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/annotation/NotEquals.java (added)
+++ myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/annotation/NotEquals.java Fri Nov 13 02:48:45 2009
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.myfaces.extensions.validator.crossval.annotation;
+
+import org.apache.myfaces.extensions.validator.internal.UsageInformation;
+import org.apache.myfaces.extensions.validator.internal.UsageCategory;
+import org.apache.myfaces.extensions.validator.core.validation.parameter.ValidationParameter;
+import org.apache.myfaces.extensions.validator.core.validation.parameter.ViolationSeverity;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+import java.lang.annotation.Documented;
+
+/**
+ * @author Gerhard Petracek
+ * @since 1.x.1
+ */
+@Target({METHOD, FIELD})
+@Retention(RUNTIME)
+@Documented
+@UsageInformation(UsageCategory.API)
+public @interface NotEquals
+{
+    String[] value();
+
+    String validationErrorMsgKey() default "duplicated_content_denied";
+
+    Class<? extends ValidationParameter>[] parameters() default ViolationSeverity.Error.class;
+}
\ No newline at end of file

Added: myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/annotation/RequiredIf.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/annotation/RequiredIf.java?rev=835712&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/annotation/RequiredIf.java (added)
+++ myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/annotation/RequiredIf.java Fri Nov 13 02:48:45 2009
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.myfaces.extensions.validator.crossval.annotation;
+
+import org.apache.myfaces.extensions.validator.internal.UsageInformation;
+import org.apache.myfaces.extensions.validator.internal.UsageCategory;
+import org.apache.myfaces.extensions.validator.core.validation.parameter.ValidationParameter;
+import org.apache.myfaces.extensions.validator.core.validation.parameter.ViolationSeverity;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+import java.lang.annotation.Documented;
+
+/**
+ * @author Gerhard Petracek
+ * @since 1.x.1
+ */
+@Target({METHOD, FIELD})
+@Retention(RUNTIME)
+@Documented
+@UsageInformation(UsageCategory.API)
+public @interface RequiredIf
+{
+    String[] valueOf();
+
+    /*
+     * optional section
+     */
+
+    RequiredIfType is() default RequiredIfType.not_empty;
+
+    String validationErrorMsgKey() default "empty_field";
+
+    Class<? extends ValidationParameter>[] parameters() default ViolationSeverity.Error.class;
+}
\ No newline at end of file

Added: myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/annotation/RequiredIfType.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/annotation/RequiredIfType.java?rev=835712&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/annotation/RequiredIfType.java (added)
+++ myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/annotation/RequiredIfType.java Fri Nov 13 02:48:45 2009
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.myfaces.extensions.validator.crossval.annotation;
+
+import org.apache.myfaces.extensions.validator.internal.UsageInformation;
+import org.apache.myfaces.extensions.validator.internal.UsageCategory;
+
+/**
+ * @author Gerhard Petracek
+ * @since 1.x.1
+ */
+@UsageInformation(UsageCategory.API)
+public enum RequiredIfType
+{
+    empty, not_empty
+}
\ No newline at end of file

Added: myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/message/bundle/validation_messages.properties
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/message/bundle/validation_messages.properties?rev=835712&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/message/bundle/validation_messages.properties (added)
+++ myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/message/bundle/validation_messages.properties Fri Nov 13 02:48:45 2009
@@ -0,0 +1,34 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+
+duplicated_content_required=Input is different
+duplicated_content_required_detail=Input is different
+
+duplicated_content_denied=Same input isn't allowed
+duplicated_content_denied_detail=Same input isn't allowed
+
+wrong_date=Wrong date
+wrong_date_detail=Wrong date
+
+wrong_date_not_before=Date has to be after {0}
+wrong_date_not_before_detail=Date has to be after {0}
+
+wrong_date_not_after=Date has to be before {0}
+wrong_date_not_after_detail=Date has to be before {0}
+
+wrong_date_not_equal=Date isn't equal to {0}
+wrong_date_not_equal_detail=Date isn't equal to {0}
\ No newline at end of file

Added: myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/message/bundle/validation_messages_ar.properties
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/message/bundle/validation_messages_ar.properties?rev=835712&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/message/bundle/validation_messages_ar.properties (added)
+++ myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/message/bundle/validation_messages_ar.properties Fri Nov 13 02:48:45 2009
@@ -0,0 +1,34 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+
+duplicated_content_required=\u0627\u0644\u0625\u062f\u062e\u0627\u0644 \u0645\u062e\u062a\u0644\u0641
+duplicated_content_required_detail=\u0627\u0644\u0625\u062f\u062e\u0627\u0644 \u0645\u062e\u062a\u0644\u0641
+
+duplicated_content_denied=\u063a\u064a\u0631 \u0645\u0633\u0645\u0648\u062d \u0628\u0625\u062f\u062e\u0627\u0644 \u0646 \u0641\u0633 \u0642\u064a\u0645\u0629 \u0627\u0644\u0625\u062f\u062e\u0627\u0644
+duplicated_content_denied_detail=\u063a\u064a\u0631 \u0645\u0633\u0645\u0648\u062d \u0628\u0625\u062f\u062e\u0627\u0644  \u0646\u0641\u0633 \u0642\u064a\u0645\u0629 \u0627\u0644\u0625\u062f\u062e\u0627\u0644
+
+wrong_date=\u0627\u0644\u062a\u0627\u0631\u064a\u062e \u062e\u0627\u0637\u0649\u0621
+wrong_date_detail=\u0627\u0644\u062a\u0627\u0631\u064a\u062e \u062e\u0627\u0637\u0649\u0621
+
+wrong_date_not_before=\u0627\u0644\u062a\u0627\u0631\u064a\u062e \u064a\u062c\u0628 \u0623\u0646 \u064a\u0643\u0648 \u0646 \u0628\u0639\u062f {0}
+wrong_date_not_before_detail=\u0627\u0644\u062a\u0627\u0631\u064a\u062e \u064a\u062c\u0628 \u0623\u0646 \u064a\u0643 \u0648\u0646 \u0628\u0639\u062f {0}
+
+wrong_date_not_after=\u0627\u0644\u062a\u0627\u0631\u064a\u062e \u064a\u062c\u0628 \u0623\u0646 \u064a\u0643\u0648 \u0646 \u0642\u0628\u0644 {0}
+wrong_date_not_after_detail=\u0627\u0644\u062a\u0627\u0631\u064a\u062e \u064a\u062c\u0628 \u0623\u0646 \u064a\u0643 \u0648\u0646 \u0642\u0628\u0644 {0}
+
+wrong_date_not_equal=\u0627\u0644\u062a\u0627\u0631\u064a\u062e \u0644\u0627 \u064a\u0633\u0627\u0648\u0649 {0}
+wrong_date_not_equal_detail=\u0627\u0644\u062a\u0627\u0631\u064a\u062e \u0644\u0627 \u064a\u0633\u0627\u0648\u0649 {0}
\ No newline at end of file

Added: myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/message/bundle/validation_messages_ca.properties
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/message/bundle/validation_messages_ca.properties?rev=835712&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/message/bundle/validation_messages_ca.properties (added)
+++ myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/message/bundle/validation_messages_ca.properties Fri Nov 13 02:48:45 2009
@@ -0,0 +1,34 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+
+duplicated_content_required=el valor \u00e9 diferent
+duplicated_content_required_detail=el valor \u00e9 diferent
+
+duplicated_content_denied=no es permet el mateix valor
+duplicated_content_denied_detail=no es permet el mateix valor
+
+wrong_date=data err\u00f2nia
+wrong_date_detail=data err\u00f2nia
+
+wrong_date_not_before=la data ha de ser posterior a {0}
+wrong_date_not_before_detail=la data ha de ser posterior a {0}
+
+wrong_date_not_after=la data ha de ser anterior a {0}
+wrong_date_not_after_detail=la data ha de ser posterior a {0}
+
+wrong_date_not_equal=la data no \u000e9s igual a {0}
+wrong_date_not_equal_detail=la data no \u000e9s igual a {0}
\ No newline at end of file

Added: myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/message/bundle/validation_messages_de.properties
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/message/bundle/validation_messages_de.properties?rev=835712&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/message/bundle/validation_messages_de.properties (added)
+++ myfaces/extensions/validator/branches/branch_for_jsf_2_0/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/message/bundle/validation_messages_de.properties Fri Nov 13 02:48:45 2009
@@ -0,0 +1,34 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+
+duplicated_content_required=Eingabe ist unterschiedlich
+duplicated_content_required_detail=Eingabe ist unterschiedlich
+
+duplicated_content_denied=Der gleiche Wert ist nicht erlaubt
+duplicated_content_denied_detail=Der gleiche Wert ist nicht erlaubt
+
+wrong_date=Datum inkorrekt
+wrong_date_detail=Datum inkorrekt
+
+wrong_date_not_before=Das Datum muss nach dem {0} sein
+wrong_date_not_before_detail=Das Datum muss nach dem {0} sein
+
+wrong_date_not_after=Das Datum muss vor dem {0} sein
+wrong_date_not_after_detail=Das Datum muss vor dem {0} sein
+
+wrong_date_not_equal=Das Datum entspricht nicht dem {0}
+wrong_date_not_equal_detail=Das Datum entspricht nicht dem {0}
\ No newline at end of file