myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gpetra...@apache.org
Subject svn commit: r694497 [1/2] - in /myfaces/extensions/validator/branches/jsf_1.1: ./ alternative/ alternative/src/ alternative/src/main/ alternative/src/main/config/ alternative/src/main/java/ alternative/src/main/java/org/ alternative/src/main/java/org/a...
Date Thu, 11 Sep 2008 21:36:04 GMT
Author: gpetracek
Date: Thu Sep 11 14:36:02 2008
New Revision: 694497

URL: http://svn.apache.org/viewvc?rev=694497&view=rev
Log:
separate module for the alternative and fallback approach

Added:
    myfaces/extensions/validator/branches/jsf_1.1/alternative/
    myfaces/extensions/validator/branches/jsf_1.1/alternative/pom.xml
    myfaces/extensions/validator/branches/jsf_1.1/alternative/src/
    myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/
    myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/config/
    myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/config/faces-config.xml
    myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/
    myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/
    myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/
    myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/
    myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/
    myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/
    myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/
    myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/adapter/
    myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/adapter/DefaultConverterAdapterFactory.java
    myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/adapter/ExtValFallbackConverter.java
    myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/adapter/mapper/
    myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/adapter/mapper/CustomConfiguredConverterToAdapterNameMapper.java
    myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/adapter/mapper/CustomConventionConverterToAdapterNameMapper.java
    myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/adapter/mapper/DefaultConverterToAdapterNameMapper.java
    myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/adapter/mapper/SimpleConverterToAdapterNameMapper.java
    myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/proxy/
    myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/proxy/ExtValApplication.java
    myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/proxy/ExtValApplicationFactory.java
    myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/proxy/ExtValConverter.java
    myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/proxy/ProxyMappingPhaseListener.java
    myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/util/
    myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/util/AdapterFactoryUtils.java
    myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/util/ProxyUtils.java
    myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/resources/
    myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/resources/LICENSE.txt
    myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/resources/NOTICE.txt
    myfaces/extensions/validator/branches/jsf_1.1/core/src/main/java/org/apache/myfaces/extensions/validator/util/ReflectionUtils.java
    myfaces/extensions/validator/branches/jsf_1.1/examples/adapter_demo/
      - copied from r693603, myfaces/extensions/validator/branches/jsf_1.1/examples/fallback_demo/
    myfaces/extensions/validator/branches/jsf_1.1/examples/adapter_demo/pom.xml
      - copied, changed from r694495, myfaces/extensions/validator/branches/jsf_1.1/examples/fallback_demo/pom.xml
    myfaces/extensions/validator/branches/jsf_1.1/examples/adapter_demo/src/
      - copied from r694495, myfaces/extensions/validator/branches/jsf_1.1/examples/fallback_demo/src/
    myfaces/extensions/validator/branches/jsf_1.1/examples/proxy_demo/
    myfaces/extensions/validator/branches/jsf_1.1/examples/proxy_demo/pom.xml
    myfaces/extensions/validator/branches/jsf_1.1/examples/proxy_demo/src/
    myfaces/extensions/validator/branches/jsf_1.1/examples/proxy_demo/src/main/
    myfaces/extensions/validator/branches/jsf_1.1/examples/proxy_demo/src/main/java/
    myfaces/extensions/validator/branches/jsf_1.1/examples/proxy_demo/src/main/java/org/
    myfaces/extensions/validator/branches/jsf_1.1/examples/proxy_demo/src/main/java/org/apache/
    myfaces/extensions/validator/branches/jsf_1.1/examples/proxy_demo/src/main/java/org/apache/myfaces/
    myfaces/extensions/validator/branches/jsf_1.1/examples/proxy_demo/src/main/java/org/apache/myfaces/blank/
    myfaces/extensions/validator/branches/jsf_1.1/examples/proxy_demo/src/main/java/org/apache/myfaces/blank/HelloWorldController.java
    myfaces/extensions/validator/branches/jsf_1.1/examples/proxy_demo/src/main/webapp/
    myfaces/extensions/validator/branches/jsf_1.1/examples/proxy_demo/src/main/webapp/WEB-INF/
    myfaces/extensions/validator/branches/jsf_1.1/examples/proxy_demo/src/main/webapp/WEB-INF/faces-config.xml
    myfaces/extensions/validator/branches/jsf_1.1/examples/proxy_demo/src/main/webapp/WEB-INF/web.xml
    myfaces/extensions/validator/branches/jsf_1.1/examples/proxy_demo/src/main/webapp/helloWorld.jsp
    myfaces/extensions/validator/branches/jsf_1.1/examples/proxy_demo/src/main/webapp/index.jsp
    myfaces/extensions/validator/branches/jsf_1.1/examples/proxy_demo/src/main/webapp/page2.jsp
Removed:
    myfaces/extensions/validator/branches/jsf_1.1/core/src/main/java/org/apache/myfaces/extensions/validator/core/adapter/
    myfaces/extensions/validator/branches/jsf_1.1/core/src/main/java/org/apache/myfaces/extensions/validator/core/proxy/
    myfaces/extensions/validator/branches/jsf_1.1/examples/fallback_demo/
Modified:
    myfaces/extensions/validator/branches/jsf_1.1/core/pom.xml
    myfaces/extensions/validator/branches/jsf_1.1/core/src/main/java/org/apache/myfaces/extensions/validator/core/ExtValRendererWrapper.java
    myfaces/extensions/validator/branches/jsf_1.1/core/src/main/java/org/apache/myfaces/extensions/validator/util/ClassUtils.java
    myfaces/extensions/validator/branches/jsf_1.1/core/src/main/java/org/apache/myfaces/extensions/validator/util/ExtValUtils.java
    myfaces/extensions/validator/branches/jsf_1.1/core/src/main/java/org/apache/myfaces/extensions/validator/util/FactoryUtils.java
    myfaces/extensions/validator/branches/jsf_1.1/examples/pom.xml
    myfaces/extensions/validator/branches/jsf_1.1/pom.xml

Added: myfaces/extensions/validator/branches/jsf_1.1/alternative/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/jsf_1.1/alternative/pom.xml?rev=694497&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/jsf_1.1/alternative/pom.xml (added)
+++ myfaces/extensions/validator/branches/jsf_1.1/alternative/pom.xml Thu Sep 11 14:36:02 2008
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.myfaces.extensions.validator</groupId>
+        <artifactId>myfaces-extval-parent</artifactId>
+        <version>1.0.1-SNAPSHOT</version>
+    </parent>
+
+    <groupId>org.apache.myfaces.extensions.validator</groupId>
+    <artifactId>myfaces-extval-alternative</artifactId>
+    <name>MyFaces Extensions-Validator Alternative</name>
+    <version>${build.version}</version>
+    <packaging>jar</packaging>
+    
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.myfaces.core</groupId>
+            <artifactId>myfaces-api</artifactId>
+            <version>${jsf.version}</version>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.myfaces.extensions.validator</groupId>
+            <artifactId>myfaces-extval-core</artifactId>
+            <version>${build.version}</version>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>cglib</groupId>
+            <artifactId>cglib</artifactId>
+            <version>2.1_3</version>
+            <scope>compile</scope>
+        </dependency>
+
+         <dependency>
+            <groupId>javax.el</groupId>
+            <artifactId>el-api</artifactId>
+            <version>1.0</version>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <resources>
+            <resource>
+                <directory>src/main/config</directory>
+                <includes>
+                    <include>**/*xml</include>
+                </includes>
+                <targetPath>/META-INF</targetPath>
+            </resource>
+            <resource>
+                <directory>src/main/resources</directory>
+                <includes>
+                    <include>LICENSE.txt</include>
+                    <include>NOTICE.txt</include>
+                </includes>
+                <targetPath>/META-INF</targetPath>
+            </resource>
+            <resource>
+                <directory>src/main/java</directory>
+                <includes>
+                    <include>**/*properties</include>
+                </includes>
+            </resource>
+        </resources>
+        <plugins>
+            <plugin>
+                <inherited>true</inherited>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-source-plugin</artifactId>
+
+                <executions>
+                    <execution>
+                        <id>attach-sources</id>
+                        <goals>
+                            <goal>jar</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

Added: myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/config/faces-config.xml
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/config/faces-config.xml?rev=694497&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/config/faces-config.xml (added)
+++ myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/config/faces-config.xml Thu Sep 11 14:36:02 2008
@@ -0,0 +1,33 @@
+<!--
+ * 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.
+-->
+
+<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
+              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+              xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
+              version="1.2">
+    <!-- optional approach for component libs which don't use delegation to renderer -->
+    <!--
+    <factory>
+        <application-factory>org.apache.myfaces.extensions.validator.core.proxy.ExtValApplicationFactory</application-factory>
+    </factory>
+    <lifecycle>
+        <phase-listener>org.apache.myfaces.extensions.validator.core.proxy.ProxyMappingPhaseListener</phase-listener>
+    </lifecycle>
+    -->
+</faces-config>
\ No newline at end of file

Added: myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/adapter/DefaultConverterAdapterFactory.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/adapter/DefaultConverterAdapterFactory.java?rev=694497&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/adapter/DefaultConverterAdapterFactory.java (added)
+++ myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/adapter/DefaultConverterAdapterFactory.java Thu Sep 11 14:36:02 2008
@@ -0,0 +1,110 @@
+/*
+ * 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.core.adapter;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.myfaces.extensions.validator.core.ClassMappingFactory;
+import org.apache.myfaces.extensions.validator.core.adapter.mapper.CustomConfiguredConverterToAdapterNameMapper;
+import org.apache.myfaces.extensions.validator.core.adapter.mapper.CustomConventionConverterToAdapterNameMapper;
+import org.apache.myfaces.extensions.validator.core.adapter.mapper.DefaultConverterToAdapterNameMapper;
+import org.apache.myfaces.extensions.validator.core.adapter.mapper.SimpleConverterToAdapterNameMapper;
+import org.apache.myfaces.extensions.validator.core.mapper.NameMapper;
+import org.apache.myfaces.extensions.validator.internal.UsageEnum;
+import org.apache.myfaces.extensions.validator.internal.UsageInformation;
+import org.apache.myfaces.extensions.validator.util.ClassUtils;
+
+import javax.faces.convert.Converter;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * just for the fallback solution
+ *
+ * @author Gerhard Petracek
+ */
+@UsageInformation(UsageEnum.FALLBACK)
+public class DefaultConverterAdapterFactory implements
+    ClassMappingFactory<Converter, Converter>
+{
+    private static Map<String, String> converterAdapterMapping = new HashMap<String, String>();
+    private static List<NameMapper<Converter>> nameMapperList = new ArrayList<NameMapper<Converter>>();
+
+    static
+    {
+        nameMapperList.add(new CustomConfiguredConverterToAdapterNameMapper());
+        nameMapperList.add(new CustomConventionConverterToAdapterNameMapper());
+        nameMapperList.add(new DefaultConverterToAdapterNameMapper());
+        nameMapperList.add(new SimpleConverterToAdapterNameMapper());
+    }
+
+    protected final Log logger = LogFactory.getLog(getClass());
+
+    public Converter create(Converter converter)
+    {
+        String converterName = converter.getClass().getName();
+
+        if (converterAdapterMapping.containsKey(converterName))
+        {
+            return (Converter) ClassUtils
+                .tryToInstantiateClassForName(converterAdapterMapping
+                    .get(converterName));
+        }
+
+        Converter adapter;
+        String adapterName;
+
+        for (NameMapper<Converter> nameMapper : nameMapperList)
+        {
+            adapterName = nameMapper.createName(converter);
+            adapter = (Converter) ClassUtils
+                .tryToInstantiateClassForName(adapterName);
+
+            if (adapter != null)
+            {
+                addMapping(converterName, adapter.getClass().getName());
+
+                if (this.logger.isTraceEnabled())
+                {
+                    this.logger.trace("used adapter: " + adapter.getClass().getName());
+                }
+
+                return adapter;
+            }
+        }
+
+        if (this.logger.isDebugEnabled())
+        {
+            this.logger.debug("no adapter found for " + converterName
+                + " -> converter itself is used -> no sev-en support");
+        }
+        return converter;
+    }
+
+    private void addMapping(String sourceConverter, String adapter)
+    {
+        synchronized (DefaultConverterAdapterFactory.class)
+        {
+            converterAdapterMapping.put(sourceConverter, adapter);
+        }
+        //TODO logging
+    }
+}

Added: myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/adapter/ExtValFallbackConverter.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/adapter/ExtValFallbackConverter.java?rev=694497&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/adapter/ExtValFallbackConverter.java (added)
+++ myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/adapter/ExtValFallbackConverter.java Thu Sep 11 14:36:02 2008
@@ -0,0 +1,88 @@
+/*
+ * 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.core.adapter;
+
+import org.apache.myfaces.extensions.validator.core.proxy.ExtValConverter;
+import org.apache.myfaces.extensions.validator.internal.UsageEnum;
+import org.apache.myfaces.extensions.validator.internal.UsageInformation;
+import org.apache.myfaces.extensions.validator.util.ProxyUtils;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+
+/**
+ * just for the fallback solution
+ *
+ * @author Gerhard Petracek
+ */
+@UsageInformation(UsageEnum.FALLBACK)
+public class ExtValFallbackConverter extends ExtValConverter
+{
+    private Converter wrapped;
+
+    public ExtValFallbackConverter(Converter converter)
+    {
+        this.wrapped = converter;
+    }
+
+    @Override
+    public String getAsString(FacesContext facesContext,
+                              UIComponent uiComponent, Object o)
+    {
+        if (this.wrapped == null)
+        {
+            //indirect approach for complex components
+            Converter converter = ProxyUtils.tryToCreateOriginalConverter(
+                facesContext, uiComponent);
+            if (converter == null)
+            {
+                return (o == null) ? null : o.toString();
+            }
+            else
+            {
+                return converter.getAsString(facesContext, uiComponent, o);
+            }
+        }
+        else
+        {
+            return this.wrapped.getAsString(facesContext, uiComponent, o);
+        }
+    }
+
+    @Override
+    protected Object getConvertedObject(FacesContext facesContext,
+                                        UIComponent uiComponent, String s)
+    {
+        if (this.wrapped == null)
+        {
+            //indirect approach for complex components
+            //TODO
+            Converter converter = ProxyUtils.tryToCreateOriginalConverter(
+                facesContext, uiComponent);
+
+            return (converter != null) ? converter.getAsObject(facesContext,
+                uiComponent, s) : s;
+        }
+        else
+        {
+            return this.wrapped.getAsObject(facesContext, uiComponent, s);
+        }
+    }
+}
\ No newline at end of file

Added: myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/adapter/mapper/CustomConfiguredConverterToAdapterNameMapper.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/adapter/mapper/CustomConfiguredConverterToAdapterNameMapper.java?rev=694497&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/adapter/mapper/CustomConfiguredConverterToAdapterNameMapper.java (added)
+++ myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/adapter/mapper/CustomConfiguredConverterToAdapterNameMapper.java Thu Sep 11 14:36:02 2008
@@ -0,0 +1,40 @@
+/*
+ * 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.core.adapter.mapper;
+
+import org.apache.myfaces.extensions.validator.core.WebXmlParameter;
+import org.apache.myfaces.extensions.validator.core.mapper.AbstractCustomNameMapper;
+import org.apache.myfaces.extensions.validator.internal.UsageEnum;
+import org.apache.myfaces.extensions.validator.internal.UsageInformation;
+
+import javax.faces.convert.Converter;
+
+/**
+ * @author Gerhard Petracek
+ */
+@UsageInformation(UsageEnum.FALLBACK)
+public class CustomConfiguredConverterToAdapterNameMapper extends
+    AbstractCustomNameMapper<Converter>
+{
+
+    protected String getCustomNameMapperClassName()
+    {
+        return WebXmlParameter.CUSTOM_CONVERTER_TO_ADAPTER_NAME_MAPPER;
+    }
+}
\ No newline at end of file

Added: myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/adapter/mapper/CustomConventionConverterToAdapterNameMapper.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/adapter/mapper/CustomConventionConverterToAdapterNameMapper.java?rev=694497&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/adapter/mapper/CustomConventionConverterToAdapterNameMapper.java (added)
+++ myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/adapter/mapper/CustomConventionConverterToAdapterNameMapper.java Thu Sep 11 14:36:02 2008
@@ -0,0 +1,41 @@
+/*
+ * 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.core.adapter.mapper;
+
+import org.apache.myfaces.extensions.validator.core.mapper.AbstractCustomNameMapper;
+import org.apache.myfaces.extensions.validator.internal.UsageEnum;
+import org.apache.myfaces.extensions.validator.internal.UsageInformation;
+import org.apache.myfaces.extensions.validator.util.ExtValUtils;
+
+import javax.faces.convert.Converter;
+
+/**
+ * @author Gerhard Petracek
+ */
+@UsageInformation(UsageEnum.FALLBACK)
+public class CustomConventionConverterToAdapterNameMapper extends
+    AbstractCustomNameMapper<Converter>
+{
+
+    protected String getCustomNameMapperClassName()
+    {
+        return ExtValUtils.getInformationProviderBean()
+            .getCustomAdapterNameMapper();
+    }
+}
\ No newline at end of file

Added: myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/adapter/mapper/DefaultConverterToAdapterNameMapper.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/adapter/mapper/DefaultConverterToAdapterNameMapper.java?rev=694497&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/adapter/mapper/DefaultConverterToAdapterNameMapper.java (added)
+++ myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/adapter/mapper/DefaultConverterToAdapterNameMapper.java Thu Sep 11 14:36:02 2008
@@ -0,0 +1,38 @@
+/*
+ * 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.core.adapter.mapper;
+
+import org.apache.myfaces.extensions.validator.core.mapper.NameMapper;
+import org.apache.myfaces.extensions.validator.internal.UsageEnum;
+import org.apache.myfaces.extensions.validator.internal.UsageInformation;
+
+import javax.faces.convert.Converter;
+
+/**
+ * @author Gerhard Petracek
+ */
+@UsageInformation(UsageEnum.FALLBACK)
+public class DefaultConverterToAdapterNameMapper implements
+    NameMapper<Converter>
+{
+    public String createName(Converter converter)
+    {
+        return converter.getClass().getName() + "Adapter";
+    }
+}
\ No newline at end of file

Added: myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/adapter/mapper/SimpleConverterToAdapterNameMapper.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/adapter/mapper/SimpleConverterToAdapterNameMapper.java?rev=694497&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/adapter/mapper/SimpleConverterToAdapterNameMapper.java (added)
+++ myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/adapter/mapper/SimpleConverterToAdapterNameMapper.java Thu Sep 11 14:36:02 2008
@@ -0,0 +1,41 @@
+/*
+ * 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.core.adapter.mapper;
+
+import org.apache.myfaces.extensions.validator.ExtValInformation;
+import org.apache.myfaces.extensions.validator.core.mapper.NameMapper;
+import org.apache.myfaces.extensions.validator.internal.UsageEnum;
+import org.apache.myfaces.extensions.validator.internal.UsageInformation;
+
+import javax.faces.convert.Converter;
+
+/**
+ * @author Gerhard Petracek
+ */
+@UsageInformation(UsageEnum.FALLBACK)
+public class SimpleConverterToAdapterNameMapper implements
+    NameMapper<Converter>
+{
+    public String createName(Converter converter)
+    {
+        return ExtValInformation.EXTENSIONS_VALIDATOR_BASE_PACKAGE_NAME
+            + ".adapter." + converter.getClass().getSimpleName()
+            + "Adapter";
+    }
+}
\ No newline at end of file

Added: myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/proxy/ExtValApplication.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/proxy/ExtValApplication.java?rev=694497&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/proxy/ExtValApplication.java (added)
+++ myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/proxy/ExtValApplication.java Thu Sep 11 14:36:02 2008
@@ -0,0 +1,296 @@
+/*
+ * 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.core.proxy;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.myfaces.extensions.validator.internal.UsageEnum;
+import org.apache.myfaces.extensions.validator.internal.UsageInformation;
+import org.apache.myfaces.extensions.validator.util.AdapterFactoryUtils;
+import org.apache.myfaces.extensions.validator.util.ProxyUtils;
+
+import javax.faces.FacesException;
+import javax.faces.application.Application;
+import javax.faces.application.NavigationHandler;
+import javax.faces.application.StateManager;
+import javax.faces.application.ViewHandler;
+import javax.faces.component.EditableValueHolder;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+import javax.faces.el.MethodBinding;
+import javax.faces.el.PropertyResolver;
+import javax.faces.el.ReferenceSyntaxException;
+import javax.faces.el.ValueBinding;
+import javax.faces.el.VariableResolver;
+import javax.faces.event.ActionListener;
+import javax.faces.validator.Validator;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.Locale;
+
+/**
+ * @author Gerhard Petracek
+ */
+@UsageInformation({UsageEnum.ALTERNATIVE, UsageEnum.INTERNAL})
+public class ExtValApplication extends Application
+{
+    protected final Log logger = LogFactory.getLog(getClass());
+
+    private Application wrapped;
+
+    public ExtValApplication()
+    {
+    }
+
+    public ExtValApplication(Application wrapped)
+    {
+        if (logger.isTraceEnabled())
+        {
+            logger.trace(getClass().getName() + " wraps " + wrapped.getClass().getName());
+        }
+        this.wrapped = wrapped;
+    }
+
+    public UIComponent createComponent(ValueBinding componentBinding,
+                                       FacesContext context, String componentType) throws FacesException
+    {
+        UIComponent component = this.wrapped.createComponent(componentBinding,
+            context, componentType);
+        return tryToSetExtValValidatingConverter(component);
+    }
+
+    private UIComponent tryToSetExtValValidatingConverter(UIComponent component)
+    {
+        //in order to access the wrapped application and and support other Application wrappers
+        ProxyUtils.setOriginalApplication(wrapped);
+
+        //if no converter is used add sev-en converter - so it isn't 
+        //necessary to add sev-en converter manually within the page
+        if (component instanceof EditableValueHolder)
+        {
+            ((EditableValueHolder) component)
+                .setConverter(new ExtValConverter());
+        }
+        return component;
+    }
+
+    public Converter createConverter(String converterId) throws FacesException
+    {
+        Converter converter = this.wrapped.createConverter(converterId);
+        return getExtValConverter(converter);
+    }
+
+    public Converter createConverter(Class targetClass) throws FacesException
+    {
+        Converter converter = this.wrapped.createConverter(targetClass);
+
+        return getExtValConverter(converter);
+    }
+
+    private Converter getExtValConverter(Converter converter)
+    {
+        if (converter == null)
+        {
+            return new ExtValConverter();
+        }
+
+        if (this.logger.isTraceEnabled())
+        {
+            this.logger.trace("converter to wrap: " + converter.getClass().getName());
+        }
+
+        if (!ProxyUtils.useFallbackAdapters())
+        {
+            return ExtValConverter.newInstance(converter);
+        }
+        else
+        {
+            //fallback adapter solution
+            //if there is a problem with the default approach (the phase-listener)
+            //or the alternative (the state-manager)
+            return AdapterFactoryUtils.getConverterAdapterFactory().create(converter);
+        }
+    }
+
+    public Iterator getConverterIds()
+    {
+        return this.wrapped.getConverterIds();
+    }
+
+    public Iterator getConverterTypes()
+    {
+        return this.wrapped.getConverterTypes();
+    }
+
+    public void addConverter(String converterId, String converterClass)
+    {
+        this.wrapped.addConverter(converterId, converterClass);
+    }
+
+    public void addConverter(Class targetClass, String converterClass)
+    {
+        this.wrapped.addConverter(targetClass, converterClass);
+    }
+
+    public Iterator getComponentTypes()
+    {
+        return this.wrapped.getComponentTypes();
+    }
+
+    public ActionListener getActionListener()
+    {
+        return this.wrapped.getActionListener();
+    }
+
+    public void setActionListener(ActionListener listener)
+    {
+        this.wrapped.setActionListener(listener);
+    }
+
+    public Locale getDefaultLocale()
+    {
+        return this.wrapped.getDefaultLocale();
+    }
+
+    public void setDefaultLocale(Locale locale)
+    {
+        this.wrapped.setDefaultLocale(locale);
+    }
+
+    public String getDefaultRenderKitId()
+    {
+        return this.wrapped.getDefaultRenderKitId();
+    }
+
+    public void setDefaultRenderKitId(String renderKitId)
+    {
+        this.wrapped.setDefaultRenderKitId(renderKitId);
+    }
+
+    public String getMessageBundle()
+    {
+        return this.wrapped.getMessageBundle();
+    }
+
+    public void setMessageBundle(String bundle)
+    {
+        this.wrapped.setMessageBundle(bundle);
+    }
+
+    public NavigationHandler getNavigationHandler()
+    {
+        return this.wrapped.getNavigationHandler();
+    }
+
+    public void setNavigationHandler(NavigationHandler handler)
+    {
+        this.wrapped.setNavigationHandler(handler);
+    }
+
+    public PropertyResolver getPropertyResolver()
+    {
+        return this.wrapped.getPropertyResolver();
+    }
+
+    public void setPropertyResolver(PropertyResolver resolver)
+    {
+        this.wrapped.setPropertyResolver(resolver);
+    }
+
+    public VariableResolver getVariableResolver()
+    {
+        return this.wrapped.getVariableResolver();
+    }
+
+    public void setVariableResolver(VariableResolver resolver)
+    {
+        this.wrapped.setVariableResolver(resolver);
+    }
+
+    public ViewHandler getViewHandler()
+    {
+        return this.wrapped.getViewHandler();
+    }
+
+    public void setViewHandler(ViewHandler handler)
+    {
+        this.wrapped.setViewHandler(handler);
+    }
+
+    public StateManager getStateManager()
+    {
+        return this.wrapped.getStateManager();
+    }
+
+    public void setStateManager(StateManager manager)
+    {
+        this.wrapped.setStateManager(manager);
+    }
+
+    public void addComponent(String componentType, String componentClass)
+    {
+        this.wrapped.addComponent(componentType, componentClass);
+    }
+
+    public UIComponent createComponent(String componentType)
+        throws FacesException
+    {
+        UIComponent component = this.wrapped.createComponent(componentType);
+
+        return tryToSetExtValValidatingConverter(component);
+    }
+
+    public MethodBinding createMethodBinding(String ref, Class[] params)
+        throws ReferenceSyntaxException
+    {
+        return this.wrapped.createMethodBinding(ref, params);
+    }
+
+    public Iterator getSupportedLocales()
+    {
+        return this.wrapped.getSupportedLocales();
+    }
+
+    public void setSupportedLocales(Collection locales)
+    {
+        this.wrapped.setSupportedLocales(locales);
+    }
+
+    public void addValidator(String validatorId, String validatorClass)
+    {
+        this.wrapped.addValidator(validatorId, validatorClass);
+    }
+
+    public Validator createValidator(String validatorId) throws FacesException
+    {
+        return this.wrapped.createValidator(validatorId);
+    }
+
+    public Iterator getValidatorIds()
+    {
+        return this.wrapped.getValidatorIds();
+    }
+
+    public ValueBinding createValueBinding(String ref)
+        throws ReferenceSyntaxException
+    {
+        return this.wrapped.createValueBinding(ref);
+    }
+}

Added: myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/proxy/ExtValApplicationFactory.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/proxy/ExtValApplicationFactory.java?rev=694497&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/proxy/ExtValApplicationFactory.java (added)
+++ myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/proxy/ExtValApplicationFactory.java Thu Sep 11 14:36:02 2008
@@ -0,0 +1,76 @@
+/*
+ * 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.core.proxy;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.myfaces.extensions.validator.internal.UsageEnum;
+import org.apache.myfaces.extensions.validator.internal.UsageInformation;
+
+import javax.faces.application.Application;
+import javax.faces.application.ApplicationFactory;
+
+/**
+ * @author Gerhard Petracek
+ */
+@UsageInformation({UsageEnum.ALTERNATIVE, UsageEnum.INTERNAL})
+public class ExtValApplicationFactory extends ApplicationFactory
+{
+    protected final Log logger = LogFactory.getLog(getClass());
+    private static boolean active = false;
+
+    private ApplicationFactory wrapped;
+
+    public ExtValApplicationFactory()
+    {
+    }
+
+    public ExtValApplicationFactory(ApplicationFactory applicationFactory)
+    {
+        active = true;
+        this.wrapped = applicationFactory;
+        setApplication(applicationFactory.getApplication());
+        logger
+            .trace("myfaces-extension-validator application factory instantiated");
+    }
+
+    public Application getApplication()
+    {
+        return this.wrapped.getApplication();
+    }
+
+    public void setApplication(Application application)
+    {
+        if (!(application instanceof ExtValApplication))
+        {
+            logger.trace("myfaces-extension-validator application created");
+
+            this.wrapped.setApplication(new ExtValApplication(application));
+        }
+        else
+        {
+            this.wrapped.setApplication(application);
+        }
+    }
+
+    public static boolean isActive()
+    {
+        return active;
+    }
+}

Added: myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/proxy/ExtValConverter.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/proxy/ExtValConverter.java?rev=694497&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/proxy/ExtValConverter.java (added)
+++ myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/proxy/ExtValConverter.java Thu Sep 11 14:36:02 2008
@@ -0,0 +1,156 @@
+/*
+ * 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.core.proxy;
+
+import net.sf.cglib.proxy.Enhancer;
+import net.sf.cglib.proxy.MethodInterceptor;
+import net.sf.cglib.proxy.MethodProxy;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.myfaces.extensions.validator.internal.UsageEnum;
+import org.apache.myfaces.extensions.validator.internal.UsageInformation;
+import org.apache.myfaces.extensions.validator.util.ExtValUtils;
+import org.apache.myfaces.extensions.validator.util.ProxyUtils;
+import org.apache.myfaces.extensions.validator.util.ValidationUtils;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+import java.io.Serializable;
+import java.lang.reflect.Method;
+
+/**
+ * @author Gerhard Petracek
+ */
+@UsageInformation({UsageEnum.ALTERNATIVE, UsageEnum.INTERNAL})
+public class ExtValConverter implements Converter, MethodInterceptor,
+    Serializable
+{
+    protected final Log logger = LogFactory.getLog(getClass());
+
+    public static Converter newInstance(Converter wrappedConverter)
+    {
+        Class currentClass = wrappedConverter.getClass();
+
+        //it's not possible to wrap the converter again - occurs e.g. under solaris + bea weblogic
+        if (currentClass.getName().contains("$$EnhancerByCGLIB$$")
+            || currentClass.getName().contains("$$FastClassByCGLIB$$"))
+        {
+            return wrappedConverter;
+        }
+
+        Enhancer enhancer = new Enhancer();
+        enhancer.setSuperclass(wrappedConverter.getClass());
+        enhancer.setInterfaces(new Class[]{Converter.class,
+            Serializable.class});
+        enhancer.setCallback(new ExtValConverter());
+
+        ProxyUtils.increaseProcessedConverterCount();
+
+        return (Converter) enhancer.create();
+    }
+
+    public ExtValConverter()
+    {
+        logger.trace("myfaces-extension-validator converter instantiated");
+    }
+
+    public Object getAsObject(FacesContext facesContext,
+                              UIComponent uiComponent, String s)
+    {
+
+        Object convertedObject = getConvertedObject(facesContext, uiComponent,
+            s);
+
+        try
+        {
+            ValidationUtils.processExtValValidation(facesContext, uiComponent, convertedObject);
+        }
+        finally
+        {
+            //build mapping value-binding -> processed information entry
+            ExtValUtils.createValueBindingConvertedValueMapping(uiComponent, convertedObject);
+        }
+
+        return convertedObject;
+    }
+
+    public String getAsString(FacesContext facesContext,
+                              UIComponent uiComponent, Object o)
+    {
+        //indirect approach for complex components
+        Converter converter = ProxyUtils.tryToCreateOriginalConverter(
+            facesContext, uiComponent);
+        return (converter == null) ? (o == null) ? null : o.toString()
+            : converter.getAsString(facesContext, uiComponent, o);
+    }
+
+    public Object intercept(Object obj, Method method, Object[] args,
+                            MethodProxy proxy) throws Throwable
+    {
+        Object convertedObject = proxy.invokeSuper(obj, args);
+
+        if (method.getName().equals("getAsObject"))
+        {
+            try
+            {
+                ValidationUtils.processExtValValidation((FacesContext) args[0],
+                    (UIComponent) args[1], convertedObject);
+            }
+            finally
+            {
+                //build mapping value-binding -> processed information entry
+                ExtValUtils.createValueBindingConvertedValueMapping((UIComponent) args[1], convertedObject);
+            }
+        }
+        else if (method.getName().equals("getAsString"))
+        {
+            storeComponentConverterMappingForProxies((FacesContext) args[0],
+                (UIComponent) args[1], (Converter) obj);
+        }
+        return convertedObject;
+    }
+
+    protected Object getConvertedObject(FacesContext facesContext,
+                                        UIComponent uiComponent, String s)
+    {
+        //indirect approach for complex components
+        //TODO
+        Converter converter = ProxyUtils.tryToCreateOriginalConverter(
+            facesContext, uiComponent);
+        return (converter != null) ? converter.getAsObject(facesContext,
+            uiComponent, s) : s;
+    }
+
+    /*
+     * private methods
+     */
+
+    private void storeComponentConverterMappingForProxies(
+        FacesContext facesContext, UIComponent uiComponent,
+        Converter converter)
+    {
+        if (ProxyUtils.useProxyMapping())
+        {
+            ProxyUtils.getOrInitProxyMapping().put(
+                uiComponent.getClientId(facesContext), converter);
+            ProxyUtils.decreaseProcessedConverterCount();
+        }
+    }
+}

Added: myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/proxy/ProxyMappingPhaseListener.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/proxy/ProxyMappingPhaseListener.java?rev=694497&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/proxy/ProxyMappingPhaseListener.java (added)
+++ myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/core/proxy/ProxyMappingPhaseListener.java Thu Sep 11 14:36:02 2008
@@ -0,0 +1,138 @@
+/*
+ * 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.core.proxy;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.myfaces.extensions.validator.core.WebXmlParameter;
+import org.apache.myfaces.extensions.validator.internal.UsageEnum;
+import org.apache.myfaces.extensions.validator.internal.UsageInformation;
+import org.apache.myfaces.extensions.validator.util.ExtValUtils;
+import org.apache.myfaces.extensions.validator.util.ProxyUtils;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.ValueHolder;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+import javax.faces.event.PhaseEvent;
+import javax.faces.event.PhaseId;
+import javax.faces.event.PhaseListener;
+import java.util.List;
+
+/**
+ * due to a restriction at the state saving process
+ * a proxy gets a super-class which might impl. StateHolder
+ * -> saveState: a StateHolder impl. gets handled before Serializable -> callback doesn't get saved
+ * -> restoreState: restoreState of the super-class gets called - no callback -> no interceptor gets executed
+ * if a framework (such as trinidad) provides caching it's no problem
+ * -> use the web.xml context-param to deactivate the mechanism
+ *
+ * @author Gerhard Petracek
+ */
+@UsageInformation({UsageEnum.ALTERNATIVE, UsageEnum.INTERNAL})
+public class ProxyMappingPhaseListener implements PhaseListener
+{
+    private boolean isInitialized = false;
+
+    protected final Log logger = LogFactory.getLog(getClass());
+
+    public void afterPhase(PhaseEvent event)
+    {
+        if (!isInitialized)
+        {
+            //don't use DEACTIVATE_PROXY_MAPPING here to allow a different concept
+            String initParam = WebXmlParameter.DEACTIVATE_RESTORE_PROXY_PHASE_LISTENER;
+            String initAdapterParam = WebXmlParameter.USE_ADAPTERS;
+
+            if ((initParam != null && initParam.equalsIgnoreCase("true"))
+                || (initAdapterParam != null && initAdapterParam
+                .equalsIgnoreCase("true")))
+            {
+                ExtValUtils.deregisterPhaseListener(this);
+            }
+            isInitialized = true;
+        }
+
+        if (!event.getPhaseId().equals(PhaseId.RENDER_RESPONSE))
+        {
+            return;
+        }
+
+        Integer processedConverterCount = ProxyUtils
+            .getProcessedConverterCount();
+        //don't change the comparison with 0 - in order to reduce the overhead.
+        //if everything works correctly it's not necessary to inspact the full tree
+        //it's just due to a ri bug - normally it's performed during ExtValConverter#intercept#getAsString
+        if (ProxyUtils.useProxyMapping()
+            && (processedConverterCount != null && !processedConverterCount
+            .equals(0)))
+        {
+            storeComponentConverterMappingForProxies(event.getFacesContext(),
+                event.getFacesContext().getViewRoot());
+        }
+    }
+
+    public void beforePhase(PhaseEvent event)
+    {
+        if (!event.getPhaseId().equals(PhaseId.APPLY_REQUEST_VALUES))
+        {
+            return;
+        }
+
+        ProxyUtils.restoreProxies();
+    }
+
+    public PhaseId getPhaseId()
+    {
+        return PhaseId.ANY_PHASE;
+    }
+
+    /**
+     * there is a ri bug (at least with jsp's) -> sometimes getAsString of converters aren't called
+     * -> there is no mapping -> if it's the case and there are
+     * unhandled editable value hoder components within the page
+     * -> search all these components and add the equivalent converter to the mapping
+     *
+     * @param facesContext reference to the current faces context
+     * @param uiComponent  reference to the current component
+     */
+    private void storeComponentConverterMappingForProxies(
+        FacesContext facesContext, UIComponent uiComponent)
+    {
+        //TODO use the following after the impl. of a better multi-window-mode solution
+        //if(!uiComponent.isRendered()) {
+        //    return;
+        //}
+
+        for (UIComponent child : (List<UIComponent>)uiComponent.getChildren())
+        {
+            if (child instanceof ValueHolder)
+            {
+                Converter converter = ((ValueHolder) child).getConverter();
+                if (converter != null
+                    && converter.getClass().getName().contains("$$"))
+                {
+                    ProxyUtils.getOrInitProxyMapping().put(
+                        child.getClientId(facesContext), converter);
+                }
+            }
+            storeComponentConverterMappingForProxies(facesContext, child);
+        }
+    }
+}

Added: myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/util/AdapterFactoryUtils.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/util/AdapterFactoryUtils.java?rev=694497&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/util/AdapterFactoryUtils.java (added)
+++ myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/util/AdapterFactoryUtils.java Thu Sep 11 14:36:02 2008
@@ -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.util;
+
+import org.apache.myfaces.extensions.validator.core.ClassMappingFactory;
+import org.apache.myfaces.extensions.validator.core.WebXmlParameter;
+import org.apache.myfaces.extensions.validator.core.adapter.DefaultConverterAdapterFactory;
+
+import javax.faces.convert.Converter;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author Gerhard Petracek
+ */
+public class AdapterFactoryUtils
+{
+    private static ClassMappingFactory<Converter, Converter> converterAdapterFactory;
+
+    @Deprecated
+    public static ClassMappingFactory<Converter, Converter> getConverterAdapterFactory()
+    {
+        if (converterAdapterFactory == null)
+        {
+            List<String> converterAdapterFactoryClassNames = new ArrayList<String>();
+
+            converterAdapterFactoryClassNames
+                .add(WebXmlParameter.CUSTOM_CONVERTER_ADAPTER_FACTORY);
+            converterAdapterFactoryClassNames.add(ExtValUtils
+                .getInformationProviderBean()
+                .getCustomConverterAdapterFactory());
+            converterAdapterFactoryClassNames
+                .add(DefaultConverterAdapterFactory.class.getName());
+
+            for (String className : converterAdapterFactoryClassNames)
+            {
+                converterAdapterFactory = (ClassMappingFactory<Converter, Converter>) ClassUtils
+                    .tryToInstantiateClassForName(className);
+
+                if (converterAdapterFactory != null)
+                {
+                    //TODO logging
+                    break;
+                }
+            }
+        }
+        return converterAdapterFactory;
+    }
+}

Added: myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/util/ProxyUtils.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/util/ProxyUtils.java?rev=694497&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/util/ProxyUtils.java (added)
+++ myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/java/org/apache/myfaces/extensions/validator/util/ProxyUtils.java Thu Sep 11 14:36:02 2008
@@ -0,0 +1,327 @@
+/*
+ * 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.util;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.myfaces.extensions.validator.core.WebXmlParameter;
+
+import javax.faces.application.Application;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIViewRoot;
+import javax.faces.component.ValueHolder;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author Gerhard Petracek
+ */
+public class ProxyUtils
+{
+    private static final Log LOGGER = LogFactory.getLog(ProxyUtils.class);
+
+    public static final String PROCESSED_CONVERTER_COUNT_KEY = ExtValUtils.VALUE_BINDING_CONVERTED_VALUE_MAPPING_KEY
+        + ":processedConverterCount";
+
+    /*
+     * workaround: mapping clientId -> proxy -> after restore view: find component + set converter of the mapping
+     * TODO: find a better solution - multi-window-mode
+     */
+    public static final String PROXY_MAPPING_KEY = ExtValUtils.VALUE_BINDING_CONVERTED_VALUE_MAPPING_KEY
+        + ":proxyMapping";
+
+    public static Map<String, Object> getOrInitProxyMapping()
+    {
+        FacesContext facesContext = FacesContext.getCurrentInstance();
+        //session scope is just the worst case - cleanup after restore view
+        Map sessionMap = facesContext.getExternalContext().getSessionMap();
+
+        String viewId = facesContext.getViewRoot().getViewId();
+
+        if (!sessionMap.containsKey(PROXY_MAPPING_KEY)
+            || !((Map) sessionMap.get(PROXY_MAPPING_KEY))
+            .containsKey(viewId))
+        {
+            resetProxyMapping(viewId);
+        }
+
+        return (Map<String, Object>) ((Map) sessionMap.get(PROXY_MAPPING_KEY))
+            .get(viewId);
+    }
+
+    public static void resetProxyMapping(String viewId)
+    {
+        Map sessionMap = FacesContext.getCurrentInstance().getExternalContext()
+            .getSessionMap();
+
+        Map<String, Map<String, Object>> storage;
+
+        if (sessionMap.containsKey(PROXY_MAPPING_KEY))
+        {
+            storage = (Map) sessionMap.get(PROXY_MAPPING_KEY);
+        }
+        else
+        {
+            storage = new HashMap<String, Map<String, Object>>();
+        }
+
+        Map<String, Object> map;
+        if (!storage.containsKey(viewId))
+        {
+            map = new HashMap<String, Object>();
+            storage.put(viewId, map);
+        }
+
+        sessionMap.put(PROXY_MAPPING_KEY, storage);
+    }
+
+    public static Integer getProcessedConverterCount()
+    {
+        Map requestMap = FacesContext.getCurrentInstance().getExternalContext()
+            .getRequestMap();
+
+        if (!requestMap.containsKey(PROCESSED_CONVERTER_COUNT_KEY))
+        {
+            resetProcessedConverterMapping();
+        }
+
+        return (Integer) requestMap.get(PROCESSED_CONVERTER_COUNT_KEY);
+    }
+
+    public static void setProcessedConverterCount(Integer count)
+    {
+        Map requestMap = FacesContext.getCurrentInstance().getExternalContext()
+            .getRequestMap();
+
+        if (!requestMap.containsKey(PROCESSED_CONVERTER_COUNT_KEY))
+        {
+            resetProcessedConverterMapping();
+        }
+
+        requestMap.put(PROCESSED_CONVERTER_COUNT_KEY, count);
+    }
+
+    public static void resetProcessedConverterMapping()
+    {
+        FacesContext.getCurrentInstance().getExternalContext().getRequestMap()
+            .put(PROCESSED_CONVERTER_COUNT_KEY, 0);
+    }
+
+    public static void increaseProcessedConverterCount()
+    {
+        setProcessedConverterCount(getProcessedConverterCount() + 1);
+    }
+
+    public static void decreaseProcessedConverterCount()
+    {
+        setProcessedConverterCount(getProcessedConverterCount() - 1);
+    }
+
+    public static boolean useProxyMapping()
+    {
+
+        String initParam = WebXmlParameter.DEACTIVATE_PROXY_MAPPING;
+        boolean disableProxyMapping = (initParam != null && initParam.trim()
+            .equalsIgnoreCase("true"));
+
+        return !(useFallbackAdapters() || disableProxyMapping);
+    }
+
+    public static void restoreProxies()
+    {
+        UIViewRoot viewRoot = FacesContext.getCurrentInstance().getViewRoot();
+
+        if (viewRoot != null && useProxyMapping())
+        {
+            Map componentConverterMapping = getOrInitProxyMapping();
+
+            Iterator current = componentConverterMapping.keySet().iterator();
+            String key;
+            Converter converter;
+            Converter converterOfComponent;
+            UIComponent component = null;
+            while (current.hasNext())
+            {
+                key = (String) current.next();
+                converter = (Converter) componentConverterMapping.get(key);
+
+                try
+                {
+                    component = viewRoot.findComponent(key);
+                }
+                catch (IllegalArgumentException e)
+                {
+                    //do nothing - it's just a ri bug with complex components -
+                    //resolveComponentInComplexComponent will return the correct component
+                }
+
+                if (component == null)
+                {
+                    component = resolveComponentInComplexComponent(viewRoot,
+                        component, key);
+
+                    if (component == null)
+                    {
+                        continue;
+                    }
+                }
+
+                if (!(component instanceof ValueHolder))
+                {
+                    continue;
+                }
+
+                converterOfComponent = ((ValueHolder) component).getConverter();
+
+                //converterOfComponent lost callback during state-saving -> set converter of same type
+                if (converterOfComponent != null
+                    && converterOfComponent.getClass().getSuperclass()
+                    .equals(converter.getClass().getSuperclass()))
+                {
+                    ((ValueHolder) component).setConverter(converter);
+                }
+            }
+        }
+
+        if (useProxyMapping())
+        {
+            resetProxyMapping(FacesContext.getCurrentInstance()
+                .getViewRoot().getViewId());
+        }
+    }
+
+    //TODO
+    private static UIComponent resolveComponentInComplexComponent(
+        UIComponent viewRoot, UIComponent component, String key)
+    {
+        int index = key.lastIndexOf(":");
+
+        if (index == -1)
+        {
+            return null;
+        }
+
+        String newKey = key.substring(0, index);
+        if (viewRoot.findComponent(newKey) == null)
+        {
+            int newIndex = newKey.lastIndexOf(":");
+            if (newIndex < 1)
+            {
+                return null;
+            }
+            newKey = newKey.substring(0, newIndex);
+
+            component = viewRoot.findComponent(newKey);
+
+            if (component == null)
+            {
+                return null;
+            }
+            else
+            {
+                return tryToResolveChildComponent(component, key.substring(key
+                    .lastIndexOf(":")));
+            }
+        }
+        return null;
+    }
+
+    //TODO
+    private static UIComponent tryToResolveChildComponent(
+        UIComponent component, String endOfKey)
+    {
+        FacesContext facesContext = FacesContext.getCurrentInstance();
+        String clientId = component.getClientId(facesContext);
+
+        if (clientId.contains(":") && clientId.substring(clientId.lastIndexOf(":")).endsWith(endOfKey))
+        {
+            return component;
+        }
+
+        UIComponent foundComponent;
+        for (UIComponent child : (List<UIComponent>) component.getChildren())
+        {
+            foundComponent = tryToResolveChildComponent(child, endOfKey);
+
+            if (foundComponent != null)
+            {
+                return foundComponent;
+            }
+        }
+
+        return null;
+    }
+
+    public static final String ORIGINAL_APPLICATION_KEY = ExtValUtils.VALUE_BINDING_CONVERTED_VALUE_MAPPING_KEY
+        + ":wrapped_application";
+
+    //in order to access the wrapped application and support other Application wrappers
+    public static void setOriginalApplication(Application application)
+    {
+        FacesContext facesContext = FacesContext.getCurrentInstance();
+        Map applicationMap = facesContext.getExternalContext()
+            .getApplicationMap();
+
+        if (!applicationMap.containsKey(ORIGINAL_APPLICATION_KEY))
+        {
+            synchronized (ExtValUtils.class)
+            {
+                applicationMap.put(ORIGINAL_APPLICATION_KEY, application);
+
+                if (LOGGER.isTraceEnabled())
+                {
+                    LOGGER.trace("the original application is " + application.getClass().getName());
+                }
+            }
+        }
+    }
+
+    public static Application getOriginalApplication()
+    {
+        return (Application) FacesContext.getCurrentInstance()
+            .getExternalContext().getApplicationMap().get(
+            ORIGINAL_APPLICATION_KEY);
+    }
+
+    public static Converter tryToCreateOriginalConverter(
+        FacesContext facesContext, UIComponent uiComponent)
+    {
+        //for backward compatibility: cross-validation workaround with hidden field and static value
+        Class valueBindingType = ELUtils.getTypeOfValueBindingForComponent(
+            facesContext, uiComponent);
+
+        if (valueBindingType == null)
+        {
+            return null;
+        }
+
+        return getOriginalApplication().createConverter(valueBindingType);
+    }
+
+    @Deprecated
+    public static boolean useFallbackAdapters()
+    {
+        String initParam = WebXmlParameter.USE_ADAPTERS;
+        return (initParam != null && initParam.trim().equalsIgnoreCase("true"));
+    }
+}

Added: myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/resources/LICENSE.txt
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/resources/LICENSE.txt?rev=694497&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/resources/LICENSE.txt (added)
+++ myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/resources/LICENSE.txt Thu Sep 11 14:36:02 2008
@@ -0,0 +1,174 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.

Added: myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/resources/NOTICE.txt
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/resources/NOTICE.txt?rev=694497&view=auto
==============================================================================
--- myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/resources/NOTICE.txt (added)
+++ myfaces/extensions/validator/branches/jsf_1.1/alternative/src/main/resources/NOTICE.txt Thu Sep 11 14:36:02 2008
@@ -0,0 +1,9 @@
+Apache MyFaces Extensions Validator
+Copyright 2007-2008 The Apache Software Foundation
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+
+------------------------------------------------------------------------
+See the file LICENSE.txt
+------------------------------------------------------------------------
\ No newline at end of file

Modified: myfaces/extensions/validator/branches/jsf_1.1/core/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/jsf_1.1/core/pom.xml?rev=694497&r1=694496&r2=694497&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/jsf_1.1/core/pom.xml (original)
+++ myfaces/extensions/validator/branches/jsf_1.1/core/pom.xml Thu Sep 11 14:36:02 2008
@@ -31,7 +31,7 @@
     <groupId>org.apache.myfaces.extensions.validator</groupId>
     <artifactId>myfaces-extval-core</artifactId>
     <name>MyFaces Extensions-Validator Core</name>
-    <version>1.0.1-SNAPSHOT</version>
+    <version>${build.version}</version>
     <packaging>jar</packaging>
     
     <dependencies>
@@ -41,12 +41,6 @@
             <version>${jsf.version}</version>
             <scope>compile</scope>
         </dependency>
-        <dependency>
-            <groupId>cglib</groupId>
-            <artifactId>cglib</artifactId>
-            <version>2.1_3</version>
-            <scope>compile</scope>
-        </dependency>
 
          <dependency>
             <groupId>javax.el</groupId>



Mime
View raw message