FAQ
Hi Leo,

I noticed that you committed eclipse files:

- myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/.classpath
- myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/.project
- myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/.settings/
- myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/.settings/org.eclipse.jdt.core.prefs

Please remove them and add an apropriate svn:ignore entry. Thanks!

Regards,
Jakob

2010/11/26 <lu4242@apache.org>:
Author: lu4242
Date: Fri Nov 26 18:35:04 2010
New Revision: 1039499

URL: http://svn.apache.org/viewvc?rev=1039499&view=rev
Log:
add facelets example to jsf_11 branch

Added:
myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/BooleanBean.java
myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/DateTimeBean.java
myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/NumberBean.java
myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/accessedbeans/
myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/accessedbeans/AccessTrackingVariableResolver.java
myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/accessedbeans/AccessedBeans.java
myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateCreditCard.java
myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertBoolean.jsp
myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertDateTime.jsp
myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertNumber.jsp
myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/creditcardvalidator.jsp
myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/outputClientId.jsp
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/.classpath
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/.project
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/.settings/
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/.settings/org.eclipse.jdt.core.prefs
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/LICENSE.txt
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/NOTICE.txt
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/pom.xml
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/BooleanBean.java
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/DataFieldHolder.java
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/DateTimeBean.java
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/NumberBean.java
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/accessedbeans/
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/accessedbeans/AccessTrackingVariableResolver.java
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/accessedbeans/AccessedBeans.java
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/validate/
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/validate/EducationLevel.java
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateCreditCard.java
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateEnum.java
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateForm.java
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/exporter/
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/exporter/ExporterBean.java
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/exporter/SimpleCar.java
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/renderone/
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/renderone/RenderOneBean.java
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/servlet/
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/servlet/SourceCodeServlet.java
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/resources/
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/resources/org/
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/resources/org/apache/
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/resources/org/apache/myfaces/
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/resources/org/apache/myfaces/examples/
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/resources/org/apache/myfaces/examples/resource/
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/resources/org/apache/myfaces/examples/resource/example_messages.properties
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/META-INF/
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/META-INF/templates/
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/META-INF/templates/footer.xhtml
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/META-INF/templates/mbean_source.xhtml
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/META-INF/templates/template.xhtml
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/WEB-INF/   (with props)
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/WEB-INF/faces-config.xml
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/WEB-INF/web.xml
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/convertBoolean.xhtml
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/convertDateTime.xhtml
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/convertEnum.xhtml
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/convertNumber.xhtml
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/creditcardvalidator.xhtml
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/css/
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/css/basic.css
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/exporter.xhtml
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/home.xhtml
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/index.html
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/outputClientId.xhtml
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/renderOne.xhtml
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/validate.xhtml
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/validateCSV.xhtml
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/validateCompareTo.xhtml
myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/validateUrl.xhtml
myfaces/commons/branches/jsf_11/examples/pom.xml
Modified:
myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/pom.xml
myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/EducationLevel.java
myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateEnum.java
myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateForm.java
myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/resources/org/apache/myfaces/examples/resource/example_messages.properties
myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/WEB-INF/faces-config.xml
myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/WEB-INF/web.xml
myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertEnum.jsp
myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/css/basic.css
myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/exporter.jsp
myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/home.jsp
myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/inc/page_footer.jsp
myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/renderOne.jsp
myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/validate.jsp
myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/validateCSV.jsp
myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/validateCompareTo.jsp
myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/validateUrl.jsp

Modified: myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/pom.xml?rev=1039499&r1=1039498&r2=1039499&view=diff
==============================================================================
--- myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/pom.xml (original)
+++ myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/pom.xml Fri Nov 26 18:35:04 2010
@@ -30,6 +30,15 @@
<url>http://myfaces.apache.org</url>
<build>
<finalName>myfaces-commons-examples11</finalName>
+        <resources>
+            <resource>
+                <directory>src/main/resources</directory>
+                <filtering>true</filtering>
+            </resource>
+            <resource>
+                <directory>src/main/java</directory>
+            </resource>
+        </resources>
<plugins>
<plugin>
<groupId>org.mortbay.jetty</groupId>
@@ -93,10 +102,16 @@
<version>${project.version}</version>
</dependency>
<dependency>
+             <groupId>com.lowagie</groupId>
+             <artifactId>itext</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>poi</groupId>
+            <artifactId>poi</artifactId>
+        </dependency>
+        <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
-            <version>4.0</version>
-            <scope>test</scope>
</dependency>
</dependencies>
-</project>
+</project>
\ No newline at end of file

Added: myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/BooleanBean.java
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/BooleanBean.java?rev=1039499&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/BooleanBean.java (added)
+++ myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/BooleanBean.java Fri Nov 26 18:35:04 2010
@@ -0,0 +1,45 @@
+/*
+ * 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.commons.examples;
+
+
+public class BooleanBean
+{
+    private boolean way;
+
+    public BooleanBean()
+    {
+    }
+
+    public boolean getWay()
+    {
+        return way;
+    }
+
+    public void setWay(boolean way)
+    {
+        this.way = way;
+    }
+
+    public String submit()
+    {
+        System.out.println("Action was called.");
+        return ("valid");
+    }
+}

Added: myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/DateTimeBean.java
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/DateTimeBean.java?rev=1039499&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/DateTimeBean.java (added)
+++ myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/DateTimeBean.java Fri Nov 26 18:35:04 2010
@@ -0,0 +1,102 @@
+/*
+ * 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.commons.examples;
+
+import java.util.Date;
+
+import javax.faces.component.UISelectOne;
+import javax.faces.context.FacesContext;
+
+public class DateTimeBean
+{
+    private String type;
+
+    private Date date1;
+
+    private Date date2;
+
+    private UISelectOne typeSelect;
+
+    public DateTimeBean()
+    {
+        date1 = new Date();
+        type = "both";
+    }
+
+    public String getType()
+    {
+        return type;
+    }
+
+    public void setType(String type)
+    {
+        this.type = type;
+    }
+
+    public Date getDate1()
+    {
+        return date1;
+    }
+
+    public void setDate1(Date date1)
+    {
+        this.date1 = date1;
+    }
+
+    public Date getDate2()
+    {
+        return date2;
+    }
+
+    public void setDate2(Date date2)
+    {
+        this.date2 = date2;
+    }
+
+    public String[] getInvalidMonths()
+    {
+        return new String[]{"jan", "apr", "sep"};
+    }
+
+    public String submit()
+    {
+        System.out.println("Action was called.");
+        return ("valid");
+    }
+
+    public String getTypeFromSelect()
+    {
+        Object value = typeSelect.getValue();
+        if (value != null)
+        {
+            return value.toString();
+        }
+        return null;
+    }
+
+    public UISelectOne getTypeSelect()
+    {
+        return typeSelect;
+    }
+
+    public void setTypeSelect(UISelectOne typeSelect)
+    {
+        this.typeSelect = typeSelect;
+    }
+}

Added: myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/NumberBean.java
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/NumberBean.java?rev=1039499&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/NumberBean.java (added)
+++ myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/NumberBean.java Fri Nov 26 18:35:04 2010
@@ -0,0 +1,86 @@
+/*
+ * 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.commons.examples;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.faces.component.UISelectOne;
+
+public class NumberBean
+{
+    private String type;
+
+    private Map<String, Double> numberMap;
+
+    private UISelectOne typeSelect;
+
+    public NumberBean()
+    {
+        numberMap = new HashMap<String, Double>();
+        numberMap.put("number1", 0.5d);
+        type = "percent";
+    }
+
+    public Map<String, Double> getNumberMap()
+    {
+        return numberMap;
+    }
+
+    public void setNumberMap(Map<String, Double> numberMap)
+    {
+        this.numberMap = numberMap;
+    }
+
+    public String getType()
+    {
+        return type;
+    }
+
+    public void setType(String type)
+    {
+        this.type = type;
+    }
+
+    public String submit()
+    {
+        System.out.println("Action was called.");
+        return ("valid");
+    }
+
+    public String getTypeFromSelect()
+    {
+        Object value = typeSelect.getValue();
+        if (value != null)
+        {
+            return value.toString();
+        }
+        return null;
+    }
+
+    public UISelectOne getTypeSelect()
+    {
+        return typeSelect;
+    }
+
+    public void setTypeSelect(UISelectOne typeSelect)
+    {
+        this.typeSelect = typeSelect;
+    }
+}

Added: myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/accessedbeans/AccessTrackingVariableResolver.java
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/accessedbeans/AccessTrackingVariableResolver.java?rev=1039499&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/accessedbeans/AccessTrackingVariableResolver.java (added)
+++ myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/accessedbeans/AccessTrackingVariableResolver.java Fri Nov 26 18:35:04 2010
@@ -0,0 +1,60 @@
+/*
+ * 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.commons.examples.accessedbeans;
+
+import java.util.Map;
+
+import javax.faces.context.FacesContext;
+import javax.faces.el.EvaluationException;
+import javax.faces.el.VariableResolver;
+
+/**
+ * @author Martin Marinschek (latest modification by $Author: matzew $)
+ * @version $Revision: 167718 $ $Date: 2005-03-24 17:47:11 +0100 (Do, 24 Mär 2005) $
+ */
+public class AccessTrackingVariableResolver extends VariableResolver
+{
+    private VariableResolver delegate;
+
+    /**Implementing delegate-pattern
+     *
+     * @param delegate Delegating to this instance.
+     */
+    public AccessTrackingVariableResolver(VariableResolver delegate)
+    {
+        this.delegate = delegate;
+    }
+
+    // METHODS
+    public Object resolveVariable(FacesContext facesContext, String name) throws EvaluationException
+    {
+        Object resolvedBean = delegate.resolveVariable(facesContext, name);
+
+        if(!(resolvedBean instanceof AccessedBeans) && resolvedBean!=null)
+        {
+            if(!resolvedBean.getClass().getName().startsWith("java.lang.") && !(resolvedBean instanceof Map))
+            {
+                ((AccessedBeans) facesContext.getApplication().
+                        getVariableResolver().resolveVariable(facesContext,"accessedBeans")).addBean(name, resolvedBean);
+            }
+        }
+
+        return resolvedBean;
+    }
+}

Added: myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/accessedbeans/AccessedBeans.java
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/accessedbeans/AccessedBeans.java?rev=1039499&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/accessedbeans/AccessedBeans.java (added)
+++ myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/accessedbeans/AccessedBeans.java Fri Nov 26 18:35:04 2010
@@ -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.commons.examples.accessedbeans;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author Martin Marinschek (latest modification by $Author: matzew $)
+ * @version $Revision: 167718 $ $Date: 2005-03-24 17:47:11 +0100 (Do, 24 Mär 2005) $
+ */
+public class AccessedBeans
+{
+    private List beanList;
+
+    public List getBeanList()
+    {
+        if(beanList == null)
+            beanList = new ArrayList();
+
+        return beanList;
+    }
+
+    public void setBeanList(List beanList)
+    {
+        this.beanList = beanList;
+    }
+
+    public void addBean(String name, Object resolvedBean)
+    {
+        List li = getBeanList();
+
+        for (int i = 0; i < li.size(); i++)
+        {
+            AccessedBean accessedBean = (AccessedBean) li.get(i);
+            if(accessedBean.getName().equals(name))
+                return;
+        }
+
+        AccessedBean bean = new AccessedBean();
+        bean.setName(name);
+        bean.setClazz(resolvedBean.getClass().getName());
+
+        li.add(bean);
+    }
+
+    public static class AccessedBean
+    {
+        private String name;
+        private String clazz;
+
+        public String getName()
+        {
+            return name;
+        }
+
+        public void setName(String name)
+        {
+            this.name = name;
+        }
+
+        public String getClazz()
+        {
+            return clazz;
+        }
+
+        public void setClazz(String clazz)
+        {
+            this.clazz = clazz;
+        }
+    }
+}

Modified: myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/EducationLevel.java
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/EducationLevel.java?rev=1039499&r1=1039498&r2=1039499&view=diff
==============================================================================
--- myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/EducationLevel.java (original)
+++ myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/EducationLevel.java Fri Nov 26 18:35:04 2010
@@ -26,4 +26,4 @@ public enum EducationLevel
UNIVERSITY,
MASTER,
DOCTOR
-}
+}
\ No newline at end of file

Added: myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateCreditCard.java
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateCreditCard.java?rev=1039499&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateCreditCard.java (added)
+++ myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateCreditCard.java Fri Nov 26 18:35:04 2010
@@ -0,0 +1,119 @@
+/*
+ * 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.commons.examples.validate;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UISelectOne;
+import javax.faces.context.FacesContext;
+import javax.faces.model.SelectItem;
+
+/**
+ * @author mwessendorf
+ * @version $Revision: 673801 $ $Date: 2008-07-03 22:58:48 +0200 (Thu, 03 Jul 2008) $
+ */
+public class ValidateCreditCard {
+
+    private String creditCardNumber = null;
+
+    private String creditCardType = "MASTERCARD";
+
+    private List<SelectItem> types = null;
+
+    private UISelectOne creditCardTypeSelect;
+
+    public List<SelectItem> getCreditCardTypes()
+    {
+        if (types == null)
+        {
+            types = new ArrayList<SelectItem>();
+            types.add(new SelectItem("MASTERCARD"));
+            types.add(new SelectItem("VISA"));
+            types.add(new SelectItem("DISCOVER"));
+            types.add(new SelectItem("AMEX"));
+        }
+        return types;
+    }
+
+    public String submit(){
+        System.out.println("Action was called.");
+        FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("The selected credit card type/number is valid"));
+        return ("valid");
+    }
+
+    public String getCreditCardNumber() {
+        return creditCardNumber;
+    }
+
+    public void setCreditCardNumber(String string) {
+        creditCardNumber = string;
+    }
+
+    public String getCreditCardType()
+    {
+        return creditCardType;
+    }
+
+    public void setCreditCardType(String creditCardType)
+    {
+        this.creditCardType = creditCardType;
+    }
+
+    public boolean isAmex()
+    {
+        return "AMEX".equalsIgnoreCase(creditCardType);
+    }
+
+    public boolean isVisa()
+    {
+        return "VISA".equalsIgnoreCase(creditCardType);
+    }
+
+    public boolean isMastercard()
+    {
+        return "MASTERCARD".equalsIgnoreCase(creditCardType);
+    }
+
+    public boolean isDiscover()
+    {
+        return "DISCOVER".equalsIgnoreCase(creditCardType);
+    }
+
+    public UISelectOne getCreditCardTypeSelect()
+    {
+        return creditCardTypeSelect;
+    }
+
+    public void setCreditCardTypeSelect(UISelectOne creditCardTypeSelect)
+    {
+        this.creditCardTypeSelect = creditCardTypeSelect;
+    }
+
+    public String getCreditCardTypeFromSelect()
+    {
+        Object value = creditCardTypeSelect.getValue();
+        if (value != null)
+        {
+            return value.toString();
+        }
+        return null;
+    }
+}

Modified: myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateEnum.java
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateEnum.java?rev=1039499&r1=1039498&r2=1039499&view=diff
==============================================================================
--- myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateEnum.java (original)
+++ myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateEnum.java Fri Nov 26 18:35:04 2010
@@ -18,6 +18,9 @@
*/
package org.apache.myfaces.commons.examples.validate;

+import javax.faces.application.FacesMessage;
+import javax.faces.context.FacesContext;
+
public class ValidateEnum
{

@@ -33,4 +36,9 @@ public class ValidateEnum
this.level = level;
}

+    public String submit(){
+        System.out.println("Action was called.");
+        FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("The selected value is valid"));
+        return ("valid");
+    }
}

Modified: myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateForm.java
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateForm.java?rev=1039499&r1=1039498&r2=1039499&view=diff
==============================================================================
--- myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateForm.java (original)
+++ myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateForm.java Fri Nov 26 18:35:04 2010
@@ -20,7 +20,7 @@ package org.apache.myfaces.commons.examp

/**
* @author mwessendorf
- * @version $Revision: 684334 $ $Date: 2008-08-09 15:28:18 -0500 (Sáb, 09 Ago 2008) $
+ * @version $Revision: 673801 $ $Date: 2008-07-03 15:58:48 -0500 (Jue, 03 Jul 2008) $
*/
public class ValidateForm {


Modified: myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/resources/org/apache/myfaces/examples/resource/example_messages.properties
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/resources/org/apache/myfaces/examples/resource/example_messages.properties?rev=1039499&r1=1039498&r2=1039499&view=diff
==============================================================================
--- myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/resources/org/apache/myfaces/examples/resource/example_messages.properties (original)
+++ myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/resources/org/apache/myfaces/examples/resource/example_messages.properties Fri Nov 26 18:35:04 2010
@@ -1,6 +1,8 @@
button_submit = Submit
email_comma = Email separated by ,
credit_dot = Credit Card separated by .
+credit_number = Insert a credit card number
+credit_type = Please select one card type
url_comma = Url separated by ,
isbn_semicolon = ISBN separated by ;
validate_email = Email
@@ -16,3 +18,4 @@ validate_greaterthan = Validate Greater
validate_greaterthanequal = Validate Greater Than Equal
validate_lessthan = Validate Less Than
validate_lessthanequal =Validate Less Than Equal
+title=Myfaces Commons Example

Modified: myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/WEB-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/WEB-INF/faces-config.xml?rev=1039499&r1=1039498&r2=1039499&view=diff
==============================================================================
--- myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/WEB-INF/faces-config.xml (original)
+++ myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/WEB-INF/faces-config.xml Fri Nov 26 18:35:04 2010
@@ -4,6 +4,17 @@
"http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
<faces-config>

+  <!-- from project setup -->
+  <application>
+    <variable-resolver>org.apache.myfaces.commons.examples.accessedbeans.AccessTrackingVariableResolver</variable-resolver>
+  </application>
+
+    <!-- Accessed beans on the last request -->
+    <managed-bean>
+        <managed-bean-name>accessedBeans</managed-bean-name>
+        <managed-bean-class>org.apache.myfaces.commons.examples.accessedbeans.AccessedBeans</managed-bean-class>
+        <managed-bean-scope>request</managed-bean-scope>
+    </managed-bean>
<managed-bean>
<managed-bean-name>dataFieldHolder</managed-bean-name>
<managed-bean-class>org.apache.myfaces.commons.examples.DataFieldHolder</managed-bean-class>
@@ -30,4 +41,28 @@
<managed-bean-class>org.apache.myfaces.commons.renderone.RenderOneBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
+    <managed-bean>
+        <managed-bean-name>validateCreditCard</managed-bean-name>
+        <managed-bean-class>org.apache.myfaces.commons.examples.validate.ValidateCreditCard</managed-bean-class>
+        <managed-bean-scope>request</managed-bean-scope>
+    </managed-bean>
+
+    <managed-bean>
+        <managed-bean-name>dateTimeBean</managed-bean-name>
+        <managed-bean-class>org.apache.myfaces.commons.examples.DateTimeBean</managed-bean-class>
+        <managed-bean-scope>request</managed-bean-scope>
+    </managed-bean>
+
+    <managed-bean>
+        <managed-bean-name>numberBean</managed-bean-name>
+        <managed-bean-class>org.apache.myfaces.commons.examples.NumberBean</managed-bean-class>
+        <managed-bean-scope>request</managed-bean-scope>
+    </managed-bean>
+
+    <managed-bean>
+        <managed-bean-name>booleanBean</managed-bean-name>
+        <managed-bean-class>org.apache.myfaces.commons.examples.BooleanBean</managed-bean-class>
+        <managed-bean-scope>request</managed-bean-scope>
+    </managed-bean>
+
</faces-config>

Modified: myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/WEB-INF/web.xml?rev=1039499&r1=1039498&r2=1039499&view=diff
==============================================================================
--- myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/WEB-INF/web.xml (original)
+++ myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/WEB-INF/web.xml Fri Nov 26 18:35:04 2010
@@ -130,16 +130,17 @@
<load-on-startup>1</load-on-startup>
</servlet>

-    <servlet>
-        <servlet-name>SourceCodeServlet</servlet-name>
-        <servlet-class>org.apache.myfaces.commons.servlet.SourceCodeServlet</servlet-class>
-    </servlet>

<!-- Faces Servlet Mapping -->
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
+
+    <servlet>
+        <servlet-name>SourceCodeServlet</servlet-name>
+        <servlet-class>org.apache.myfaces.commons.servlet.SourceCodeServlet</servlet-class>
+    </servlet>

<servlet-mapping>
<servlet-name>SourceCodeServlet</servlet-name>

Added: myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertBoolean.jsp
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertBoolean.jsp?rev=1039499&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertBoolean.jsp (added)
+++ myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertBoolean.jsp Fri Nov 26 18:35:04 2010
@@ -0,0 +1,76 @@
+<%@ page session="false" contentType="text/html;charset=utf-8"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://myfaces.apache.org/commons/converters"
+    prefix="mcc"%>
+<%@ taglib uri="http://myfaces.apache.org/commons/components"
+    prefix="mc"%>
+<%@ taglib uri="http://myfaces.apache.org/commons/validators"
+    prefix="mcv"%>
+
+<html>
+<f:view>
+
+<%@include file="inc/head.inc"%>
+
+<!--
+/*
+ * 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.
+ */
+//-->
+
+<body>
+<div id="container">
+    <f:loadBundle
+        basename="org.apache.myfaces.examples.resource.example_messages"
+        var="example_messages" />
+
+   <h1><h:outputText value="#{example_messages['title']}"/></h1>
+   <br/>
+       <h:panelGroup id="body">
+        <p>This example check how mcc:convertBoolean works. This converter
+        translates between boolean values (true/false)
+        and alternate versions of those boolean values like
+        (yes/no), (1/0), and (way/no way).</p>
+               <h:form id="form1">
+                   <h:messages showDetail="false" showSummary="true" ></h:messages>
+            <p>Current value: <h:outputText value="#{booleanBean.way}"/></p>
+                       <h:panelGrid columns="3">
+
+                               <h:outputLabel for="boolVal" value="" />
+                               <h:inputText id="boolVal" value="#{booleanBean.way}" required="true">
+                                       <mcc:convertBoolean trueValue="way" falseValue="no way" />
+                               </h:inputText>
+                               <h:message for="boolVal" styleClass="error" />
+
+                               <h:panelGroup />
+                               <h:commandButton id="validateButton"
+                                       value="#{example_messages['button_submit']}"
+                                       action="#{booleanBean.submit}" />
+                               <h:panelGroup />
+
+                       </h:panelGrid>
+               </h:form>
+
+       </h:panelGroup>
+<%@include file="inc/page_footer.jsp"%>
+</div>
+</body>
+
+</f:view>
+</html>
\ No newline at end of file

Added: myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertDateTime.jsp
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertDateTime.jsp?rev=1039499&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertDateTime.jsp (added)
+++ myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertDateTime.jsp Fri Nov 26 18:35:04 2010
@@ -0,0 +1,86 @@
+<%@ page session="false" contentType="text/html;charset=utf-8"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://myfaces.apache.org/commons/converters"
+    prefix="mcc"%>
+<%@ taglib uri="http://myfaces.apache.org/commons/components"
+    prefix="mc"%>
+<%@ taglib uri="http://myfaces.apache.org/commons/validators"
+    prefix="mcv"%>
+
+<html>
+<f:view>
+
+<%@include file="inc/head.inc"%>
+
+<!--
+/*
+ * 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.
+ */
+//-->
+
+<body>
+<div id="container">
+    <f:loadBundle
+        basename="org.apache.myfaces.examples.resource.example_messages"
+        var="example_messages" />
+
+   <h1><h:outputText value="#{example_messages['title']}"/></h1>
+   <br/>
+       <h:panelGroup id="body">
+        <p>This example shows how mcc:convertDateTime component works. It works almost
+        the same as f:convertDateTime, but it has as TimeZone default
+        TimeZone.getDefault() instead GMT and it evaluate EL expressions when the value
+        is being validated instead when the converter is built. </p>
+        <p>Current Locale: <h:outputText value="#{facesContext.viewRoot.locale}"/></p>
+               <h:form id="form1">
+                   <h:messages showDetail="false" showSummary="true" ></h:messages>
+                       <h:panelGrid columns="3">
+
+                <h:outputLabel for="type"
+                    value="Insert a type" />
+                <h:selectOneMenu id="type" immediate="true" value="#{dateTimeBean.type}" binding="#{dateTimeBean.typeSelect}" >
+                    <f:selectItem itemLabel="date" itemValue="date"/>
+                    <f:selectItem itemLabel="time" itemValue="time"/>
+                    <f:selectItem itemLabel="both" itemValue="both"/>
+                </h:selectOneMenu>
+                <h:message for="type" styleClass="error" />
+
+                               <h:outputLabel for="date1"
+                                       value="Insert a date/time" />
+                               <h:inputText id="date1" value="#{dateTimeBean.date1}" required="true">
+                   <mcc:convertDateTime type="#{dateTimeBean.typeFromSelect}"/>
+                               </h:inputText>
+                               <h:message for="date1" styleClass="error" />
+
+                               <h:panelGroup />
+                               <h:commandButton id="validateButton"
+                                       value="#{example_messages['button_submit']}"
+                                       action="#{dateTimeBean.submit}" />
+                               <h:panelGroup />
+
+                       </h:panelGrid>
+               </h:form>
+
+       </h:panelGroup>
+<%@include file="inc/page_footer.jsp"%>
+</div>
+</body>
+
+</f:view>
+</html>
\ No newline at end of file

Modified: myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertEnum.jsp
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertEnum.jsp?rev=1039499&r1=1039498&r2=1039499&view=diff
==============================================================================
--- myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertEnum.jsp (original)
+++ myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertEnum.jsp Fri Nov 26 18:35:04 2010
@@ -3,10 +3,13 @@
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/commons/converters"
prefix="mcc"%>
+<%@ taglib uri="http://myfaces.apache.org/commons/components"
+    prefix="mc"%>
<%@ taglib uri="http://myfaces.apache.org/commons/validators"
prefix="mcv"%>

<html>
+<f:view>

<%@include file="inc/head.inc"%>

@@ -32,17 +35,18 @@
//-->

<body>
+<div id="container">
+    <f:loadBundle
+        basename="org.apache.myfaces.examples.resource.example_messages"
+        var="example_messages" />

+   <h1><h:outputText value="#{example_messages['title']}"/></h1>
+   <br/>
<!--
managed beans used:
validateForm
-->

-<f:view>
-
-       <f:loadBundle
-               basename="org.apache.myfaces.examples.resource.example_messages"
-               var="example_messages" />

<h:panelGroup id="body">

@@ -54,7 +58,7 @@ managed beans used:
value="#{example_messages['validate_enum']}" />
<h:inputText id="enum" value="#{validateEnum.level}" required="true">
<mcc:convertEnum
-                                               targetClass="org.apache.myfaces.examples.validate.EducationLevel" />
+                                               targetClass="org.apache.myfaces.commons.examples.validate.EducationLevel" />
</h:inputText>
<h:message id="enumError" for="enum" styleClass="error" />

@@ -69,10 +73,10 @@ managed beans used:

</h:panelGroup>

-</f:view>

<%@include file="inc/page_footer.jsp"%>
-
+</div>
</body>

+</f:view>
</html>

Added: myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertNumber.jsp
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertNumber.jsp?rev=1039499&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertNumber.jsp (added)
+++ myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertNumber.jsp Fri Nov 26 18:35:04 2010
@@ -0,0 +1,87 @@
+<%@ page session="false" contentType="text/html;charset=utf-8"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://myfaces.apache.org/commons/converters"
+    prefix="mcc"%>
+<%@ taglib uri="http://myfaces.apache.org/commons/components"
+    prefix="mc"%>
+<%@ taglib uri="http://myfaces.apache.org/commons/validators"
+    prefix="mcv"%>
+
+<html>
+<f:view>
+
+<%@include file="inc/head.inc"%>
+
+<!--
+/*
+ * 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.
+ */
+//-->
+
+<body>
+<div id="container">
+    <f:loadBundle
+        basename="org.apache.myfaces.examples.resource.example_messages"
+        var="example_messages" />
+
+   <h1><h:outputText value="#{example_messages['title']}"/></h1>
+   <br/>
+       <h:panelGroup id="body">
+        <p>This example shows how mcc:convertNumber component works. It works almost
+        the same as f:convertNumber, but it has "destType" attribute that define the
+        target attribute to the backing bean property (useful when maps are used because
+        ValueExpression.getType return null) and it evaluate EL expressions when the value
+        is being validated instead when the converter is built. </p>
+        <p>Current Locale: <h:outputText value="#{facesContext.viewRoot.locale}"/></p>
+               <h:form id="form1">
+                   <h:messages showDetail="false" showSummary="true" ></h:messages>
+                       <h:panelGrid columns="3">
+
+                <h:outputLabel for="type"
+                    value="Insert a type" />
+                <h:selectOneMenu id="type" immediate="true" value="#{numberBean.type}" binding="#{numberBean.typeSelect}" >
+                    <f:selectItem itemLabel="number" itemValue="number"/>
+                    <f:selectItem itemLabel="currency" itemValue="currency"/>
+                    <f:selectItem itemLabel="percent" itemValue="percent"/>
+                </h:selectOneMenu>
+                <h:message for="type" styleClass="error" />
+
+                               <h:outputLabel for="number1"
+                                       value="Insert a number" />
+                               <h:inputText id="number1" value="#{numberBean.numberMap['number1']}" required="true">
+                   <mcc:convertNumber destType="java.lang.Double" type="#{numberBean.typeFromSelect}"/>
+                               </h:inputText>
+                               <h:message for="number1" styleClass="error" />
+
+                               <h:panelGroup />
+                               <h:commandButton id="validateButton"
+                                       value="#{example_messages['button_submit']}"
+                                       action="#{numberBean.submit}" />
+                               <h:panelGroup />
+
+                       </h:panelGrid>
+               </h:form>
+
+       </h:panelGroup>
+<%@include file="inc/page_footer.jsp"%>
+</div>
+</body>
+
+</f:view>
+</html>
\ No newline at end of file

Added: myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/creditcardvalidator.jsp
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/creditcardvalidator.jsp?rev=1039499&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/creditcardvalidator.jsp (added)
+++ myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/creditcardvalidator.jsp Fri Nov 26 18:35:04 2010
@@ -0,0 +1,87 @@
+<%@ page session="false" contentType="text/html;charset=utf-8"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://myfaces.apache.org/commons/converters"
+    prefix="mcc"%>
+<%@ taglib uri="http://myfaces.apache.org/commons/components"
+    prefix="mc"%>
+<%@ taglib uri="http://myfaces.apache.org/commons/validators"
+    prefix="mcv"%>
+
+<html>
+<f:view>
+
+<%@include file="inc/head.inc"%>
+
+<!--
+/*
+ * 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.
+ */
+//-->
+
+<body>
+<div id="container">
+    <f:loadBundle
+        basename="org.apache.myfaces.examples.resource.example_messages"
+        var="example_messages" />
+
+   <h1><h:outputText value="#{example_messages['title']}"/></h1>
+   <br/>
+        <h:messages showDetail="true" showSummary="false"/>
+
+        <h:form id="myform">
+            <p>Some valid test numbers</p>
+
+            <ul>
+              <li>Mastercard : 5555555555554444</li>
+              <li>Mastercard : 5105105105105100</li>
+              <li>Visa : 4111111111111111</li>
+              <li>Visa : 4111111111111111</li>
+              <li>Discover : 6011111111111117</li>
+              <li>Discover : 6011000990139424</li>
+              <li>American Express : 378282246310005</li>
+              <li>American Express : 371449635398431</li>
+            </ul>
+
+            <h:panelGrid columns ="3">
+              <h:outputLabel for="creditCardType" value="#{example_messages['credit_type']}" />
+              <h:selectOneRadio id="creditCardType" value="#{validateCreditCard.creditCardType}" immediate="true" binding="#{validateCreditCard.creditCardTypeSelect}">
+                  <f:selectItems value="#{validateCreditCard.creditCardTypes}"/>
+              </h:selectOneRadio>
+              <h:message id="creditCardTypeError" for="creditCardType" styleClass="error" />
+
+              <h:outputLabel for="creditCardNumber" value="#{example_messages['credit_number']}" />
+              <h:inputText id="creditCardNumber" value="#{validateCreditCard.creditCardNumber}" required="true">
+                  <mcv:validateCreditCard
+                      amex="#{validateCreditCard.creditCardTypeFromSelect == 'AMEX'}"
+                      visa="#{validateCreditCard.creditCardTypeFromSelect == 'VISA'}"
+                      discover="#{validateCreditCard.creditCardTypeFromSelect == 'DISCOVER'}"
+                      mastercard="#{validateCreditCard.creditCardTypeFromSelect == 'MASTERCARD'}" />
+              </h:inputText>
+              <h:message id="creditCardNumberError" for="creditCardNumber" styleClass="error" />
+            </h:panelGrid>
+            <h:panelGroup/>
+            <h:commandButton id="validateButton" value="#{example_messages['button_submit']}" action="#{validateCreditCard.submit}"/>
+            <h:panelGroup/>
+        </h:form>
+<%@include file="inc/page_footer.jsp"%>
+</div>
+</body>
+
+</f:view>
+</html>
\ No newline at end of file

Modified: myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/css/basic.css
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/css/basic.css?rev=1039499&r1=1039498&r2=1039499&view=diff
==============================================================================
--- myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/css/basic.css (original)
+++ myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/css/basic.css Fri Nov 26 18:35:04 2010
@@ -1,8 +1,20 @@
body {
-       font-family : arial, verdana, Geneva, Arial, Helvetica, sans-serif;
+    background-color: rgb(0, 35, 75);
+    font-family : arial, verdana, Geneva, Arial, Helvetica, sans-serif;
font-size : 12px;
}

+#container {
+    margin: 10px auto;
+    width: 900px;
+    background-color: white;
+    padding: 3px;
+}
+
+h1 {
+    font-size: 20px;
+}
+
.standard {
font-family : verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 12px;

Modified: myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/exporter.jsp
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/exporter.jsp?rev=1039499&r1=1039498&r2=1039499&view=diff
==============================================================================
--- myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/exporter.jsp (original)
+++ myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/exporter.jsp Fri Nov 26 18:35:04 2010
@@ -1,10 +1,17 @@
-<%@ page session="false" contentType="text/html;charset=utf-8" %>
-<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
-<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
-<%@ taglib uri="http://myfaces.apache.org/commons/components" prefix="mc" %>
+<%@ page session="false" contentType="text/html;charset=utf-8"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://myfaces.apache.org/commons/converters"
+    prefix="mcc"%>
+<%@ taglib uri="http://myfaces.apache.org/commons/components"
+    prefix="mc"%>
+<%@ taglib uri="http://myfaces.apache.org/commons/validators"
+    prefix="mcv"%>
+
<html>
+<f:view>

-<%@ include file="inc/head.inc" %>
+<%@include file="inc/head.inc"%>

<!--
/*
@@ -28,9 +35,13 @@
//-->

<body>
+<div id="container">
+    <f:loadBundle
+        basename="org.apache.myfaces.examples.resource.example_messages"
+        var="example_messages" />

-<f:view>
-
+   <h1><h:outputText value="#{example_messages['title']}"/></h1>
+   <br/>
<h:form>
<p>This component allows to export the datatable contents to an excel or pdf file.</p>

@@ -70,21 +81,21 @@
<br>

<h:commandButton action="#{exporterBean.export}" value="Export as excel">
-                       <mc:exporterActionListener for="tbl_cars" fileType="XLS"/>
+                       <mc:exporterActionListener for="tbl_cars" fileType="XLS" filename="excel"/>
</h:commandButton>

<br>

<h:commandButton action="#{exporterBean.export}" value="Export as pdf">
-                       <mc:exporterActionListener for="tbl_cars" fileType="PDF"/>
+                       <mc:exporterActionListener for="tbl_cars" fileType="PDF" filename="pdf"/>
</h:commandButton>


</h:form>
-</f:view>

-<%@ include file="inc/page_footer.jsp" %>

+<%@ include file="inc/page_footer.jsp" %>
+</div>
</body>
-
+</f:view>
</html>

Modified: myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/home.jsp
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/home.jsp?rev=1039499&r1=1039498&r2=1039499&view=diff
==============================================================================
--- myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/home.jsp (original)
+++ myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/home.jsp Fri Nov 26 18:35:04 2010
@@ -4,7 +4,7 @@
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<html>
-
+<f:view>
<!--
/*
* Licensed to the Apache Software Foundation (ASF) under one
@@ -30,40 +30,37 @@

<body>

-<f:view>
-
+<div id="container">
<f:loadBundle
basename="org.apache.myfaces.examples.resource.example_messages"
var="example_messages" />

+    <h:panelGrid id="header_group1" columns="2" styleClass="pageHeader"  >
+        <h:panelGroup>
+            <h:outputText style="font-size:20px;color:#FFFFFF" escape="false" value="MyFaces - The free JavaServer&#8482; Faces Implementation - Myfaces Commons JSP Example"/>
+        </h:panelGroup>
+    </h:panelGrid>
+
<h:form>
-               <h:panelGrid>
-                       <h:outputLink value="validate.jsf">
-                               <f:verbatim>Validate Email, Credit Card, Regex</f:verbatim>
-                       </h:outputLink>
-                       <h:outputLink value="validateCompareTo.jsf">
-                               <f:verbatim>ValidateCompareTo</f:verbatim>
-                       </h:outputLink>
-            <h:outputLink value="validateCSV.jsf">
-                <f:verbatim>ValidateCSV</f:verbatim>
-            </h:outputLink>
-            <h:outputLink value="validateUrl.jsf">
-                <f:verbatim>ValidateUrl</f:verbatim>
-            </h:outputLink>
-            <h:outputLink value="convertEnum.jsf">
-                <f:verbatim>ConvertEnum</f:verbatim>
-            </h:outputLink>
-            <h:outputLink value="renderOne.jsf">
-                <f:verbatim>renderOne - render the first child component by order or by index</f:verbatim>
-            </h:outputLink>
-            <h:outputLink value="exporter.jsf">
-                <f:verbatim>Exporter - Export datatable contents as an excel file or as a pdf file</f:verbatim>
-            </h:outputLink>
-               </h:panelGrid>
-       </h:form>
+            <h:panelGrid>
+                <h:outputLink value="convertBoolean.jsf" ><f:verbatim>mcc:convertBoolean</f:verbatim></h:outputLink>
+                <h:outputLink value="convertEnum.jsf" ><f:verbatim>mcc:convertEnum</f:verbatim></h:outputLink>
+                <h:outputLink value="convertNumber.jsf" ><f:verbatim>mcc:convertNumber</f:verbatim></h:outputLink>
+                <h:outputLink value="convertDateTime.jsf" ><f:verbatim>mcc:convertDateTime</f:verbatim></h:outputLink>
+                <h:outputLink value="creditcardvalidator.jsf" ><f:verbatim>mcv:validateCreditCard</f:verbatim></h:outputLink>
+                <h:outputLink value="validate.jsf" ><f:verbatim>Multiple Validations (Email, Credit Card, Regex)</f:verbatim></h:outputLink>
+                <h:outputLink value="validateCompareTo.jsf" ><f:verbatim>mcv:validateCompareTo</f:verbatim></h:outputLink>
+                <h:outputLink value="validateCSV.jsf" ><f:verbatim>mcv:validateCSV</f:verbatim></h:outputLink>
+                <h:outputLink value="validateUrl.jsf" ><f:verbatim>mcv:validateUrl</f:verbatim></h:outputLink>
+                <h:outputLink value="exporter.jsf" ><f:verbatim>Exporter - Export datatable contents as an excel file or as a pdf file</f:verbatim></h:outputLink>
+                <h:outputLink value="renderOne.jsf" ><f:verbatim>mc:renderOne -  render the first child component by order or by index</f:verbatim></h:outputLink>
+                <h:outputLink value="outputClientId.jsf" ><f:verbatim>mc:outputClientId</f:verbatim></h:outputLink>
+            </h:panelGrid>

-</f:view>
+       </h:form>
+</div>

</body>

+</f:view>
</html>

Modified: myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/inc/page_footer.jsp
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/inc/page_footer.jsp?rev=1039499&r1=1039498&r2=1039499&view=diff
==============================================================================
--- myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/inc/page_footer.jsp (original)
+++ myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/inc/page_footer.jsp Fri Nov 26 18:35:04 2010
@@ -1,3 +1,15 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<h:dataTable  value="#{accessedBeans.beanList}" var="accessedBean">
+  <h:column>
+    <h:outputLink value="#{accessedBean.clazz}.java.source" >
+        <h:outputText value="Usage of bean with name : "/>
+        <h:outputText value="#{accessedBean.name}"/>
+        <h:outputText value=" and class : "/>
+        <h:outputText value="#{accessedBean.clazz}"/>
+    </h:outputLink>
+  </h:column>
+</h:dataTable>
<br/>
<br/>


Added: myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/outputClientId.jsp
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/outputClientId.jsp?rev=1039499&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/outputClientId.jsp (added)
+++ myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/outputClientId.jsp Fri Nov 26 18:35:04 2010
@@ -0,0 +1,70 @@
+<%@ page session="false" contentType="text/html;charset=utf-8"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://myfaces.apache.org/commons/converters"
+    prefix="mcc"%>
+<%@ taglib uri="http://myfaces.apache.org/commons/components"
+    prefix="mc"%>
+<%@ taglib uri="http://myfaces.apache.org/commons/validators"
+    prefix="mcv"%>
+
+<html>
+<f:view>
+
+<%@include file="inc/head.inc"%>
+
+<!--
+/*
+ * 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.
+ */
+//-->
+
+<body>
+<div id="container">
+    <f:loadBundle
+        basename="org.apache.myfaces.examples.resource.example_messages"
+        var="example_messages" />
+
+   <h1><h:outputText value="#{example_messages['title']}"/></h1>
+   <br/>
+
+        <h:messages showDetail="true" showSummary="false"/>
+
+        <h:form id="myContainer">
+            mc:outputClientId  is useful when a component id is needed as reference within an inline javascript.
+            <ul>
+                <li>ClientId of containing container is <code><mc:outputClientId for="myContainer"/></code></li>
+                <li>ClientId of current parent is <code><mc:outputClientId /></code></li>
+            </ul>
+        </h:form>
+        <p>
+            <a href="javascript:void" onclick="testJavascript(event);return false;">Test link</a>
+
+            <script type="text/javascript">
+                function testJavascript(event) {
+                    var element = document.getElementById('<mc:outputClientId for="myContainer" />');
+                }
+            </script>
+        </p>
+
+<%@include file="inc/page_footer.jsp"%>
+</div>
+</body>
+
+</f:view>
+</html>
\ No newline at end of file

Modified: myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/renderOne.jsp
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/renderOne.jsp?rev=1039499&r1=1039498&r2=1039499&view=diff
==============================================================================
--- myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/renderOne.jsp (original)
+++ myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/renderOne.jsp Fri Nov 26 18:35:04 2010
@@ -1,8 +1,17 @@
-<%@ page session="false" contentType="text/html;charset=utf-8" %>
-<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
-<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
-<%@ taglib uri="http://myfaces.apache.org/commons/components" prefix="mc" %>
+<%@ page session="false" contentType="text/html;charset=utf-8"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://myfaces.apache.org/commons/converters"
+    prefix="mcc"%>
+<%@ taglib uri="http://myfaces.apache.org/commons/components"
+    prefix="mc"%>
+<%@ taglib uri="http://myfaces.apache.org/commons/validators"
+    prefix="mcv"%>
+
<html>
+<f:view>
+
+<%@include file="inc/head.inc"%>

<!--
/*
@@ -25,10 +34,14 @@
*/
//-->

-<%@include file="inc/head.inc" %>
-
<body>
-<f:view>
+<div id="container">
+    <f:loadBundle
+        basename="org.apache.myfaces.examples.resource.example_messages"
+        var="example_messages" />
+
+   <h1><h:outputText value="#{example_messages['title']}"/></h1>
+   <br/>
<h:form>

<h:outputText value="Output:" />
@@ -52,9 +65,9 @@
</h:panelGrid>

</h:form>
-</f:view>

<%@include file="inc/page_footer.jsp" %>
-
+</div>
</body>
+</f:view>
</html>

Modified: myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/validate.jsp
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/validate.jsp?rev=1039499&r1=1039498&r2=1039499&view=diff
==============================================================================
--- myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/validate.jsp (original)
+++ myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/validate.jsp Fri Nov 26 18:35:04 2010
@@ -6,6 +6,7 @@
<%@ taglib uri="http://myfaces.apache.org/commons/converters" prefix="mcc" %>
<%@ taglib uri="http://myfaces.apache.org/commons/validators" prefix="mcv" %>
<html>
+<f:view>

<%@ include file="inc/head.inc" %>

@@ -31,15 +32,17 @@
//-->

<body>
+<div id="container">
+   <f:loadBundle basename="org.apache.myfaces.examples.resource.example_messages" var="example_messages"/>
+
+   <h1><h:outputText value="#{example_messages['title']}"/></h1>
+   <br/>

<!--
managed beans used:
validateForm
-->

-<f:view>
-
-    <f:loadBundle basename="org.apache.myfaces.examples.resource.example_messages" var="example_messages"/>

<h:panelGroup id="body">

@@ -82,10 +85,10 @@ managed beans used:

</h:panelGroup>

-</f:view>

<%@ include file="inc/page_footer.jsp" %>
-
+</div>
</body>

+</f:view>
</html>

Modified: myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/validateCSV.jsp
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/validateCSV.jsp?rev=1039499&r1=1039498&r2=1039499&view=diff
==============================================================================
--- myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/validateCSV.jsp (original)
+++ myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/validateCSV.jsp Fri Nov 26 18:35:04 2010
@@ -5,6 +5,7 @@
<%@ taglib uri="http://myfaces.apache.org/commons/validators" prefix="mcv" %>

<html>
+<f:view>

<%@include file="inc/head.inc" %>

@@ -30,16 +31,17 @@
//-->

<body>
+<div id="container">
+   <f:loadBundle basename="org.apache.myfaces.examples.resource.example_messages" var="example_messages"/>
+
+   <h1><h:outputText value="#{example_messages['title']}"/></h1>
+   <br/>

<!--
managed beans used:
validateForm
-->

-<f:view>
-
-    <f:loadBundle basename="org.apache.myfaces.examples.resource.example_messages" var="example_messages"/>
-
<h:panelGroup id="body">

<h:messages showDetail="true" showSummary="false"/>
@@ -68,10 +70,10 @@ managed beans used:

</h:panelGroup>

-</f:view>

<%@include file="inc/page_footer.jsp" %>
-
+</div>
</body>

+</f:view>
</html>

Modified: myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/validateCompareTo.jsp
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/validateCompareTo.jsp?rev=1039499&r1=1039498&r2=1039499&view=diff
==============================================================================
--- myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/validateCompareTo.jsp (original)
+++ myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/validateCompareTo.jsp Fri Nov 26 18:35:04 2010
@@ -5,6 +5,7 @@
<%@ taglib uri="http://myfaces.apache.org/commons/validators" prefix="mcv" %>

<html>
+<f:view>

<%@include file="inc/head.inc" %>

@@ -30,15 +31,17 @@
//-->

<body>
+<div id="container">
+   <f:loadBundle basename="org.apache.myfaces.examples.resource.example_messages" var="example_messages"/>
+
+   <h1><h:outputText value="#{example_messages['title']}"/></h1>
+   <br/>

<!--
managed beans used:
validateForm
-->

-<f:view>
-
-    <f:loadBundle basename="org.apache.myfaces.examples.resource.example_messages" var="example_messages"/>

<h:panelGroup id="body">

@@ -96,10 +99,9 @@ managed beans used:

</h:panelGroup>

-</f:view>

<%@include file="inc/page_footer.jsp" %>
-
+</div>
</body>
-
+</f:view>
</html>

Modified: myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/validateUrl.jsp
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/validateUrl.jsp?rev=1039499&r1=1039498&r2=1039499&view=diff
==============================================================================
--- myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/validateUrl.jsp (original)
+++ myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/validateUrl.jsp Fri Nov 26 18:35:04 2010
@@ -5,6 +5,7 @@
<%@ taglib uri="http://myfaces.apache.org/commons/validators" prefix="mcv" %>

<html>
+<f:view>

<%@include file="inc/head.inc" %>

@@ -30,15 +31,17 @@
//-->

<body>
+<div id="container">
+   <f:loadBundle basename="org.apache.myfaces.examples.resource.example_messages" var="example_messages"/>
+
+   <h1><h:outputText value="#{example_messages['title']}"/></h1>
+   <br/>

<!--
managed beans used:
validateForm
-->

-<f:view>
-
-    <f:loadBundle basename="org.apache.myfaces.examples.resource.example_messages" var="example_messages"/>

<h:panelGroup id="body">

@@ -60,10 +63,9 @@ managed beans used:

</h:panelGroup>

-</f:view>

<%@include file="inc/page_footer.jsp" %>
-
+</div>
</body>
-
+</f:view>
</html>

Added: myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/.classpath
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/.classpath?rev=1039499&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/.classpath (added)
+++ myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/.classpath Fri Nov 26 18:35:04 2010
@@ -0,0 +1,48 @@
+<classpath>
+  <classpathentry kind="src" path="src/main/java"/>
+  <classpathentry kind="src" path="src/main/resources" excluding="**/*.java"/>
+  <classpathentry kind="src" path="target/maven-shared-archive-resources" excluding="**/*.java"/>
+  <classpathentry kind="output" path="target/classes"/>
+  <classpathentry kind="var" path="M2_REPO/javax/servlet/jstl/1.1.0/jstl-1.1.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/javax/servlet/servlet-api/2.3/servlet-api-2.3.jar" sourcepath="M2_REPO/javax/servlet/servlet-api/2.3/servlet-api-2.3-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar" sourcepath="M2_REPO/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0-sources.jar">
+    <attributes>
+      <attribute value="jar:file:/C:/Documents%20and%20Settings/lu4242/.m2/repository/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0-javadoc.jar!/" name="javadoc_location"/>
+    </attributes>
+  </classpathentry>
+  <classpathentry kind="var" path="M2_REPO/commons-codec/commons-codec/1.3/commons-codec-1.3.jar" sourcepath="M2_REPO/commons-codec/commons-codec/1.3/commons-codec-1.3-sources.jar">
+    <attributes>
+      <attribute value="jar:file:/C:/Documents%20and%20Settings/lu4242/.m2/repository/commons-codec/commons-codec/1.3/commons-codec-1.3-javadoc.jar!/" name="javadoc_location"/>
+    </attributes>
+  </classpathentry>
+  <classpathentry kind="var" path="M2_REPO/commons-collections/commons-collections/3.1/commons-collections-3.1.jar" sourcepath="M2_REPO/commons-collections/commons-collections/3.1/commons-collections-3.1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/commons-digester/commons-digester/1.8/commons-digester-1.8.jar" sourcepath="M2_REPO/commons-digester/commons-digester/1.8/commons-digester-1.8-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/commons-el/commons-el/1.0/commons-el-1.0.jar" sourcepath="M2_REPO/commons-el/commons-el/1.0/commons-el-1.0-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/commons-lang/commons-lang/2.1/commons-lang-2.1.jar" sourcepath="M2_REPO/commons-lang/commons-lang/2.1/commons-lang-2.1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar" sourcepath="M2_REPO/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4-sources.jar">
+    <attributes>
+      <attribute value="jar:file:/C:/Documents%20and%20Settings/lu4242/.m2/repository/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4-javadoc.jar!/" name="javadoc_location"/>
+    </attributes>
+  </classpathentry>
+  <classpathentry kind="var" path="M2_REPO/commons-validator/commons-validator/1.3.1/commons-validator-1.3.1.jar" sourcepath="M2_REPO/commons-validator/commons-validator/1.3.1/commons-validator-1.3.1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/com/lowagie/itext/1.4.8/itext-1.4.8.jar" sourcepath="M2_REPO/com/lowagie/itext/1.4.8/itext-1.4.8-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/com/sun/facelets/jsf-facelets/1.1.14/jsf-facelets-1.1.14.jar" sourcepath="M2_REPO/com/sun/facelets/jsf-facelets/1.1.14/jsf-facelets-1.1.14-sources.jar">
+    <attributes>
+      <attribute value="jar:file:/C:/Documents%20and%20Settings/lu4242/.m2/repository/com/sun/facelets/jsf-facelets/1.1.14/jsf-facelets-1.1.14-javadoc.jar!/" name="javadoc_location"/>
+    </attributes>
+  </classpathentry>
+  <classpathentry kind="var" path="M2_REPO/junit/junit/4.4/junit-4.4.jar" sourcepath="M2_REPO/junit/junit/4.4/junit-4.4-sources.jar">
+    <attributes>
+      <attribute value="jar:file:/C:/Documents%20and%20Settings/lu4242/.m2/repository/junit/junit/4.4/junit-4.4-javadoc.jar!/" name="javadoc_location"/>
+    </attributes>
+  </classpathentry>
+  <classpathentry kind="var" path="M2_REPO/org/apache/myfaces/core/myfaces-api/1.1.8/myfaces-api-1.1.8.jar"/>
+  <classpathentry kind="src" path="/myfaces-commons-utils11"/>
+  <classpathentry kind="src" path="/myfaces-components11"/>
+  <classpathentry kind="src" path="/myfaces-converters11"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/myfaces/core/myfaces-impl/1.1.8/myfaces-impl-1.1.8.jar"/>
+  <classpathentry kind="src" path="/myfaces-validators11"/>
+  <classpathentry kind="var" path="M2_REPO/oro/oro/2.0.8/oro-2.0.8.jar" sourcepath="M2_REPO/oro/oro/2.0.8/oro-2.0.8-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/poi/poi/2.5.1-final-20040804/poi-2.5.1-final-20040804.jar" sourcepath="M2_REPO/poi/poi/2.5.1-final-20040804/poi-2.5.1-final-20040804-sources.jar"/>
+  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+</classpath>
\ No newline at end of file

Added: myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/.project
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/.project?rev=1039499&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/.project (added)
+++ myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/.project Fri Nov 26 18:35:04 2010
@@ -0,0 +1,20 @@
+<projectDescription>
+  <name>myfaces-commons-facelets-examples11</name>
+  <comment>The MyFaces project is home of the first free open source JavaServer Faces
+       implementation as well as some useful JSF component libraries and other
+       convenient JSF stuff.</comment>
+  <projects>
+    <project>myfaces-commons-utils11</project>
+    <project>myfaces-components11</project>
+    <project>myfaces-converters11</project>
+    <project>myfaces-validators11</project>
+  </projects>
+  <buildSpec>
+    <buildCommand>
+      <name>org.eclipse.jdt.core.javabuilder</name>
+    </buildCommand>
+  </buildSpec>
+  <natures>
+    <nature>org.eclipse.jdt.core.javanature</nature>
+  </natures>
+</projectDescription>
\ No newline at end of file

Added: myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/.settings/org.eclipse.jdt.core.prefs?rev=1039499&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/.settings/org.eclipse.jdt.core.prefs (added)
+++ myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/.settings/org.eclipse.jdt.core.prefs Fri Nov 26 18:35:04 2010
@@ -0,0 +1,5 @@
+#Thu Nov 25 18:36:07 COT 2010
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5



--
Jakob Korherr

blog: http://www.jakobk.com
twitter: http://twitter.com/jakobkorherr
work: http://www.irian.at

Search Discussions

  • Leonardo Uribe at Nov 26, 2010 at 6:47 pm
    Hi Jakob

    I already reverted it and added svn:ignore properties. Thanks for notice it.

    regards,

    Leonardo

    2010/11/26 Jakob Korherr <jakob.korherr@gmail.com>
    Hi Leo,

    I noticed that you committed eclipse files:

    -
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/.classpath
    -
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/.project
    -
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/.settings/
    -
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/.settings/org.eclipse.jdt.core.prefs

    Please remove them and add an apropriate svn:ignore entry. Thanks!

    Regards,
    Jakob

    2010/11/26 <lu4242@apache.org>:
    Author: lu4242
    Date: Fri Nov 26 18:35:04 2010
    New Revision: 1039499

    URL: http://svn.apache.org/viewvc?rev=1039499&view=rev
    Log:
    add facelets example to jsf_11 branch

    Added:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/BooleanBean.java

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/DateTimeBean.java

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/NumberBean.java

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/accessedbeans/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/accessedbeans/AccessTrackingVariableResolver.java

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/accessedbeans/AccessedBeans.java

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateCreditCard.java

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertBoolean.jsp

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertDateTime.jsp

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertNumber.jsp

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/creditcardvalidator.jsp

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/outputClientId.jsp

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/.classpath

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/.project

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/.settings/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/.settings/org.eclipse.jdt.core.prefs

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/LICENSE.txt

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/NOTICE.txt

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/pom.xml

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/BooleanBean.java

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/DataFieldHolder.java

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/DateTimeBean.java

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/NumberBean.java

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/accessedbeans/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/accessedbeans/AccessTrackingVariableResolver.java

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/accessedbeans/AccessedBeans.java

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/validate/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/validate/EducationLevel.java

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateCreditCard.java

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateEnum.java

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateForm.java

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/exporter/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/exporter/ExporterBean.java

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/exporter/SimpleCar.java

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/renderone/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/renderone/RenderOneBean.java

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/servlet/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/servlet/SourceCodeServlet.java

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/resources/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/resources/org/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/resources/org/apache/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/resources/org/apache/myfaces/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/resources/org/apache/myfaces/examples/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/resources/org/apache/myfaces/examples/resource/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/resources/org/apache/myfaces/examples/resource/example_messages.properties

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/META-INF/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/META-INF/templates/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/META-INF/templates/footer.xhtml

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/META-INF/templates/mbean_source.xhtml

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/META-INF/templates/template.xhtml
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/WEB-INF/
    (with props)

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/WEB-INF/faces-config.xml

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/WEB-INF/web.xml

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/convertBoolean.xhtml

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/convertDateTime.xhtml

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/convertEnum.xhtml

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/convertNumber.xhtml

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/creditcardvalidator.xhtml

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/css/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/css/basic.css

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/exporter.xhtml

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/home.xhtml

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/index.html

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/outputClientId.xhtml

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/renderOne.xhtml

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/validate.xhtml

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/validateCSV.xhtml

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/validateCompareTo.xhtml

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/validateUrl.xhtml
    myfaces/commons/branches/jsf_11/examples/pom.xml
    Modified:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/pom.xml

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/EducationLevel.java

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateEnum.java

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateForm.java

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/resources/org/apache/myfaces/examples/resource/example_messages.properties

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/WEB-INF/faces-config.xml

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/WEB-INF/web.xml

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertEnum.jsp

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/css/basic.css

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/exporter.jsp

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/home.jsp

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/inc/page_footer.jsp

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/renderOne.jsp

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/validate.jsp

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/validateCSV.jsp

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/validateCompareTo.jsp

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/validateUrl.jsp
    Modified:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/pom.xml
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/pom.xml?rev=1039499&r1=1039498&r2=1039499&view=diff

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/pom.xml
    (original)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/pom.xml
    Fri Nov 26 18:35:04 2010
    @@ -30,6 +30,15 @@
    <url>http://myfaces.apache.org</url>
    <build>
    <finalName>myfaces-commons-examples11</finalName>
    + <resources>
    + <resource>
    + <directory>src/main/resources</directory>
    + <filtering>true</filtering>
    + </resource>
    + <resource>
    + <directory>src/main/java</directory>
    + </resource>
    + </resources>
    <plugins>
    <plugin>
    <groupId>org.mortbay.jetty</groupId>
    @@ -93,10 +102,16 @@
    <version>${project.version}</version>
    </dependency>
    <dependency>
    + <groupId>com.lowagie</groupId>
    + <artifactId>itext</artifactId>
    + </dependency>
    + <dependency>
    + <groupId>poi</groupId>
    + <artifactId>poi</artifactId>
    + </dependency>
    + <dependency>
    <groupId>junit</groupId>
    <artifactId>junit</artifactId>
    - <version>4.0</version>
    - <scope>test</scope>
    </dependency>
    </dependencies>
    -</project>
    +</project>
    \ No newline at end of file

    Added:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/BooleanBean.java
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/BooleanBean.java?rev=1039499&view=auto

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/BooleanBean.java
    (added)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/BooleanBean.java
    Fri Nov 26 18:35:04 2010
    @@ -0,0 +1,45 @@
    +/*
    + * 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.commons.examples;
    +
    +
    +public class BooleanBean
    +{
    + private boolean way;
    +
    + public BooleanBean()
    + {
    + }
    +
    + public boolean getWay()
    + {
    + return way;
    + }
    +
    + public void setWay(boolean way)
    + {
    + this.way = way;
    + }
    +
    + public String submit()
    + {
    + System.out.println("Action was called.");
    + return ("valid");
    + }
    +}

    Added:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/DateTimeBean.java
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/DateTimeBean.java?rev=1039499&view=auto

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/DateTimeBean.java
    (added)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/DateTimeBean.java
    Fri Nov 26 18:35:04 2010
    @@ -0,0 +1,102 @@
    +/*
    + * 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.commons.examples;
    +
    +import java.util.Date;
    +
    +import javax.faces.component.UISelectOne;
    +import javax.faces.context.FacesContext;
    +
    +public class DateTimeBean
    +{
    + private String type;
    +
    + private Date date1;
    +
    + private Date date2;
    +
    + private UISelectOne typeSelect;
    +
    + public DateTimeBean()
    + {
    + date1 = new Date();
    + type = "both";
    + }
    +
    + public String getType()
    + {
    + return type;
    + }
    +
    + public void setType(String type)
    + {
    + this.type = type;
    + }
    +
    + public Date getDate1()
    + {
    + return date1;
    + }
    +
    + public void setDate1(Date date1)
    + {
    + this.date1 = date1;
    + }
    +
    + public Date getDate2()
    + {
    + return date2;
    + }
    +
    + public void setDate2(Date date2)
    + {
    + this.date2 = date2;
    + }
    +
    + public String[] getInvalidMonths()
    + {
    + return new String[]{"jan", "apr", "sep"};
    + }
    +
    + public String submit()
    + {
    + System.out.println("Action was called.");
    + return ("valid");
    + }
    +
    + public String getTypeFromSelect()
    + {
    + Object value = typeSelect.getValue();
    + if (value != null)
    + {
    + return value.toString();
    + }
    + return null;
    + }
    +
    + public UISelectOne getTypeSelect()
    + {
    + return typeSelect;
    + }
    +
    + public void setTypeSelect(UISelectOne typeSelect)
    + {
    + this.typeSelect = typeSelect;
    + }
    +}

    Added:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/NumberBean.java
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/NumberBean.java?rev=1039499&view=auto

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/NumberBean.java
    (added)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/NumberBean.java
    Fri Nov 26 18:35:04 2010
    @@ -0,0 +1,86 @@
    +/*
    + * 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.commons.examples;
    +
    +import java.util.HashMap;
    +import java.util.Map;
    +
    +import javax.faces.component.UISelectOne;
    +
    +public class NumberBean
    +{
    + private String type;
    +
    + private Map<String, Double> numberMap;
    +
    + private UISelectOne typeSelect;
    +
    + public NumberBean()
    + {
    + numberMap = new HashMap<String, Double>();
    + numberMap.put("number1", 0.5d);
    + type = "percent";
    + }
    +
    + public Map<String, Double> getNumberMap()
    + {
    + return numberMap;
    + }
    +
    + public void setNumberMap(Map<String, Double> numberMap)
    + {
    + this.numberMap = numberMap;
    + }
    +
    + public String getType()
    + {
    + return type;
    + }
    +
    + public void setType(String type)
    + {
    + this.type = type;
    + }
    +
    + public String submit()
    + {
    + System.out.println("Action was called.");
    + return ("valid");
    + }
    +
    + public String getTypeFromSelect()
    + {
    + Object value = typeSelect.getValue();
    + if (value != null)
    + {
    + return value.toString();
    + }
    + return null;
    + }
    +
    + public UISelectOne getTypeSelect()
    + {
    + return typeSelect;
    + }
    +
    + public void setTypeSelect(UISelectOne typeSelect)
    + {
    + this.typeSelect = typeSelect;
    + }
    +}

    Added:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/accessedbeans/AccessTrackingVariableResolver.java
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/accessedbeans/AccessTrackingVariableResolver.java?rev=1039499&view=auto

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/accessedbeans/AccessTrackingVariableResolver.java
    (added)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/accessedbeans/AccessTrackingVariableResolver.java
    Fri Nov 26 18:35:04 2010
    @@ -0,0 +1,60 @@
    +/*
    + * 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.commons.examples.accessedbeans;
    +
    +import java.util.Map;
    +
    +import javax.faces.context.FacesContext;
    +import javax.faces.el.EvaluationException;
    +import javax.faces.el.VariableResolver;
    +
    +/**
    + * @author Martin Marinschek (latest modification by $Author: matzew $)
    + * @version $Revision: 167718 $ $Date: 2005-03-24 17:47:11 +0100 (Do, 24
    Mär 2005) $
    + */
    +public class AccessTrackingVariableResolver extends VariableResolver
    +{
    + private VariableResolver delegate;
    +
    + /**Implementing delegate-pattern
    + *
    + * @param delegate Delegating to this instance.
    + */
    + public AccessTrackingVariableResolver(VariableResolver delegate)
    + {
    + this.delegate = delegate;
    + }
    +
    + // METHODS
    + public Object resolveVariable(FacesContext facesContext, String
    name) throws EvaluationException
    + {
    + Object resolvedBean = delegate.resolveVariable(facesContext, name);
    +
    + if(!(resolvedBean instanceof AccessedBeans) &&
    resolvedBean!=null)
    + {
    +
    if(!resolvedBean.getClass().getName().startsWith("java.lang.") &&
    !(resolvedBean instanceof Map))
    + {
    + ((AccessedBeans) facesContext.getApplication().
    +
    getVariableResolver().resolveVariable(facesContext,"accessedBeans")).addBean(name,
    resolvedBean);
    + }
    + }
    +
    + return resolvedBean;
    + }
    +}

    Added:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/accessedbeans/AccessedBeans.java
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/accessedbeans/AccessedBeans.java?rev=1039499&view=auto

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/accessedbeans/AccessedBeans.java
    (added)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/accessedbeans/AccessedBeans.java
    Fri Nov 26 18:35:04 2010
    @@ -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.commons.examples.accessedbeans;
    +
    +import java.util.ArrayList;
    +import java.util.List;
    +
    +/**
    + * @author Martin Marinschek (latest modification by $Author: matzew $)
    + * @version $Revision: 167718 $ $Date: 2005-03-24 17:47:11 +0100 (Do, 24
    Mär 2005) $
    + */
    +public class AccessedBeans
    +{
    + private List beanList;
    +
    + public List getBeanList()
    + {
    + if(beanList == null)
    + beanList = new ArrayList();
    +
    + return beanList;
    + }
    +
    + public void setBeanList(List beanList)
    + {
    + this.beanList = beanList;
    + }
    +
    + public void addBean(String name, Object resolvedBean)
    + {
    + List li = getBeanList();
    +
    + for (int i = 0; i < li.size(); i++)
    + {
    + AccessedBean accessedBean = (AccessedBean) li.get(i);
    + if(accessedBean.getName().equals(name))
    + return;
    + }
    +
    + AccessedBean bean = new AccessedBean();
    + bean.setName(name);
    + bean.setClazz(resolvedBean.getClass().getName());
    +
    + li.add(bean);
    + }
    +
    + public static class AccessedBean
    + {
    + private String name;
    + private String clazz;
    +
    + public String getName()
    + {
    + return name;
    + }
    +
    + public void setName(String name)
    + {
    + this.name = name;
    + }
    +
    + public String getClazz()
    + {
    + return clazz;
    + }
    +
    + public void setClazz(String clazz)
    + {
    + this.clazz = clazz;
    + }
    + }
    +}

    Modified:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/EducationLevel.java
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/EducationLevel.java?rev=1039499&r1=1039498&r2=1039499&view=diff

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/EducationLevel.java
    (original)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/EducationLevel.java
    Fri Nov 26 18:35:04 2010
    @@ -26,4 +26,4 @@ public enum EducationLevel
    UNIVERSITY,
    MASTER,
    DOCTOR
    -}
    +}
    \ No newline at end of file

    Added:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateCreditCard.java
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateCreditCard.java?rev=1039499&view=auto

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateCreditCard.java
    (added)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateCreditCard.java
    Fri Nov 26 18:35:04 2010
    @@ -0,0 +1,119 @@
    +/*
    + * 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.commons.examples.validate;
    +
    +import java.util.ArrayList;
    +import java.util.List;
    +
    +import javax.faces.application.FacesMessage;
    +import javax.faces.component.UISelectOne;
    +import javax.faces.context.FacesContext;
    +import javax.faces.model.SelectItem;
    +
    +/**
    + * @author mwessendorf
    + * @version $Revision: 673801 $ $Date: 2008-07-03 22:58:48 +0200 (Thu,
    03 Jul 2008) $
    + */
    +public class ValidateCreditCard {
    +
    + private String creditCardNumber = null;
    +
    + private String creditCardType = "MASTERCARD";
    +
    + private List<SelectItem> types = null;
    +
    + private UISelectOne creditCardTypeSelect;
    +
    + public List<SelectItem> getCreditCardTypes()
    + {
    + if (types == null)
    + {
    + types = new ArrayList<SelectItem>();
    + types.add(new SelectItem("MASTERCARD"));
    + types.add(new SelectItem("VISA"));
    + types.add(new SelectItem("DISCOVER"));
    + types.add(new SelectItem("AMEX"));
    + }
    + return types;
    + }
    +
    + public String submit(){
    + System.out.println("Action was called.");
    + FacesContext.getCurrentInstance().addMessage(null, new
    FacesMessage("The selected credit card type/number is valid"));
    + return ("valid");
    + }
    +
    + public String getCreditCardNumber() {
    + return creditCardNumber;
    + }
    +
    + public void setCreditCardNumber(String string) {
    + creditCardNumber = string;
    + }
    +
    + public String getCreditCardType()
    + {
    + return creditCardType;
    + }
    +
    + public void setCreditCardType(String creditCardType)
    + {
    + this.creditCardType = creditCardType;
    + }
    +
    + public boolean isAmex()
    + {
    + return "AMEX".equalsIgnoreCase(creditCardType);
    + }
    +
    + public boolean isVisa()
    + {
    + return "VISA".equalsIgnoreCase(creditCardType);
    + }
    +
    + public boolean isMastercard()
    + {
    + return "MASTERCARD".equalsIgnoreCase(creditCardType);
    + }
    +
    + public boolean isDiscover()
    + {
    + return "DISCOVER".equalsIgnoreCase(creditCardType);
    + }
    +
    + public UISelectOne getCreditCardTypeSelect()
    + {
    + return creditCardTypeSelect;
    + }
    +
    + public void setCreditCardTypeSelect(UISelectOne
    creditCardTypeSelect)
    + {
    + this.creditCardTypeSelect = creditCardTypeSelect;
    + }
    +
    + public String getCreditCardTypeFromSelect()
    + {
    + Object value = creditCardTypeSelect.getValue();
    + if (value != null)
    + {
    + return value.toString();
    + }
    + return null;
    + }
    +}

    Modified:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateEnum.java
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateEnum.java?rev=1039499&r1=1039498&r2=1039499&view=diff

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateEnum.java
    (original)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateEnum.java
    Fri Nov 26 18:35:04 2010
    @@ -18,6 +18,9 @@
    */
    package org.apache.myfaces.commons.examples.validate;

    +import javax.faces.application.FacesMessage;
    +import javax.faces.context.FacesContext;
    +
    public class ValidateEnum
    {

    @@ -33,4 +36,9 @@ public class ValidateEnum
    this.level = level;
    }

    + public String submit(){
    + System.out.println("Action was called.");
    + FacesContext.getCurrentInstance().addMessage(null, new
    FacesMessage("The selected value is valid"));
    + return ("valid");
    + }
    }

    Modified:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateForm.java
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateForm.java?rev=1039499&r1=1039498&r2=1039499&view=diff

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateForm.java
    (original)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateForm.java
    Fri Nov 26 18:35:04 2010
    @@ -20,7 +20,7 @@ package org.apache.myfaces.commons.examp

    /**
    * @author mwessendorf
    - * @version $Revision: 684334 $ $Date: 2008-08-09 15:28:18 -0500 (Sáb,
    09 Ago 2008) $
    + * @version $Revision: 673801 $ $Date: 2008-07-03 15:58:48 -0500 (Jue,
    03 Jul 2008) $
    */
    public class ValidateForm {


    Modified:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/resources/org/apache/myfaces/examples/resource/example_messages.properties
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/resources/org/apache/myfaces/examples/resource/example_messages.properties?rev=1039499&r1=1039498&r2=1039499&view=diff

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/resources/org/apache/myfaces/examples/resource/example_messages.properties
    (original)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/resources/org/apache/myfaces/examples/resource/example_messages.properties
    Fri Nov 26 18:35:04 2010
    @@ -1,6 +1,8 @@
    button_submit = Submit
    email_comma = Email separated by ,
    credit_dot = Credit Card separated by .
    +credit_number = Insert a credit card number
    +credit_type = Please select one card type
    url_comma = Url separated by ,
    isbn_semicolon = ISBN separated by ;
    validate_email = Email
    @@ -16,3 +18,4 @@ validate_greaterthan = Validate Greater
    validate_greaterthanequal = Validate Greater Than Equal
    validate_lessthan = Validate Less Than
    validate_lessthanequal =Validate Less Than Equal
    +title=Myfaces Commons Example

    Modified:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/WEB-INF/faces-config.xml
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/WEB-INF/faces-config.xml?rev=1039499&r1=1039498&r2=1039499&view=diff

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/WEB-INF/faces-config.xml
    (original)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/WEB-INF/faces-config.xml
    Fri Nov 26 18:35:04 2010
    @@ -4,6 +4,17 @@
    "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
    <faces-config>

    + <!-- from project setup -->
    + <application>
    +
    <variable-resolver>org.apache.myfaces.commons.examples.accessedbeans.AccessTrackingVariableResolver</variable-resolver>
    + </application>
    +
    + <!-- Accessed beans on the last request -->
    + <managed-bean>
    + <managed-bean-name>accessedBeans</managed-bean-name>
    +
    <managed-bean-class>org.apache.myfaces.commons.examples.accessedbeans.AccessedBeans</managed-bean-class>
    + <managed-bean-scope>request</managed-bean-scope>
    + </managed-bean>
    <managed-bean>
    <managed-bean-name>dataFieldHolder</managed-bean-name>
    <managed-bean-class>org.apache.myfaces.commons.examples.DataFieldHolder</managed-bean-class>
    @@ -30,4 +41,28 @@
    <managed-bean-class>org.apache.myfaces.commons.renderone.RenderOneBean</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    + <managed-bean>
    + <managed-bean-name>validateCreditCard</managed-bean-name>
    +
    <managed-bean-class>org.apache.myfaces.commons.examples.validate.ValidateCreditCard</managed-bean-class>
    + <managed-bean-scope>request</managed-bean-scope>
    + </managed-bean>
    +
    + <managed-bean>
    + <managed-bean-name>dateTimeBean</managed-bean-name>
    +
    <managed-bean-class>org.apache.myfaces.commons.examples.DateTimeBean</managed-bean-class>
    + <managed-bean-scope>request</managed-bean-scope>
    + </managed-bean>
    +
    + <managed-bean>
    + <managed-bean-name>numberBean</managed-bean-name>
    +
    <managed-bean-class>org.apache.myfaces.commons.examples.NumberBean</managed-bean-class>
    + <managed-bean-scope>request</managed-bean-scope>
    + </managed-bean>
    +
    + <managed-bean>
    + <managed-bean-name>booleanBean</managed-bean-name>
    +
    <managed-bean-class>org.apache.myfaces.commons.examples.BooleanBean</managed-bean-class>
    + <managed-bean-scope>request</managed-bean-scope>
    + </managed-bean>
    +
    </faces-config>

    Modified:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/WEB-INF/web.xml
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/WEB-INF/web.xml?rev=1039499&r1=1039498&r2=1039499&view=diff

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/WEB-INF/web.xml
    (original)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/WEB-INF/web.xml
    Fri Nov 26 18:35:04 2010
    @@ -130,16 +130,17 @@
    <load-on-startup>1</load-on-startup>
    </servlet>

    - <servlet>
    - <servlet-name>SourceCodeServlet</servlet-name>
    -
    <servlet-class>org.apache.myfaces.commons.servlet.SourceCodeServlet</servlet-class>
    - </servlet>

    <!-- Faces Servlet Mapping -->
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>
    +
    + <servlet>
    + <servlet-name>SourceCodeServlet</servlet-name>
    +
    <servlet-class>org.apache.myfaces.commons.servlet.SourceCodeServlet</servlet-class>
    + </servlet>

    <servlet-mapping>
    <servlet-name>SourceCodeServlet</servlet-name>

    Added:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertBoolean.jsp
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertBoolean.jsp?rev=1039499&view=auto

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertBoolean.jsp
    (added)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertBoolean.jsp
    Fri Nov 26 18:35:04 2010
    @@ -0,0 +1,76 @@
    +<%@ page session="false" contentType="text/html;charset=utf-8"%>
    +<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    +<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    +<%@ taglib uri="http://myfaces.apache.org/commons/converters"
    + prefix="mcc"%>
    +<%@ taglib uri="http://myfaces.apache.org/commons/components"
    + prefix="mc"%>
    +<%@ taglib uri="http://myfaces.apache.org/commons/validators"
    + prefix="mcv"%>
    +
    +<html>
    +<f:view>
    +
    +<%@include file="inc/head.inc"%>
    +
    +<!--
    +/*
    + * 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.
    + */
    +//-->
    +
    +<body>
    +<div id="container">
    + <f:loadBundle
    + basename="org.apache.myfaces.examples.resource.example_messages"
    + var="example_messages" />
    +
    + <h1><h:outputText value="#{example_messages['title']}"/></h1>
    + <br/>
    + <h:panelGroup id="body">
    + <p>This example check how mcc:convertBoolean works. This converter
    + translates between boolean values (true/false)
    + and alternate versions of those boolean values like
    + (yes/no), (1/0), and (way/no way).</p>
    + <h:form id="form1">
    + <h:messages showDetail="false" showSummary="true"
    </h:messages>
    + <p>Current value: <h:outputText
    value="#{booleanBean.way}"/></p>
    + <h:panelGrid columns="3">
    +
    + <h:outputLabel for="boolVal" value="" />
    + <h:inputText id="boolVal"
    value="#{booleanBean.way}" required="true">
    + <mcc:convertBoolean
    trueValue="way" falseValue="no way" />
    + </h:inputText>
    + <h:message for="boolVal"
    styleClass="error" />
    +
    + <h:panelGroup />
    + <h:commandButton id="validateButton"
    +
    value="#{example_messages['button_submit']}"
    + action="#{booleanBean.submit}" />
    + <h:panelGroup />
    +
    + </h:panelGrid>
    + </h:form>
    +
    + </h:panelGroup>
    +<%@include file="inc/page_footer.jsp"%>
    +</div>
    +</body>
    +
    +</f:view>
    +</html>
    \ No newline at end of file

    Added:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertDateTime.jsp
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertDateTime.jsp?rev=1039499&view=auto

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertDateTime.jsp
    (added)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertDateTime.jsp
    Fri Nov 26 18:35:04 2010
    @@ -0,0 +1,86 @@
    +<%@ page session="false" contentType="text/html;charset=utf-8"%>
    +<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    +<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    +<%@ taglib uri="http://myfaces.apache.org/commons/converters"
    + prefix="mcc"%>
    +<%@ taglib uri="http://myfaces.apache.org/commons/components"
    + prefix="mc"%>
    +<%@ taglib uri="http://myfaces.apache.org/commons/validators"
    + prefix="mcv"%>
    +
    +<html>
    +<f:view>
    +
    +<%@include file="inc/head.inc"%>
    +
    +<!--
    +/*
    + * 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.
    + */
    +//-->
    +
    +<body>
    +<div id="container">
    + <f:loadBundle
    + basename="org.apache.myfaces.examples.resource.example_messages"
    + var="example_messages" />
    +
    + <h1><h:outputText value="#{example_messages['title']}"/></h1>
    + <br/>
    + <h:panelGroup id="body">
    + <p>This example shows how mcc:convertDateTime component works.
    It works almost
    + the same as f:convertDateTime, but it has as TimeZone default
    + TimeZone.getDefault() instead GMT and it evaluate EL expressions
    when the value
    + is being validated instead when the converter is built. </p>
    + <p>Current Locale: <h:outputText
    value="#{facesContext.viewRoot.locale}"/></p>
    + <h:form id="form1">
    + <h:messages showDetail="false" showSummary="true"
    </h:messages>
    + <h:panelGrid columns="3">
    +
    + <h:outputLabel for="type"
    + value="Insert a type" />
    + <h:selectOneMenu id="type" immediate="true"
    value="#{dateTimeBean.type}" binding="#{dateTimeBean.typeSelect}" >
    + <f:selectItem itemLabel="date" itemValue="date"/>
    + <f:selectItem itemLabel="time" itemValue="time"/>
    + <f:selectItem itemLabel="both" itemValue="both"/>
    + </h:selectOneMenu>
    + <h:message for="type" styleClass="error" />
    +
    + <h:outputLabel for="date1"
    + value="Insert a date/time" />
    + <h:inputText id="date1"
    value="#{dateTimeBean.date1}" required="true">
    + <mcc:convertDateTime
    type="#{dateTimeBean.typeFromSelect}"/>
    + </h:inputText>
    + <h:message for="date1" styleClass="error" />
    +
    + <h:panelGroup />
    + <h:commandButton id="validateButton"
    +
    value="#{example_messages['button_submit']}"
    + action="#{dateTimeBean.submit}" />
    + <h:panelGroup />
    +
    + </h:panelGrid>
    + </h:form>
    +
    + </h:panelGroup>
    +<%@include file="inc/page_footer.jsp"%>
    +</div>
    +</body>
    +
    +</f:view>
    +</html>
    \ No newline at end of file

    Modified:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertEnum.jsp
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertEnum.jsp?rev=1039499&r1=1039498&r2=1039499&view=diff

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertEnum.jsp
    (original)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertEnum.jsp
    Fri Nov 26 18:35:04 2010
    @@ -3,10 +3,13 @@
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://myfaces.apache.org/commons/converters"
    prefix="mcc"%>
    +<%@ taglib uri="http://myfaces.apache.org/commons/components"
    + prefix="mc"%>
    <%@ taglib uri="http://myfaces.apache.org/commons/validators"
    prefix="mcv"%>

    <html>
    +<f:view>

    <%@include file="inc/head.inc"%>

    @@ -32,17 +35,18 @@
    //-->

    <body>
    +<div id="container">
    + <f:loadBundle
    + basename="org.apache.myfaces.examples.resource.example_messages"
    + var="example_messages" />

    + <h1><h:outputText value="#{example_messages['title']}"/></h1>
    + <br/>
    <!--
    managed beans used:
    validateForm
    -->

    -<f:view>
    -
    - <f:loadBundle
    -
    basename="org.apache.myfaces.examples.resource.example_messages"
    - var="example_messages" />

    <h:panelGroup id="body">

    @@ -54,7 +58,7 @@ managed beans used:
    value="#{example_messages['validate_enum']}" />
    <h:inputText id="enum"
    value="#{validateEnum.level}" required="true">
    <mcc:convertEnum
    -
    targetClass="org.apache.myfaces.examples.validate.EducationLevel" />
    +
    targetClass="org.apache.myfaces.commons.examples.validate.EducationLevel" />
    </h:inputText>
    <h:message id="enumError" for="enum"
    styleClass="error" />
    @@ -69,10 +73,10 @@ managed beans used:

    </h:panelGroup>

    -</f:view>

    <%@include file="inc/page_footer.jsp"%>
    -
    +</div>
    </body>

    +</f:view>
    </html>

    Added:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertNumber.jsp
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertNumber.jsp?rev=1039499&view=auto

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertNumber.jsp
    (added)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertNumber.jsp
    Fri Nov 26 18:35:04 2010
    @@ -0,0 +1,87 @@
    +<%@ page session="false" contentType="text/html;charset=utf-8"%>
    +<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    +<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    +<%@ taglib uri="http://myfaces.apache.org/commons/converters"
    + prefix="mcc"%>
    +<%@ taglib uri="http://myfaces.apache.org/commons/components"
    + prefix="mc"%>
    +<%@ taglib uri="http://myfaces.apache.org/commons/validators"
    + prefix="mcv"%>
    +
    +<html>
    +<f:view>
    +
    +<%@include file="inc/head.inc"%>
    +
    +<!--
    +/*
    + * 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.
    + */
    +//-->
    +
    +<body>
    +<div id="container">
    + <f:loadBundle
    + basename="org.apache.myfaces.examples.resource.example_messages"
    + var="example_messages" />
    +
    + <h1><h:outputText value="#{example_messages['title']}"/></h1>
    + <br/>
    + <h:panelGroup id="body">
    + <p>This example shows how mcc:convertNumber component works. It
    works almost
    + the same as f:convertNumber, but it has "destType" attribute
    that define the
    + target attribute to the backing bean property (useful when maps
    are used because
    + ValueExpression.getType return null) and it evaluate EL
    expressions when the value
    + is being validated instead when the converter is built. </p>
    + <p>Current Locale: <h:outputText
    value="#{facesContext.viewRoot.locale}"/></p>
    + <h:form id="form1">
    + <h:messages showDetail="false" showSummary="true"
    </h:messages>
    + <h:panelGrid columns="3">
    +
    + <h:outputLabel for="type"
    + value="Insert a type" />
    + <h:selectOneMenu id="type" immediate="true"
    value="#{numberBean.type}" binding="#{numberBean.typeSelect}" >
    + <f:selectItem itemLabel="number"
    itemValue="number"/>
    + <f:selectItem itemLabel="currency"
    itemValue="currency"/>
    + <f:selectItem itemLabel="percent"
    itemValue="percent"/>
    + </h:selectOneMenu>
    + <h:message for="type" styleClass="error" />
    +
    + <h:outputLabel for="number1"
    + value="Insert a number" />
    + <h:inputText id="number1"
    value="#{numberBean.numberMap['number1']}" required="true">
    + <mcc:convertNumber destType="java.lang.Double"
    type="#{numberBean.typeFromSelect}"/>
    + </h:inputText>
    + <h:message for="number1"
    styleClass="error" />
    +
    + <h:panelGroup />
    + <h:commandButton id="validateButton"
    +
    value="#{example_messages['button_submit']}"
    + action="#{numberBean.submit}" />
    + <h:panelGroup />
    +
    + </h:panelGrid>
    + </h:form>
    +
    + </h:panelGroup>
    +<%@include file="inc/page_footer.jsp"%>
    +</div>
    +</body>
    +
    +</f:view>
    +</html>
    \ No newline at end of file

    Added:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/creditcardvalidator.jsp
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/creditcardvalidator.jsp?rev=1039499&view=auto

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/creditcardvalidator.jsp
    (added)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/creditcardvalidator.jsp
    Fri Nov 26 18:35:04 2010
    @@ -0,0 +1,87 @@
    +<%@ page session="false" contentType="text/html;charset=utf-8"%>
    +<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    +<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    +<%@ taglib uri="http://myfaces.apache.org/commons/converters"
    + prefix="mcc"%>
    +<%@ taglib uri="http://myfaces.apache.org/commons/components"
    + prefix="mc"%>
    +<%@ taglib uri="http://myfaces.apache.org/commons/validators"
    + prefix="mcv"%>
    +
    +<html>
    +<f:view>
    +
    +<%@include file="inc/head.inc"%>
    +
    +<!--
    +/*
    + * 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.
    + */
    +//-->
    +
    +<body>
    +<div id="container">
    + <f:loadBundle
    + basename="org.apache.myfaces.examples.resource.example_messages"
    + var="example_messages" />
    +
    + <h1><h:outputText value="#{example_messages['title']}"/></h1>
    + <br/>
    + <h:messages showDetail="true" showSummary="false"/>
    +
    + <h:form id="myform">
    + <p>Some valid test numbers</p>
    +
    + <ul>
    + <li>Mastercard : 5555555555554444</li>
    + <li>Mastercard : 5105105105105100</li>
    + <li>Visa : 4111111111111111</li>
    + <li>Visa : 4111111111111111</li>
    + <li>Discover : 6011111111111117</li>
    + <li>Discover : 6011000990139424</li>
    + <li>American Express : 378282246310005</li>
    + <li>American Express : 371449635398431</li>
    + </ul>
    +
    + <h:panelGrid columns ="3">
    + <h:outputLabel for="creditCardType"
    value="#{example_messages['credit_type']}" />
    + <h:selectOneRadio id="creditCardType"
    value="#{validateCreditCard.creditCardType}" immediate="true"
    binding="#{validateCreditCard.creditCardTypeSelect}">
    + <f:selectItems
    value="#{validateCreditCard.creditCardTypes}"/>
    + </h:selectOneRadio>
    + <h:message id="creditCardTypeError" for="creditCardType"
    styleClass="error" />
    +
    + <h:outputLabel for="creditCardNumber"
    value="#{example_messages['credit_number']}" />
    + <h:inputText id="creditCardNumber"
    value="#{validateCreditCard.creditCardNumber}" required="true">
    + <mcv:validateCreditCard
    +
    amex="#{validateCreditCard.creditCardTypeFromSelect == 'AMEX'}"
    +
    visa="#{validateCreditCard.creditCardTypeFromSelect == 'VISA'}"
    +
    discover="#{validateCreditCard.creditCardTypeFromSelect == 'DISCOVER'}"
    +
    mastercard="#{validateCreditCard.creditCardTypeFromSelect == 'MASTERCARD'}"
    />
    + </h:inputText>
    + <h:message id="creditCardNumberError"
    for="creditCardNumber" styleClass="error" />
    + </h:panelGrid>
    + <h:panelGroup/>
    + <h:commandButton id="validateButton"
    value="#{example_messages['button_submit']}"
    action="#{validateCreditCard.submit}"/>
    + <h:panelGroup/>
    + </h:form>
    +<%@include file="inc/page_footer.jsp"%>
    +</div>
    +</body>
    +
    +</f:view>
    +</html>
    \ No newline at end of file

    Modified:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/css/basic.css
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/css/basic.css?rev=1039499&r1=1039498&r2=1039499&view=diff

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/css/basic.css
    (original)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/css/basic.css
    Fri Nov 26 18:35:04 2010
    @@ -1,8 +1,20 @@
    body {
    - font-family : arial, verdana, Geneva, Arial, Helvetica,
    sans-serif;
    + background-color: rgb(0, 35, 75);
    + font-family : arial, verdana, Geneva, Arial, Helvetica, sans-serif;
    font-size : 12px;
    }

    +#container {
    + margin: 10px auto;
    + width: 900px;
    + background-color: white;
    + padding: 3px;
    +}
    +
    +h1 {
    + font-size: 20px;
    +}
    +
    .standard {
    font-family : verdana, Geneva, Arial, Helvetica, sans-serif;
    font-size: 12px;

    Modified:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/exporter.jsp
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/exporter.jsp?rev=1039499&r1=1039498&r2=1039499&view=diff

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/exporter.jsp
    (original)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/exporter.jsp
    Fri Nov 26 18:35:04 2010
    @@ -1,10 +1,17 @@
    -<%@ page session="false" contentType="text/html;charset=utf-8" %>
    -<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    -<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    -<%@ taglib uri="http://myfaces.apache.org/commons/components"
    prefix="mc" %>
    +<%@ page session="false" contentType="text/html;charset=utf-8"%>
    +<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    +<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    +<%@ taglib uri="http://myfaces.apache.org/commons/converters"
    + prefix="mcc"%>
    +<%@ taglib uri="http://myfaces.apache.org/commons/components"
    + prefix="mc"%>
    +<%@ taglib uri="http://myfaces.apache.org/commons/validators"
    + prefix="mcv"%>
    +
    <html>
    +<f:view>

    -<%@ include file="inc/head.inc" %>
    +<%@include file="inc/head.inc"%>

    <!--
    /*
    @@ -28,9 +35,13 @@
    //-->

    <body>
    +<div id="container">
    + <f:loadBundle
    + basename="org.apache.myfaces.examples.resource.example_messages"
    + var="example_messages" />

    -<f:view>
    -
    + <h1><h:outputText value="#{example_messages['title']}"/></h1>
    + <br/>
    <h:form>
    <p>This component allows to export the datatable contents to an
    excel or pdf file.</p>
    @@ -70,21 +81,21 @@
    <br>

    <h:commandButton action="#{exporterBean.export}"
    value="Export as excel">
    - <mc:exporterActionListener for="tbl_cars"
    fileType="XLS"/>
    + <mc:exporterActionListener for="tbl_cars"
    fileType="XLS" filename="excel"/>
    </h:commandButton>

    <br>

    <h:commandButton action="#{exporterBean.export}"
    value="Export as pdf">
    - <mc:exporterActionListener for="tbl_cars"
    fileType="PDF"/>
    + <mc:exporterActionListener for="tbl_cars"
    fileType="PDF" filename="pdf"/>
    </h:commandButton>


    </h:form>
    -</f:view>

    -<%@ include file="inc/page_footer.jsp" %>

    +<%@ include file="inc/page_footer.jsp" %>
    +</div>
    </body>
    -
    +</f:view>
    </html>

    Modified:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/home.jsp
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/home.jsp?rev=1039499&r1=1039498&r2=1039499&view=diff

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/home.jsp
    (original)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/home.jsp
    Fri Nov 26 18:35:04 2010
    @@ -4,7 +4,7 @@
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <html>
    -
    +<f:view>
    <!--
    /*
    * Licensed to the Apache Software Foundation (ASF) under one
    @@ -30,40 +30,37 @@

    <body>

    -<f:view>
    -
    +<div id="container">
    <f:loadBundle
    basename="org.apache.myfaces.examples.resource.example_messages"
    var="example_messages" />

    + <h:panelGrid id="header_group1" columns="2" styleClass="pageHeader"

    + <h:panelGroup>
    + <h:outputText style="font-size:20px;color:#FFFFFF"
    escape="false" value="MyFaces - The free JavaServer&#8482; Faces
    Implementation - Myfaces Commons JSP Example"/>
    + </h:panelGroup>
    + </h:panelGrid>
    +
    <h:form>
    - <h:panelGrid>
    - <h:outputLink value="validate.jsf">
    - <f:verbatim>Validate Email, Credit Card,
    Regex</f:verbatim>
    - </h:outputLink>
    - <h:outputLink value="validateCompareTo.jsf">
    -
    <f:verbatim>ValidateCompareTo</f:verbatim>
    - </h:outputLink>
    - <h:outputLink value="validateCSV.jsf">
    - <f:verbatim>ValidateCSV</f:verbatim>
    - </h:outputLink>
    - <h:outputLink value="validateUrl.jsf">
    - <f:verbatim>ValidateUrl</f:verbatim>
    - </h:outputLink>
    - <h:outputLink value="convertEnum.jsf">
    - <f:verbatim>ConvertEnum</f:verbatim>
    - </h:outputLink>
    - <h:outputLink value="renderOne.jsf">
    - <f:verbatim>renderOne - render the first child component
    by order or by index</f:verbatim>
    - </h:outputLink>
    - <h:outputLink value="exporter.jsf">
    - <f:verbatim>Exporter - Export datatable contents as an
    excel file or as a pdf file</f:verbatim>
    - </h:outputLink>
    - </h:panelGrid>
    - </h:form>
    + <h:panelGrid>
    + <h:outputLink value="convertBoolean.jsf"
    <f:verbatim>mcc:convertBoolean</f:verbatim></h:outputLink>
    + <h:outputLink value="convertEnum.jsf"
    <f:verbatim>mcc:convertEnum</f:verbatim></h:outputLink>
    + <h:outputLink value="convertNumber.jsf"
    <f:verbatim>mcc:convertNumber</f:verbatim></h:outputLink>
    + <h:outputLink value="convertDateTime.jsf"
    <f:verbatim>mcc:convertDateTime</f:verbatim></h:outputLink>
    + <h:outputLink value="creditcardvalidator.jsf"
    <f:verbatim>mcv:validateCreditCard</f:verbatim></h:outputLink>
    + <h:outputLink value="validate.jsf" ><f:verbatim>Multiple
    Validations (Email, Credit Card, Regex)</f:verbatim></h:outputLink>
    + <h:outputLink value="validateCompareTo.jsf"
    <f:verbatim>mcv:validateCompareTo</f:verbatim></h:outputLink>
    + <h:outputLink value="validateCSV.jsf"
    <f:verbatim>mcv:validateCSV</f:verbatim></h:outputLink>
    + <h:outputLink value="validateUrl.jsf"
    <f:verbatim>mcv:validateUrl</f:verbatim></h:outputLink>
    + <h:outputLink value="exporter.jsf" ><f:verbatim>Exporter
    - Export datatable contents as an excel file or as a pdf
    file</f:verbatim></h:outputLink>
    + <h:outputLink value="renderOne.jsf"
    <f:verbatim>mc:renderOne - render the first child component by order or by
    index</f:verbatim></h:outputLink>
    + <h:outputLink value="outputClientId.jsf"
    <f:verbatim>mc:outputClientId</f:verbatim></h:outputLink>
    + </h:panelGrid>

    -</f:view>
    + </h:form>
    +</div>

    </body>

    +</f:view>
    </html>

    Modified:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/inc/page_footer.jsp
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/inc/page_footer.jsp?rev=1039499&r1=1039498&r2=1039499&view=diff

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/inc/page_footer.jsp
    (original)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/inc/page_footer.jsp
    Fri Nov 26 18:35:04 2010
    @@ -1,3 +1,15 @@
    +<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    +<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    +<h:dataTable value="#{accessedBeans.beanList}" var="accessedBean">
    + <h:column>
    + <h:outputLink value="#{accessedBean.clazz}.java.source" >
    + <h:outputText value="Usage of bean with name : "/>
    + <h:outputText value="#{accessedBean.name}"/>
    + <h:outputText value=" and class : "/>
    + <h:outputText value="#{accessedBean.clazz}"/>
    + </h:outputLink>
    + </h:column>
    +</h:dataTable>
    <br/>
    <br/>


    Added:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/outputClientId.jsp
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/outputClientId.jsp?rev=1039499&view=auto

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/outputClientId.jsp
    (added)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/outputClientId.jsp
    Fri Nov 26 18:35:04 2010
    @@ -0,0 +1,70 @@
    +<%@ page session="false" contentType="text/html;charset=utf-8"%>
    +<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    +<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    +<%@ taglib uri="http://myfaces.apache.org/commons/converters"
    + prefix="mcc"%>
    +<%@ taglib uri="http://myfaces.apache.org/commons/components"
    + prefix="mc"%>
    +<%@ taglib uri="http://myfaces.apache.org/commons/validators"
    + prefix="mcv"%>
    +
    +<html>
    +<f:view>
    +
    +<%@include file="inc/head.inc"%>
    +
    +<!--
    +/*
    + * 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.
    + */
    +//-->
    +
    +<body>
    +<div id="container">
    + <f:loadBundle
    + basename="org.apache.myfaces.examples.resource.example_messages"
    + var="example_messages" />
    +
    + <h1><h:outputText value="#{example_messages['title']}"/></h1>
    + <br/>
    +
    + <h:messages showDetail="true" showSummary="false"/>
    +
    + <h:form id="myContainer">
    + mc:outputClientId is useful when a component id is needed
    as reference within an inline javascript.
    + <ul>
    + <li>ClientId of containing container is
    <code><mc:outputClientId for="myContainer"/></code></li>
    + <li>ClientId of current parent is
    <code><mc:outputClientId /></code></li>
    + </ul>
    + </h:form>
    + <p>
    + <a href="javascript:void"
    onclick="testJavascript(event);return false;">Test link</a>
    +
    + <script type="text/javascript">
    + function testJavascript(event) {
    + var element =
    document.getElementById('<mc:outputClientId for="myContainer" />');
    + }
    + </script>
    + </p>
    +
    +<%@include file="inc/page_footer.jsp"%>
    +</div>
    +</body>
    +
    +</f:view>
    +</html>
    \ No newline at end of file

    Modified:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/renderOne.jsp
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/renderOne.jsp?rev=1039499&r1=1039498&r2=1039499&view=diff

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/renderOne.jsp
    (original)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/renderOne.jsp
    Fri Nov 26 18:35:04 2010
    @@ -1,8 +1,17 @@
    -<%@ page session="false" contentType="text/html;charset=utf-8" %>
    -<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    -<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    -<%@ taglib uri="http://myfaces.apache.org/commons/components"
    prefix="mc" %>
    +<%@ page session="false" contentType="text/html;charset=utf-8"%>
    +<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    +<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    +<%@ taglib uri="http://myfaces.apache.org/commons/converters"
    + prefix="mcc"%>
    +<%@ taglib uri="http://myfaces.apache.org/commons/components"
    + prefix="mc"%>
    +<%@ taglib uri="http://myfaces.apache.org/commons/validators"
    + prefix="mcv"%>
    +
    <html>
    +<f:view>
    +
    +<%@include file="inc/head.inc"%>

    <!--
    /*
    @@ -25,10 +34,14 @@
    */
    //-->

    -<%@include file="inc/head.inc" %>
    -
    <body>
    -<f:view>
    +<div id="container">
    + <f:loadBundle
    + basename="org.apache.myfaces.examples.resource.example_messages"
    + var="example_messages" />
    +
    + <h1><h:outputText value="#{example_messages['title']}"/></h1>
    + <br/>
    <h:form>

    <h:outputText value="Output:" />
    @@ -52,9 +65,9 @@
    </h:panelGrid>

    </h:form>
    -</f:view>

    <%@include file="inc/page_footer.jsp" %>
    -
    +</div>
    </body>
    +</f:view>
    </html>

    Modified:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/validate.jsp
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/validate.jsp?rev=1039499&r1=1039498&r2=1039499&view=diff

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/validate.jsp
    (original)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/validate.jsp
    Fri Nov 26 18:35:04 2010
    @@ -6,6 +6,7 @@
    <%@ taglib uri="http://myfaces.apache.org/commons/converters"
    prefix="mcc" %>
    <%@ taglib uri="http://myfaces.apache.org/commons/validators"
    prefix="mcv" %>
    <html>
    +<f:view>

    <%@ include file="inc/head.inc" %>

    @@ -31,15 +32,17 @@
    //-->

    <body>
    +<div id="container">
    + <f:loadBundle
    basename="org.apache.myfaces.examples.resource.example_messages"
    var="example_messages"/>
    +
    + <h1><h:outputText value="#{example_messages['title']}"/></h1>
    + <br/>

    <!--
    managed beans used:
    validateForm
    -->

    -<f:view>
    -
    - <f:loadBundle
    basename="org.apache.myfaces.examples.resource.example_messages"
    var="example_messages"/>
    <h:panelGroup id="body">

    @@ -82,10 +85,10 @@ managed beans used:

    </h:panelGroup>

    -</f:view>

    <%@ include file="inc/page_footer.jsp" %>
    -
    +</div>
    </body>

    +</f:view>
    </html>

    Modified:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/validateCSV.jsp
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/validateCSV.jsp?rev=1039499&r1=1039498&r2=1039499&view=diff

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/validateCSV.jsp
    (original)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/validateCSV.jsp
    Fri Nov 26 18:35:04 2010
    @@ -5,6 +5,7 @@
    <%@ taglib uri="http://myfaces.apache.org/commons/validators"
    prefix="mcv" %>
    <html>
    +<f:view>

    <%@include file="inc/head.inc" %>

    @@ -30,16 +31,17 @@
    //-->

    <body>
    +<div id="container">
    + <f:loadBundle
    basename="org.apache.myfaces.examples.resource.example_messages"
    var="example_messages"/>
    +
    + <h1><h:outputText value="#{example_messages['title']}"/></h1>
    + <br/>

    <!--
    managed beans used:
    validateForm
    -->

    -<f:view>
    -
    - <f:loadBundle
    basename="org.apache.myfaces.examples.resource.example_messages"
    var="example_messages"/>
    -
    <h:panelGroup id="body">

    <h:messages showDetail="true" showSummary="false"/>
    @@ -68,10 +70,10 @@ managed beans used:

    </h:panelGroup>

    -</f:view>

    <%@include file="inc/page_footer.jsp" %>
    -
    +</div>
    </body>

    +</f:view>
    </html>

    Modified:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/validateCompareTo.jsp
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/validateCompareTo.jsp?rev=1039499&r1=1039498&r2=1039499&view=diff

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/validateCompareTo.jsp
    (original)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/validateCompareTo.jsp
    Fri Nov 26 18:35:04 2010
    @@ -5,6 +5,7 @@
    <%@ taglib uri="http://myfaces.apache.org/commons/validators"
    prefix="mcv" %>
    <html>
    +<f:view>

    <%@include file="inc/head.inc" %>

    @@ -30,15 +31,17 @@
    //-->

    <body>
    +<div id="container">
    + <f:loadBundle
    basename="org.apache.myfaces.examples.resource.example_messages"
    var="example_messages"/>
    +
    + <h1><h:outputText value="#{example_messages['title']}"/></h1>
    + <br/>

    <!--
    managed beans used:
    validateForm
    -->

    -<f:view>
    -
    - <f:loadBundle
    basename="org.apache.myfaces.examples.resource.example_messages"
    var="example_messages"/>
    <h:panelGroup id="body">

    @@ -96,10 +99,9 @@ managed beans used:

    </h:panelGroup>

    -</f:view>

    <%@include file="inc/page_footer.jsp" %>
    -
    +</div>
    </body>
    -
    +</f:view>
    </html>

    Modified:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/validateUrl.jsp
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/validateUrl.jsp?rev=1039499&r1=1039498&r2=1039499&view=diff

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/validateUrl.jsp
    (original)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/validateUrl.jsp
    Fri Nov 26 18:35:04 2010
    @@ -5,6 +5,7 @@
    <%@ taglib uri="http://myfaces.apache.org/commons/validators"
    prefix="mcv" %>
    <html>
    +<f:view>

    <%@include file="inc/head.inc" %>

    @@ -30,15 +31,17 @@
    //-->

    <body>
    +<div id="container">
    + <f:loadBundle
    basename="org.apache.myfaces.examples.resource.example_messages"
    var="example_messages"/>
    +
    + <h1><h:outputText value="#{example_messages['title']}"/></h1>
    + <br/>

    <!--
    managed beans used:
    validateForm
    -->

    -<f:view>
    -
    - <f:loadBundle
    basename="org.apache.myfaces.examples.resource.example_messages"
    var="example_messages"/>
    <h:panelGroup id="body">

    @@ -60,10 +63,9 @@ managed beans used:

    </h:panelGroup>

    -</f:view>

    <%@include file="inc/page_footer.jsp" %>
    -
    +</div>
    </body>
    -
    +</f:view>
    </html>

    Added:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/.classpath
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/.classpath?rev=1039499&view=auto

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/.classpath
    (added)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/.classpath
    Fri Nov 26 18:35:04 2010
    @@ -0,0 +1,48 @@
    +<classpath>
    + <classpathentry kind="src" path="src/main/java"/>
    + <classpathentry kind="src" path="src/main/resources"
    excluding="**/*.java"/>
    + <classpathentry kind="src"
    path="target/maven-shared-archive-resources" excluding="**/*.java"/>
    + <classpathentry kind="output" path="target/classes"/>
    + <classpathentry kind="var"
    path="M2_REPO/javax/servlet/jstl/1.1.0/jstl-1.1.0.jar"/>
    + <classpathentry kind="var"
    path="M2_REPO/javax/servlet/servlet-api/2.3/servlet-api-2.3.jar"
    sourcepath="M2_REPO/javax/servlet/servlet-api/2.3/servlet-api-2.3-sources.jar"/>
    + <classpathentry kind="var"
    path="M2_REPO/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar"
    sourcepath="M2_REPO/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0-sources.jar">
    + <attributes>
    + <attribute
    value="jar:file:/C:/Documents%20and%20Settings/lu4242/.m2/repository/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0-javadoc.jar!/"
    name="javadoc_location"/>
    + </attributes>
    + </classpathentry>
    + <classpathentry kind="var"
    path="M2_REPO/commons-codec/commons-codec/1.3/commons-codec-1.3.jar"
    sourcepath="M2_REPO/commons-codec/commons-codec/1.3/commons-codec-1.3-sources.jar">
    + <attributes>
    + <attribute
    value="jar:file:/C:/Documents%20and%20Settings/lu4242/.m2/repository/commons-codec/commons-codec/1.3/commons-codec-1.3-javadoc.jar!/"
    name="javadoc_location"/>
    + </attributes>
    + </classpathentry>
    + <classpathentry kind="var"
    path="M2_REPO/commons-collections/commons-collections/3.1/commons-collections-3.1.jar"
    sourcepath="M2_REPO/commons-collections/commons-collections/3.1/commons-collections-3.1-sources.jar"/>
    + <classpathentry kind="var"
    path="M2_REPO/commons-digester/commons-digester/1.8/commons-digester-1.8.jar"
    sourcepath="M2_REPO/commons-digester/commons-digester/1.8/commons-digester-1.8-sources.jar"/>
    + <classpathentry kind="var"
    path="M2_REPO/commons-el/commons-el/1.0/commons-el-1.0.jar"
    sourcepath="M2_REPO/commons-el/commons-el/1.0/commons-el-1.0-sources.jar"/>
    + <classpathentry kind="var"
    path="M2_REPO/commons-lang/commons-lang/2.1/commons-lang-2.1.jar"
    sourcepath="M2_REPO/commons-lang/commons-lang/2.1/commons-lang-2.1-sources.jar"/>
    + <classpathentry kind="var"
    path="M2_REPO/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar"
    sourcepath="M2_REPO/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4-sources.jar">
    + <attributes>
    + <attribute
    value="jar:file:/C:/Documents%20and%20Settings/lu4242/.m2/repository/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4-javadoc.jar!/"
    name="javadoc_location"/>
    + </attributes>
    + </classpathentry>
    + <classpathentry kind="var"
    path="M2_REPO/commons-validator/commons-validator/1.3.1/commons-validator-1.3.1.jar"
    sourcepath="M2_REPO/commons-validator/commons-validator/1.3.1/commons-validator-1.3.1-sources.jar"/>
    + <classpathentry kind="var"
    path="M2_REPO/com/lowagie/itext/1.4.8/itext-1.4.8.jar"
    sourcepath="M2_REPO/com/lowagie/itext/1.4.8/itext-1.4.8-sources.jar"/>
    + <classpathentry kind="var"
    path="M2_REPO/com/sun/facelets/jsf-facelets/1.1.14/jsf-facelets-1.1.14.jar"
    sourcepath="M2_REPO/com/sun/facelets/jsf-facelets/1.1.14/jsf-facelets-1.1.14-sources.jar">
    + <attributes>
    + <attribute
    value="jar:file:/C:/Documents%20and%20Settings/lu4242/.m2/repository/com/sun/facelets/jsf-facelets/1.1.14/jsf-facelets-1.1.14-javadoc.jar!/"
    name="javadoc_location"/>
    + </attributes>
    + </classpathentry>
    + <classpathentry kind="var"
    path="M2_REPO/junit/junit/4.4/junit-4.4.jar"
    sourcepath="M2_REPO/junit/junit/4.4/junit-4.4-sources.jar">
    + <attributes>
    + <attribute
    value="jar:file:/C:/Documents%20and%20Settings/lu4242/.m2/repository/junit/junit/4.4/junit-4.4-javadoc.jar!/"
    name="javadoc_location"/>
    + </attributes>
    + </classpathentry>
    + <classpathentry kind="var"
    path="M2_REPO/org/apache/myfaces/core/myfaces-api/1.1.8/myfaces-api-1.1.8.jar"/>
    + <classpathentry kind="src" path="/myfaces-commons-utils11"/>
    + <classpathentry kind="src" path="/myfaces-components11"/>
    + <classpathentry kind="src" path="/myfaces-converters11"/>
    + <classpathentry kind="var"
    path="M2_REPO/org/apache/myfaces/core/myfaces-impl/1.1.8/myfaces-impl-1.1.8.jar"/>
    + <classpathentry kind="src" path="/myfaces-validators11"/>
    + <classpathentry kind="var" path="M2_REPO/oro/oro/2.0.8/oro-2.0.8.jar"
    sourcepath="M2_REPO/oro/oro/2.0.8/oro-2.0.8-sources.jar"/>
    + <classpathentry kind="var"
    path="M2_REPO/poi/poi/2.5.1-final-20040804/poi-2.5.1-final-20040804.jar"
    sourcepath="M2_REPO/poi/poi/2.5.1-final-20040804/poi-2.5.1-final-20040804-sources.jar"/>
    + <classpathentry kind="con"
    path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
    +</classpath>
    \ No newline at end of file

    Added:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/.project
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/.project?rev=1039499&view=auto

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/.project
    (added)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/.project
    Fri Nov 26 18:35:04 2010
    @@ -0,0 +1,20 @@
    +<projectDescription>
    + <name>myfaces-commons-facelets-examples11</name>
    + <comment>The MyFaces project is home of the first free open source
    JavaServer Faces
    + implementation as well as some useful JSF component libraries and other
    + convenient JSF stuff.</comment>
    + <projects>
    + <project>myfaces-commons-utils11</project>
    + <project>myfaces-components11</project>
    + <project>myfaces-converters11</project>
    + <project>myfaces-validators11</project>
    + </projects>
    + <buildSpec>
    + <buildCommand>
    + <name>org.eclipse.jdt.core.javabuilder</name>
    + </buildCommand>
    + </buildSpec>
    + <natures>
    + <nature>org.eclipse.jdt.core.javanature</nature>
    + </natures>
    +</projectDescription>
    \ No newline at end of file

    Added:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/.settings/org.eclipse.jdt.core.prefs
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/.settings/org.eclipse.jdt.core.prefs?rev=1039499&view=auto

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/.settings/org.eclipse.jdt.core.prefs
    (added)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/.settings/org.eclipse.jdt.core.prefs
    Fri Nov 26 18:35:04 2010
    @@ -0,0 +1,5 @@
    +#Thu Nov 25 18:36:07 COT 2010
    +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
    +eclipse.preferences.version=1
    +org.eclipse.jdt.core.compiler.source=1.5
    +org.eclipse.jdt.core.compiler.compliance=1.5



    --
    Jakob Korherr

    blog: http://www.jakobk.com
    twitter: http://twitter.com/jakobkorherr
    work: http://www.irian.at
  • Jakob Korherr at Nov 26, 2010 at 6:48 pm
    Great, thanks :)

    2010/11/26 Leonardo Uribe <lu4242@gmail.com>:
    Hi Jakob

    I already reverted it and added svn:ignore properties. Thanks for notice it.

    regards,

    Leonardo

    2010/11/26 Jakob Korherr <jakob.korherr@gmail.com>
    Hi Leo,

    I noticed that you committed eclipse files:

    -
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/.classpath
    -
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/.project
    -
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/.settings/
    -
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/.settings/org.eclipse.jdt.core.prefs

    Please remove them and add an apropriate svn:ignore entry. Thanks!

    Regards,
    Jakob

    2010/11/26  <lu4242@apache.org>:
    Author: lu4242
    Date: Fri Nov 26 18:35:04 2010
    New Revision: 1039499

    URL: http://svn.apache.org/viewvc?rev=1039499&view=rev
    Log:
    add facelets example to jsf_11 branch

    Added:

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/BooleanBean.java

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/DateTimeBean.java

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/NumberBean.java

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/accessedbeans/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/accessedbeans/AccessTrackingVariableResolver.java

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/accessedbeans/AccessedBeans.java

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateCreditCard.java

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertBoolean.jsp

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertDateTime.jsp

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertNumber.jsp

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/creditcardvalidator.jsp

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/outputClientId.jsp

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/.classpath

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/.project

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/.settings/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/.settings/org.eclipse.jdt.core.prefs

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/LICENSE.txt

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/NOTICE.txt

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/pom.xml

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/BooleanBean.java

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/DataFieldHolder.java

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/DateTimeBean.java

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/NumberBean.java

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/accessedbeans/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/accessedbeans/AccessTrackingVariableResolver.java

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/accessedbeans/AccessedBeans.java

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/validate/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/validate/EducationLevel.java

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateCreditCard.java

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateEnum.java

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateForm.java

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/exporter/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/exporter/ExporterBean.java

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/exporter/SimpleCar.java

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/renderone/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/renderone/RenderOneBean.java

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/servlet/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/servlet/SourceCodeServlet.java

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/resources/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/resources/org/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/resources/org/apache/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/resources/org/apache/myfaces/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/resources/org/apache/myfaces/examples/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/resources/org/apache/myfaces/examples/resource/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/resources/org/apache/myfaces/examples/resource/example_messages.properties

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/META-INF/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/META-INF/templates/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/META-INF/templates/footer.xhtml

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/META-INF/templates/mbean_source.xhtml

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/META-INF/templates/template.xhtml

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/WEB-INF/
    (with props)

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/WEB-INF/faces-config.xml

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/WEB-INF/web.xml

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/convertBoolean.xhtml

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/convertDateTime.xhtml

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/convertEnum.xhtml

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/convertNumber.xhtml

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/creditcardvalidator.xhtml

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/css/

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/css/basic.css

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/exporter.xhtml

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/home.xhtml

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/index.html

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/outputClientId.xhtml

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/renderOne.xhtml

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/validate.xhtml

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/validateCSV.xhtml

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/validateCompareTo.xhtml

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/validateUrl.xhtml
    myfaces/commons/branches/jsf_11/examples/pom.xml
    Modified:

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/pom.xml

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/EducationLevel.java

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateEnum.java

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateForm.java

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/resources/org/apache/myfaces/examples/resource/example_messages.properties

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/WEB-INF/faces-config.xml

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/WEB-INF/web.xml

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertEnum.jsp

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/css/basic.css

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/exporter.jsp

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/home.jsp

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/inc/page_footer.jsp

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/renderOne.jsp

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/validate.jsp

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/validateCSV.jsp

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/validateCompareTo.jsp

    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/validateUrl.jsp

    Modified:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/pom.xml
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/pom.xml?rev=1039499&r1=1039498&r2=1039499&view=diff

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/pom.xml
    (original)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/pom.xml
    Fri Nov 26 18:35:04 2010
    @@ -30,6 +30,15 @@
    <url>http://myfaces.apache.org</url>
    <build>
    <finalName>myfaces-commons-examples11</finalName>
    +        <resources>
    +            <resource>
    +                <directory>src/main/resources</directory>
    +                <filtering>true</filtering>
    +            </resource>
    +            <resource>
    +                <directory>src/main/java</directory>
    +            </resource>
    +        </resources>
    <plugins>
    <plugin>
    <groupId>org.mortbay.jetty</groupId>
    @@ -93,10 +102,16 @@
    <version>${project.version}</version>
    </dependency>
    <dependency>
    +             <groupId>com.lowagie</groupId>
    +             <artifactId>itext</artifactId>
    +        </dependency>
    +        <dependency>
    +            <groupId>poi</groupId>
    +            <artifactId>poi</artifactId>
    +        </dependency>
    +        <dependency>
    <groupId>junit</groupId>
    <artifactId>junit</artifactId>
    -            <version>4.0</version>
    -            <scope>test</scope>
    </dependency>
    </dependencies>
    -</project>
    +</project>
    \ No newline at end of file

    Added:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/BooleanBean.java
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/BooleanBean.java?rev=1039499&view=auto

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/BooleanBean.java
    (added)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/BooleanBean.java
    Fri Nov 26 18:35:04 2010
    @@ -0,0 +1,45 @@
    +/*
    + * 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.commons.examples;
    +
    +
    +public class BooleanBean
    +{
    +    private boolean way;
    +
    +    public BooleanBean()
    +    {
    +    }
    +
    +    public boolean getWay()
    +    {
    +        return way;
    +    }
    +
    +    public void setWay(boolean way)
    +    {
    +        this.way = way;
    +    }
    +
    +    public String submit()
    +    {
    +        System.out.println("Action was called.");
    +        return ("valid");
    +    }
    +}

    Added:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/DateTimeBean.java
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/DateTimeBean.java?rev=1039499&view=auto

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/DateTimeBean.java
    (added)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/DateTimeBean.java
    Fri Nov 26 18:35:04 2010
    @@ -0,0 +1,102 @@
    +/*
    + * 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.commons.examples;
    +
    +import java.util.Date;
    +
    +import javax.faces.component.UISelectOne;
    +import javax.faces.context.FacesContext;
    +
    +public class DateTimeBean
    +{
    +    private String type;
    +
    +    private Date date1;
    +
    +    private Date date2;
    +
    +    private UISelectOne typeSelect;
    +
    +    public DateTimeBean()
    +    {
    +        date1 = new Date();
    +        type = "both";
    +    }
    +
    +    public String getType()
    +    {
    +        return type;
    +    }
    +
    +    public void setType(String type)
    +    {
    +        this.type = type;
    +    }
    +
    +    public Date getDate1()
    +    {
    +        return date1;
    +    }
    +
    +    public void setDate1(Date date1)
    +    {
    +        this.date1 = date1;
    +    }
    +
    +    public Date getDate2()
    +    {
    +        return date2;
    +    }
    +
    +    public void setDate2(Date date2)
    +    {
    +        this.date2 = date2;
    +    }
    +
    +    public String[] getInvalidMonths()
    +    {
    +        return new String[]{"jan", "apr", "sep"};
    +    }
    +
    +    public String submit()
    +    {
    +        System.out.println("Action was called.");
    +        return ("valid");
    +    }
    +
    +    public String getTypeFromSelect()
    +    {
    +        Object value = typeSelect.getValue();
    +        if (value != null)
    +        {
    +            return value.toString();
    +        }
    +        return null;
    +    }
    +
    +    public UISelectOne getTypeSelect()
    +    {
    +        return typeSelect;
    +    }
    +
    +    public void setTypeSelect(UISelectOne typeSelect)
    +    {
    +        this.typeSelect = typeSelect;
    +    }
    +}

    Added:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/NumberBean.java
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/NumberBean.java?rev=1039499&view=auto

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/NumberBean.java
    (added)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/NumberBean.java
    Fri Nov 26 18:35:04 2010
    @@ -0,0 +1,86 @@
    +/*
    + * 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.commons.examples;
    +
    +import java.util.HashMap;
    +import java.util.Map;
    +
    +import javax.faces.component.UISelectOne;
    +
    +public class NumberBean
    +{
    +    private String type;
    +
    +    private Map<String, Double> numberMap;
    +
    +    private UISelectOne typeSelect;
    +
    +    public NumberBean()
    +    {
    +        numberMap = new HashMap<String, Double>();
    +        numberMap.put("number1", 0.5d);
    +        type = "percent";
    +    }
    +
    +    public Map<String, Double> getNumberMap()
    +    {
    +        return numberMap;
    +    }
    +
    +    public void setNumberMap(Map<String, Double> numberMap)
    +    {
    +        this.numberMap = numberMap;
    +    }
    +
    +    public String getType()
    +    {
    +        return type;
    +    }
    +
    +    public void setType(String type)
    +    {
    +        this.type = type;
    +    }
    +
    +    public String submit()
    +    {
    +        System.out.println("Action was called.");
    +        return ("valid");
    +    }
    +
    +    public String getTypeFromSelect()
    +    {
    +        Object value = typeSelect.getValue();
    +        if (value != null)
    +        {
    +            return value.toString();
    +        }
    +        return null;
    +    }
    +
    +    public UISelectOne getTypeSelect()
    +    {
    +        return typeSelect;
    +    }
    +
    +    public void setTypeSelect(UISelectOne typeSelect)
    +    {
    +        this.typeSelect = typeSelect;
    +    }
    +}

    Added:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/accessedbeans/AccessTrackingVariableResolver.java
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/accessedbeans/AccessTrackingVariableResolver.java?rev=1039499&view=auto

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/accessedbeans/AccessTrackingVariableResolver.java
    (added)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/accessedbeans/AccessTrackingVariableResolver.java
    Fri Nov 26 18:35:04 2010
    @@ -0,0 +1,60 @@
    +/*
    + * 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.commons.examples.accessedbeans;
    +
    +import java.util.Map;
    +
    +import javax.faces.context.FacesContext;
    +import javax.faces.el.EvaluationException;
    +import javax.faces.el.VariableResolver;
    +
    +/**
    + * @author Martin Marinschek (latest modification by $Author: matzew $)
    + * @version $Revision: 167718 $ $Date: 2005-03-24 17:47:11 +0100 (Do,
    24 Mär 2005) $
    + */
    +public class AccessTrackingVariableResolver extends VariableResolver
    +{
    +    private VariableResolver delegate;
    +
    +    /**Implementing delegate-pattern
    +     *
    +     * @param delegate Delegating to this instance.
    +     */
    +    public AccessTrackingVariableResolver(VariableResolver delegate)
    +    {
    +        this.delegate = delegate;
    +    }
    +
    +    // METHODS
    +    public Object resolveVariable(FacesContext facesContext, String
    name) throws EvaluationException
    +    {
    +        Object resolvedBean = delegate.resolveVariable(facesContext,
    name);
    +
    +        if(!(resolvedBean instanceof AccessedBeans) &&
    resolvedBean!=null)
    +        {
    +
    if(!resolvedBean.getClass().getName().startsWith("java.lang.") &&
    !(resolvedBean instanceof Map))
    +            {
    +                ((AccessedBeans) facesContext.getApplication().
    +
    getVariableResolver().resolveVariable(facesContext,"accessedBeans")).addBean(name,
    resolvedBean);
    +            }
    +        }
    +
    +        return resolvedBean;
    +    }
    +}

    Added:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/accessedbeans/AccessedBeans.java
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/accessedbeans/AccessedBeans.java?rev=1039499&view=auto

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/accessedbeans/AccessedBeans.java
    (added)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/accessedbeans/AccessedBeans.java
    Fri Nov 26 18:35:04 2010
    @@ -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.commons.examples.accessedbeans;
    +
    +import java.util.ArrayList;
    +import java.util.List;
    +
    +/**
    + * @author Martin Marinschek (latest modification by $Author: matzew $)
    + * @version $Revision: 167718 $ $Date: 2005-03-24 17:47:11 +0100 (Do,
    24 Mär 2005) $
    + */
    +public class AccessedBeans
    +{
    +    private List beanList;
    +
    +    public List getBeanList()
    +    {
    +        if(beanList == null)
    +            beanList = new ArrayList();
    +
    +        return beanList;
    +    }
    +
    +    public void setBeanList(List beanList)
    +    {
    +        this.beanList = beanList;
    +    }
    +
    +    public void addBean(String name, Object resolvedBean)
    +    {
    +        List li = getBeanList();
    +
    +        for (int i = 0; i < li.size(); i++)
    +        {
    +            AccessedBean accessedBean = (AccessedBean) li.get(i);
    +            if(accessedBean.getName().equals(name))
    +                return;
    +        }
    +
    +        AccessedBean bean = new AccessedBean();
    +        bean.setName(name);
    +        bean.setClazz(resolvedBean.getClass().getName());
    +
    +        li.add(bean);
    +    }
    +
    +    public static class AccessedBean
    +    {
    +        private String name;
    +        private String clazz;
    +
    +        public String getName()
    +        {
    +            return name;
    +        }
    +
    +        public void setName(String name)
    +        {
    +            this.name = name;
    +        }
    +
    +        public String getClazz()
    +        {
    +            return clazz;
    +        }
    +
    +        public void setClazz(String clazz)
    +        {
    +            this.clazz = clazz;
    +        }
    +    }
    +}

    Modified:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/EducationLevel.java
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/EducationLevel.java?rev=1039499&r1=1039498&r2=1039499&view=diff

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/EducationLevel.java
    (original)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/EducationLevel.java
    Fri Nov 26 18:35:04 2010
    @@ -26,4 +26,4 @@ public enum EducationLevel
    UNIVERSITY,
    MASTER,
    DOCTOR
    -}
    +}
    \ No newline at end of file

    Added:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateCreditCard.java
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateCreditCard.java?rev=1039499&view=auto

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateCreditCard.java
    (added)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateCreditCard.java
    Fri Nov 26 18:35:04 2010
    @@ -0,0 +1,119 @@
    +/*
    + * 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.commons.examples.validate;
    +
    +import java.util.ArrayList;
    +import java.util.List;
    +
    +import javax.faces.application.FacesMessage;
    +import javax.faces.component.UISelectOne;
    +import javax.faces.context.FacesContext;
    +import javax.faces.model.SelectItem;
    +
    +/**
    + * @author mwessendorf
    + * @version $Revision: 673801 $ $Date: 2008-07-03 22:58:48 +0200 (Thu,
    03 Jul 2008) $
    + */
    +public class ValidateCreditCard {
    +
    +    private String creditCardNumber = null;
    +
    +    private String creditCardType = "MASTERCARD";
    +
    +    private List<SelectItem> types = null;
    +
    +    private UISelectOne creditCardTypeSelect;
    +
    +    public List<SelectItem> getCreditCardTypes()
    +    {
    +        if (types == null)
    +        {
    +            types = new ArrayList<SelectItem>();
    +            types.add(new SelectItem("MASTERCARD"));
    +            types.add(new SelectItem("VISA"));
    +            types.add(new SelectItem("DISCOVER"));
    +            types.add(new SelectItem("AMEX"));
    +        }
    +        return types;
    +    }
    +
    +    public String submit(){
    +        System.out.println("Action was called.");
    +        FacesContext.getCurrentInstance().addMessage(null, new
    FacesMessage("The selected credit card type/number is valid"));
    +        return ("valid");
    +    }
    +
    +    public String getCreditCardNumber() {
    +        return creditCardNumber;
    +    }
    +
    +    public void setCreditCardNumber(String string) {
    +        creditCardNumber = string;
    +    }
    +
    +    public String getCreditCardType()
    +    {
    +        return creditCardType;
    +    }
    +
    +    public void setCreditCardType(String creditCardType)
    +    {
    +        this.creditCardType = creditCardType;
    +    }
    +
    +    public boolean isAmex()
    +    {
    +        return "AMEX".equalsIgnoreCase(creditCardType);
    +    }
    +
    +    public boolean isVisa()
    +    {
    +        return "VISA".equalsIgnoreCase(creditCardType);
    +    }
    +
    +    public boolean isMastercard()
    +    {
    +        return "MASTERCARD".equalsIgnoreCase(creditCardType);
    +    }
    +
    +    public boolean isDiscover()
    +    {
    +        return "DISCOVER".equalsIgnoreCase(creditCardType);
    +    }
    +
    +    public UISelectOne getCreditCardTypeSelect()
    +    {
    +        return creditCardTypeSelect;
    +    }
    +
    +    public void setCreditCardTypeSelect(UISelectOne
    creditCardTypeSelect)
    +    {
    +        this.creditCardTypeSelect = creditCardTypeSelect;
    +    }
    +
    +    public String getCreditCardTypeFromSelect()
    +    {
    +        Object value = creditCardTypeSelect.getValue();
    +        if (value != null)
    +        {
    +            return value.toString();
    +        }
    +        return null;
    +    }
    +}

    Modified:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateEnum.java
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateEnum.java?rev=1039499&r1=1039498&r2=1039499&view=diff

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateEnum.java
    (original)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateEnum.java
    Fri Nov 26 18:35:04 2010
    @@ -18,6 +18,9 @@
    */
    package org.apache.myfaces.commons.examples.validate;

    +import javax.faces.application.FacesMessage;
    +import javax.faces.context.FacesContext;
    +
    public class ValidateEnum
    {

    @@ -33,4 +36,9 @@ public class ValidateEnum
    this.level = level;
    }

    +    public String submit(){
    +        System.out.println("Action was called.");
    +        FacesContext.getCurrentInstance().addMessage(null, new
    FacesMessage("The selected value is valid"));
    +        return ("valid");
    +    }
    }

    Modified:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateForm.java
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateForm.java?rev=1039499&r1=1039498&r2=1039499&view=diff

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateForm.java
    (original)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateForm.java
    Fri Nov 26 18:35:04 2010
    @@ -20,7 +20,7 @@ package org.apache.myfaces.commons.examp

    /**
    * @author mwessendorf
    - * @version $Revision: 684334 $ $Date: 2008-08-09 15:28:18 -0500 (Sáb,
    09 Ago 2008) $
    + * @version $Revision: 673801 $ $Date: 2008-07-03 15:58:48 -0500 (Jue,
    03 Jul 2008) $
    */
    public class ValidateForm {


    Modified:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/resources/org/apache/myfaces/examples/resource/example_messages.properties
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/resources/org/apache/myfaces/examples/resource/example_messages.properties?rev=1039499&r1=1039498&r2=1039499&view=diff

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/resources/org/apache/myfaces/examples/resource/example_messages.properties
    (original)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/resources/org/apache/myfaces/examples/resource/example_messages.properties
    Fri Nov 26 18:35:04 2010
    @@ -1,6 +1,8 @@
    button_submit = Submit
    email_comma = Email separated by ,
    credit_dot = Credit Card separated by .
    +credit_number = Insert a credit card number
    +credit_type = Please select one card type
    url_comma = Url separated by ,
    isbn_semicolon = ISBN separated by ;
    validate_email = Email
    @@ -16,3 +18,4 @@ validate_greaterthan = Validate Greater
    validate_greaterthanequal = Validate Greater Than Equal
    validate_lessthan = Validate Less Than
    validate_lessthanequal =Validate Less Than Equal
    +title=Myfaces Commons Example

    Modified:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/WEB-INF/faces-config.xml
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/WEB-INF/faces-config.xml?rev=1039499&r1=1039498&r2=1039499&view=diff

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/WEB-INF/faces-config.xml
    (original)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/WEB-INF/faces-config.xml
    Fri Nov 26 18:35:04 2010
    @@ -4,6 +4,17 @@
    "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
    <faces-config>

    +  <!-- from project setup -->
    +  <application>
    +
    <variable-resolver>org.apache.myfaces.commons.examples.accessedbeans.AccessTrackingVariableResolver</variable-resolver>
    +  </application>
    +
    +    <!-- Accessed beans on the last request -->
    +    <managed-bean>
    +        <managed-bean-name>accessedBeans</managed-bean-name>
    +
    <managed-bean-class>org.apache.myfaces.commons.examples.accessedbeans.AccessedBeans</managed-bean-class>
    +        <managed-bean-scope>request</managed-bean-scope>
    +    </managed-bean>
    <managed-bean>
    <managed-bean-name>dataFieldHolder</managed-bean-name>

    <managed-bean-class>org.apache.myfaces.commons.examples.DataFieldHolder</managed-bean-class>
    @@ -30,4 +41,28 @@

    <managed-bean-class>org.apache.myfaces.commons.renderone.RenderOneBean</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    +    <managed-bean>
    +        <managed-bean-name>validateCreditCard</managed-bean-name>
    +
    <managed-bean-class>org.apache.myfaces.commons.examples.validate.ValidateCreditCard</managed-bean-class>
    +        <managed-bean-scope>request</managed-bean-scope>
    +    </managed-bean>
    +
    +    <managed-bean>
    +        <managed-bean-name>dateTimeBean</managed-bean-name>
    +
    <managed-bean-class>org.apache.myfaces.commons.examples.DateTimeBean</managed-bean-class>
    +        <managed-bean-scope>request</managed-bean-scope>
    +    </managed-bean>
    +
    +    <managed-bean>
    +        <managed-bean-name>numberBean</managed-bean-name>
    +
    <managed-bean-class>org.apache.myfaces.commons.examples.NumberBean</managed-bean-class>
    +        <managed-bean-scope>request</managed-bean-scope>
    +    </managed-bean>
    +
    +    <managed-bean>
    +        <managed-bean-name>booleanBean</managed-bean-name>
    +
    <managed-bean-class>org.apache.myfaces.commons.examples.BooleanBean</managed-bean-class>
    +        <managed-bean-scope>request</managed-bean-scope>
    +    </managed-bean>
    +
    </faces-config>

    Modified:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/WEB-INF/web.xml
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/WEB-INF/web.xml?rev=1039499&r1=1039498&r2=1039499&view=diff

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/WEB-INF/web.xml
    (original)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/WEB-INF/web.xml
    Fri Nov 26 18:35:04 2010
    @@ -130,16 +130,17 @@
    <load-on-startup>1</load-on-startup>
    </servlet>

    -    <servlet>
    -        <servlet-name>SourceCodeServlet</servlet-name>
    -
    <servlet-class>org.apache.myfaces.commons.servlet.SourceCodeServlet</servlet-class>
    -    </servlet>

    <!-- Faces Servlet Mapping -->
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>
    +
    +    <servlet>
    +        <servlet-name>SourceCodeServlet</servlet-name>
    +
    <servlet-class>org.apache.myfaces.commons.servlet.SourceCodeServlet</servlet-class>
    +    </servlet>

    <servlet-mapping>
    <servlet-name>SourceCodeServlet</servlet-name>

    Added:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertBoolean.jsp
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertBoolean.jsp?rev=1039499&view=auto

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertBoolean.jsp
    (added)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertBoolean.jsp
    Fri Nov 26 18:35:04 2010
    @@ -0,0 +1,76 @@
    +<%@ page session="false" contentType="text/html;charset=utf-8"%>
    +<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    +<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    +<%@ taglib uri="http://myfaces.apache.org/commons/converters"
    +    prefix="mcc"%>
    +<%@ taglib uri="http://myfaces.apache.org/commons/components"
    +    prefix="mc"%>
    +<%@ taglib uri="http://myfaces.apache.org/commons/validators"
    +    prefix="mcv"%>
    +
    +<html>
    +<f:view>
    +
    +<%@include file="inc/head.inc"%>
    +
    +<!--
    +/*
    + * 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.
    + */
    +//-->
    +
    +<body>
    +<div id="container">
    +    <f:loadBundle
    +
    basename="org.apache.myfaces.examples.resource.example_messages"
    +        var="example_messages" />
    +
    +   <h1><h:outputText value="#{example_messages['title']}"/></h1>
    +   <br/>
    +       <h:panelGroup id="body">
    +        <p>This example check how mcc:convertBoolean works. This
    converter
    +        translates between boolean values (true/false)
    +        and alternate versions of those boolean values like
    +        (yes/no), (1/0), and (way/no way).</p>
    +               <h:form id="form1">
    +                   <h:messages showDetail="false" showSummary="true"
    </h:messages>
    +            <p>Current value: <h:outputText
    value="#{booleanBean.way}"/></p>
    +                       <h:panelGrid columns="3">
    +
    +                               <h:outputLabel for="boolVal" value="" />
    +                               <h:inputText id="boolVal"
    value="#{booleanBean.way}" required="true">
    +                                       <mcc:convertBoolean
    trueValue="way" falseValue="no way" />
    +                               </h:inputText>
    +                               <h:message for="boolVal"
    styleClass="error" />
    +
    +                               <h:panelGroup />
    +                               <h:commandButton id="validateButton"
    +
    value="#{example_messages['button_submit']}"
    +                                       action="#{booleanBean.submit}"
    />
    +                               <h:panelGroup />
    +
    +                       </h:panelGrid>
    +               </h:form>
    +
    +       </h:panelGroup>
    +<%@include file="inc/page_footer.jsp"%>
    +</div>
    +</body>
    +
    +</f:view>
    +</html>
    \ No newline at end of file

    Added:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertDateTime.jsp
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertDateTime.jsp?rev=1039499&view=auto

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertDateTime.jsp
    (added)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertDateTime.jsp
    Fri Nov 26 18:35:04 2010
    @@ -0,0 +1,86 @@
    +<%@ page session="false" contentType="text/html;charset=utf-8"%>
    +<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    +<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    +<%@ taglib uri="http://myfaces.apache.org/commons/converters"
    +    prefix="mcc"%>
    +<%@ taglib uri="http://myfaces.apache.org/commons/components"
    +    prefix="mc"%>
    +<%@ taglib uri="http://myfaces.apache.org/commons/validators"
    +    prefix="mcv"%>
    +
    +<html>
    +<f:view>
    +
    +<%@include file="inc/head.inc"%>
    +
    +<!--
    +/*
    + * 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.
    + */
    +//-->
    +
    +<body>
    +<div id="container">
    +    <f:loadBundle
    +
    basename="org.apache.myfaces.examples.resource.example_messages"
    +        var="example_messages" />
    +
    +   <h1><h:outputText value="#{example_messages['title']}"/></h1>
    +   <br/>
    +       <h:panelGroup id="body">
    +        <p>This example shows how mcc:convertDateTime component works.
    It works almost
    +        the same as f:convertDateTime, but it has as TimeZone default
    +        TimeZone.getDefault() instead GMT and it evaluate EL
    expressions when the value
    +        is being validated instead when the converter is built. </p>
    +        <p>Current Locale: <h:outputText
    value="#{facesContext.viewRoot.locale}"/></p>
    +               <h:form id="form1">
    +                   <h:messages showDetail="false" showSummary="true"
    </h:messages>
    +                       <h:panelGrid columns="3">
    +
    +                <h:outputLabel for="type"
    +                    value="Insert a type" />
    +                <h:selectOneMenu id="type" immediate="true"
    value="#{dateTimeBean.type}" binding="#{dateTimeBean.typeSelect}" >
    +                    <f:selectItem itemLabel="date" itemValue="date"/>
    +                    <f:selectItem itemLabel="time" itemValue="time"/>
    +                    <f:selectItem itemLabel="both" itemValue="both"/>
    +                </h:selectOneMenu>
    +                <h:message for="type" styleClass="error" />
    +
    +                               <h:outputLabel for="date1"
    +                                       value="Insert a date/time" />
    +                               <h:inputText id="date1"
    value="#{dateTimeBean.date1}" required="true">
    +                   <mcc:convertDateTime
    type="#{dateTimeBean.typeFromSelect}"/>
    +                               </h:inputText>
    +                               <h:message for="date1"
    styleClass="error" />
    +
    +                               <h:panelGroup />
    +                               <h:commandButton id="validateButton"
    +
    value="#{example_messages['button_submit']}"
    +                                       action="#{dateTimeBean.submit}"
    />
    +                               <h:panelGroup />
    +
    +                       </h:panelGrid>
    +               </h:form>
    +
    +       </h:panelGroup>
    +<%@include file="inc/page_footer.jsp"%>
    +</div>
    +</body>
    +
    +</f:view>
    +</html>
    \ No newline at end of file

    Modified:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertEnum.jsp
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertEnum.jsp?rev=1039499&r1=1039498&r2=1039499&view=diff

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertEnum.jsp
    (original)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertEnum.jsp
    Fri Nov 26 18:35:04 2010
    @@ -3,10 +3,13 @@
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://myfaces.apache.org/commons/converters"
    prefix="mcc"%>
    +<%@ taglib uri="http://myfaces.apache.org/commons/components"
    +    prefix="mc"%>
    <%@ taglib uri="http://myfaces.apache.org/commons/validators"
    prefix="mcv"%>

    <html>
    +<f:view>

    <%@include file="inc/head.inc"%>

    @@ -32,17 +35,18 @@
    //-->

    <body>
    +<div id="container">
    +    <f:loadBundle
    +
    basename="org.apache.myfaces.examples.resource.example_messages"
    +        var="example_messages" />

    +   <h1><h:outputText value="#{example_messages['title']}"/></h1>
    +   <br/>
    <!--
    managed beans used:
    validateForm
    -->

    -<f:view>
    -
    -       <f:loadBundle
    -
    basename="org.apache.myfaces.examples.resource.example_messages"
    -               var="example_messages" />

    <h:panelGroup id="body">

    @@ -54,7 +58,7 @@ managed beans used:

    value="#{example_messages['validate_enum']}" />
    <h:inputText id="enum"
    value="#{validateEnum.level}" required="true">
    <mcc:convertEnum
    -
    targetClass="org.apache.myfaces.examples.validate.EducationLevel" />
    +
    targetClass="org.apache.myfaces.commons.examples.validate.EducationLevel" />
    </h:inputText>
    <h:message id="enumError" for="enum"
    styleClass="error" />

    @@ -69,10 +73,10 @@ managed beans used:

    </h:panelGroup>

    -</f:view>

    <%@include file="inc/page_footer.jsp"%>
    -
    +</div>
    </body>

    +</f:view>
    </html>

    Added:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertNumber.jsp
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertNumber.jsp?rev=1039499&view=auto

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertNumber.jsp
    (added)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/convertNumber.jsp
    Fri Nov 26 18:35:04 2010
    @@ -0,0 +1,87 @@
    +<%@ page session="false" contentType="text/html;charset=utf-8"%>
    +<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    +<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    +<%@ taglib uri="http://myfaces.apache.org/commons/converters"
    +    prefix="mcc"%>
    +<%@ taglib uri="http://myfaces.apache.org/commons/components"
    +    prefix="mc"%>
    +<%@ taglib uri="http://myfaces.apache.org/commons/validators"
    +    prefix="mcv"%>
    +
    +<html>
    +<f:view>
    +
    +<%@include file="inc/head.inc"%>
    +
    +<!--
    +/*
    + * 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.
    + */
    +//-->
    +
    +<body>
    +<div id="container">
    +    <f:loadBundle
    +
    basename="org.apache.myfaces.examples.resource.example_messages"
    +        var="example_messages" />
    +
    +   <h1><h:outputText value="#{example_messages['title']}"/></h1>
    +   <br/>
    +       <h:panelGroup id="body">
    +        <p>This example shows how mcc:convertNumber component works. It
    works almost
    +        the same as f:convertNumber, but it has "destType" attribute
    that define the
    +        target attribute to the backing bean property (useful when maps
    are used because
    +        ValueExpression.getType return null) and it evaluate EL
    expressions when the value
    +        is being validated instead when the converter is built. </p>
    +        <p>Current Locale: <h:outputText
    value="#{facesContext.viewRoot.locale}"/></p>
    +               <h:form id="form1">
    +                   <h:messages showDetail="false" showSummary="true"
    </h:messages>
    +                       <h:panelGrid columns="3">
    +
    +                <h:outputLabel for="type"
    +                    value="Insert a type" />
    +                <h:selectOneMenu id="type" immediate="true"
    value="#{numberBean.type}" binding="#{numberBean.typeSelect}" >
    +                    <f:selectItem itemLabel="number"
    itemValue="number"/>
    +                    <f:selectItem itemLabel="currency"
    itemValue="currency"/>
    +                    <f:selectItem itemLabel="percent"
    itemValue="percent"/>
    +                </h:selectOneMenu>
    +                <h:message for="type" styleClass="error" />
    +
    +                               <h:outputLabel for="number1"
    +                                       value="Insert a number" />
    +                               <h:inputText id="number1"
    value="#{numberBean.numberMap['number1']}" required="true">
    +                   <mcc:convertNumber destType="java.lang.Double"
    type="#{numberBean.typeFromSelect}"/>
    +                               </h:inputText>
    +                               <h:message for="number1"
    styleClass="error" />
    +
    +                               <h:panelGroup />
    +                               <h:commandButton id="validateButton"
    +
    value="#{example_messages['button_submit']}"
    +                                       action="#{numberBean.submit}" />
    +                               <h:panelGroup />
    +
    +                       </h:panelGrid>
    +               </h:form>
    +
    +       </h:panelGroup>
    +<%@include file="inc/page_footer.jsp"%>
    +</div>
    +</body>
    +
    +</f:view>
    +</html>
    \ No newline at end of file

    Added:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/creditcardvalidator.jsp
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/creditcardvalidator.jsp?rev=1039499&view=auto

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/creditcardvalidator.jsp
    (added)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/creditcardvalidator.jsp
    Fri Nov 26 18:35:04 2010
    @@ -0,0 +1,87 @@
    +<%@ page session="false" contentType="text/html;charset=utf-8"%>
    +<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    +<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    +<%@ taglib uri="http://myfaces.apache.org/commons/converters"
    +    prefix="mcc"%>
    +<%@ taglib uri="http://myfaces.apache.org/commons/components"
    +    prefix="mc"%>
    +<%@ taglib uri="http://myfaces.apache.org/commons/validators"
    +    prefix="mcv"%>
    +
    +<html>
    +<f:view>
    +
    +<%@include file="inc/head.inc"%>
    +
    +<!--
    +/*
    + * 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.
    + */
    +//-->
    +
    +<body>
    +<div id="container">
    +    <f:loadBundle
    +
    basename="org.apache.myfaces.examples.resource.example_messages"
    +        var="example_messages" />
    +
    +   <h1><h:outputText value="#{example_messages['title']}"/></h1>
    +   <br/>
    +        <h:messages showDetail="true" showSummary="false"/>
    +
    +        <h:form id="myform">
    +            <p>Some valid test numbers</p>
    +
    +            <ul>
    +              <li>Mastercard : 5555555555554444</li>
    +              <li>Mastercard : 5105105105105100</li>
    +              <li>Visa : 4111111111111111</li>
    +              <li>Visa : 4111111111111111</li>
    +              <li>Discover : 6011111111111117</li>
    +              <li>Discover : 6011000990139424</li>
    +              <li>American Express : 378282246310005</li>
    +              <li>American Express : 371449635398431</li>
    +            </ul>
    +
    +            <h:panelGrid columns ="3">
    +              <h:outputLabel for="creditCardType"
    value="#{example_messages['credit_type']}" />
    +              <h:selectOneRadio id="creditCardType"
    value="#{validateCreditCard.creditCardType}" immediate="true"
    binding="#{validateCreditCard.creditCardTypeSelect}">
    +                  <f:selectItems
    value="#{validateCreditCard.creditCardTypes}"/>
    +              </h:selectOneRadio>
    +              <h:message id="creditCardTypeError" for="creditCardType"
    styleClass="error" />
    +
    +              <h:outputLabel for="creditCardNumber"
    value="#{example_messages['credit_number']}" />
    +              <h:inputText id="creditCardNumber"
    value="#{validateCreditCard.creditCardNumber}" required="true">
    +                  <mcv:validateCreditCard
    +
    amex="#{validateCreditCard.creditCardTypeFromSelect == 'AMEX'}"
    +
    visa="#{validateCreditCard.creditCardTypeFromSelect == 'VISA'}"
    +
    discover="#{validateCreditCard.creditCardTypeFromSelect == 'DISCOVER'}"
    +
    mastercard="#{validateCreditCard.creditCardTypeFromSelect == 'MASTERCARD'}"
    />
    +              </h:inputText>
    +              <h:message id="creditCardNumberError"
    for="creditCardNumber" styleClass="error" />
    +            </h:panelGrid>
    +            <h:panelGroup/>
    +            <h:commandButton id="validateButton"
    value="#{example_messages['button_submit']}"
    action="#{validateCreditCard.submit}"/>
    +            <h:panelGroup/>
    +        </h:form>
    +<%@include file="inc/page_footer.jsp"%>
    +</div>
    +</body>
    +
    +</f:view>
    +</html>
    \ No newline at end of file

    Modified:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/css/basic.css
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/css/basic.css?rev=1039499&r1=1039498&r2=1039499&view=diff

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/css/basic.css
    (original)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/css/basic.css
    Fri Nov 26 18:35:04 2010
    @@ -1,8 +1,20 @@
    body {
    -       font-family : arial, verdana, Geneva, Arial, Helvetica,
    sans-serif;
    +    background-color: rgb(0, 35, 75);
    +    font-family : arial, verdana, Geneva, Arial, Helvetica, sans-serif;
    font-size : 12px;
    }

    +#container {
    +    margin: 10px auto;
    +    width: 900px;
    +    background-color: white;
    +    padding: 3px;
    +}
    +
    +h1 {
    +    font-size: 20px;
    +}
    +
    .standard {
    font-family : verdana, Geneva, Arial, Helvetica, sans-serif;
    font-size: 12px;

    Modified:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/exporter.jsp
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/exporter.jsp?rev=1039499&r1=1039498&r2=1039499&view=diff

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/exporter.jsp
    (original)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/exporter.jsp
    Fri Nov 26 18:35:04 2010
    @@ -1,10 +1,17 @@
    -<%@ page session="false" contentType="text/html;charset=utf-8" %>
    -<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    -<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    -<%@ taglib uri="http://myfaces.apache.org/commons/components"
    prefix="mc" %>
    +<%@ page session="false" contentType="text/html;charset=utf-8"%>
    +<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    +<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    +<%@ taglib uri="http://myfaces.apache.org/commons/converters"
    +    prefix="mcc"%>
    +<%@ taglib uri="http://myfaces.apache.org/commons/components"
    +    prefix="mc"%>
    +<%@ taglib uri="http://myfaces.apache.org/commons/validators"
    +    prefix="mcv"%>
    +
    <html>
    +<f:view>

    -<%@ include file="inc/head.inc" %>
    +<%@include file="inc/head.inc"%>

    <!--
    /*
    @@ -28,9 +35,13 @@
    //-->

    <body>
    +<div id="container">
    +    <f:loadBundle
    +
    basename="org.apache.myfaces.examples.resource.example_messages"
    +        var="example_messages" />

    -<f:view>
    -
    +   <h1><h:outputText value="#{example_messages['title']}"/></h1>
    +   <br/>
    <h:form>
    <p>This component allows to export the datatable contents to an
    excel or pdf file.</p>

    @@ -70,21 +81,21 @@
    <br>

    <h:commandButton action="#{exporterBean.export}"
    value="Export as excel">
    -                       <mc:exporterActionListener for="tbl_cars"
    fileType="XLS"/>
    +                       <mc:exporterActionListener for="tbl_cars"
    fileType="XLS" filename="excel"/>
    </h:commandButton>

    <br>

    <h:commandButton action="#{exporterBean.export}"
    value="Export as pdf">
    -                       <mc:exporterActionListener for="tbl_cars"
    fileType="PDF"/>
    +                       <mc:exporterActionListener for="tbl_cars"
    fileType="PDF" filename="pdf"/>
    </h:commandButton>


    </h:form>
    -</f:view>

    -<%@ include file="inc/page_footer.jsp" %>

    +<%@ include file="inc/page_footer.jsp" %>
    +</div>
    </body>
    -
    +</f:view>
    </html>

    Modified:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/home.jsp
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/home.jsp?rev=1039499&r1=1039498&r2=1039499&view=diff

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/home.jsp
    (original)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/home.jsp
    Fri Nov 26 18:35:04 2010
    @@ -4,7 +4,7 @@
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <html>
    -
    +<f:view>
    <!--
    /*
    * Licensed to the Apache Software Foundation (ASF) under one
    @@ -30,40 +30,37 @@

    <body>

    -<f:view>
    -
    +<div id="container">
    <f:loadBundle

    basename="org.apache.myfaces.examples.resource.example_messages"
    var="example_messages" />

    +    <h:panelGrid id="header_group1" columns="2" styleClass="pageHeader"
    +        <h:panelGroup>
    +            <h:outputText style="font-size:20px;color:#FFFFFF"
    escape="false" value="MyFaces - The free JavaServer&#8482; Faces
    Implementation - Myfaces Commons JSP Example"/>
    +        </h:panelGroup>
    +    </h:panelGrid>
    +
    <h:form>
    -               <h:panelGrid>
    -                       <h:outputLink value="validate.jsf">
    -                               <f:verbatim>Validate Email, Credit Card,
    Regex</f:verbatim>
    -                       </h:outputLink>
    -                       <h:outputLink value="validateCompareTo.jsf">
    -
    <f:verbatim>ValidateCompareTo</f:verbatim>
    -                       </h:outputLink>
    -            <h:outputLink value="validateCSV.jsf">
    -                <f:verbatim>ValidateCSV</f:verbatim>
    -            </h:outputLink>
    -            <h:outputLink value="validateUrl.jsf">
    -                <f:verbatim>ValidateUrl</f:verbatim>
    -            </h:outputLink>
    -            <h:outputLink value="convertEnum.jsf">
    -                <f:verbatim>ConvertEnum</f:verbatim>
    -            </h:outputLink>
    -            <h:outputLink value="renderOne.jsf">
    -                <f:verbatim>renderOne - render the first child
    component by order or by index</f:verbatim>
    -            </h:outputLink>
    -            <h:outputLink value="exporter.jsf">
    -                <f:verbatim>Exporter - Export datatable contents as an
    excel file or as a pdf file</f:verbatim>
    -            </h:outputLink>
    -               </h:panelGrid>
    -       </h:form>
    +            <h:panelGrid>
    +                <h:outputLink value="convertBoolean.jsf"
    <f:verbatim>mcc:convertBoolean</f:verbatim></h:outputLink>
    +                <h:outputLink value="convertEnum.jsf"
    <f:verbatim>mcc:convertEnum</f:verbatim></h:outputLink>
    +                <h:outputLink value="convertNumber.jsf"
    <f:verbatim>mcc:convertNumber</f:verbatim></h:outputLink>
    +                <h:outputLink value="convertDateTime.jsf"
    <f:verbatim>mcc:convertDateTime</f:verbatim></h:outputLink>
    +                <h:outputLink value="creditcardvalidator.jsf"
    <f:verbatim>mcv:validateCreditCard</f:verbatim></h:outputLink>
    +                <h:outputLink value="validate.jsf"
    <f:verbatim>Multiple Validations (Email, Credit Card,
    Regex)</f:verbatim></h:outputLink>
    +                <h:outputLink value="validateCompareTo.jsf"
    <f:verbatim>mcv:validateCompareTo</f:verbatim></h:outputLink>
    +                <h:outputLink value="validateCSV.jsf"
    <f:verbatim>mcv:validateCSV</f:verbatim></h:outputLink>
    +                <h:outputLink value="validateUrl.jsf"
    <f:verbatim>mcv:validateUrl</f:verbatim></h:outputLink>
    +                <h:outputLink value="exporter.jsf"
    <f:verbatim>Exporter - Export datatable contents as an excel file or as a
    pdf file</f:verbatim></h:outputLink>
    +                <h:outputLink value="renderOne.jsf"
    <f:verbatim>mc:renderOne -  render the first child component by order or by
    index</f:verbatim></h:outputLink>
    +                <h:outputLink value="outputClientId.jsf"
    <f:verbatim>mc:outputClientId</f:verbatim></h:outputLink>
    +            </h:panelGrid>

    -</f:view>
    +       </h:form>
    +</div>

    </body>

    +</f:view>
    </html>

    Modified:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/inc/page_footer.jsp
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/inc/page_footer.jsp?rev=1039499&r1=1039498&r2=1039499&view=diff

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/inc/page_footer.jsp
    (original)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/inc/page_footer.jsp
    Fri Nov 26 18:35:04 2010
    @@ -1,3 +1,15 @@
    +<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    +<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    +<h:dataTable  value="#{accessedBeans.beanList}" var="accessedBean">
    +  <h:column>
    +    <h:outputLink value="#{accessedBean.clazz}.java.source" >
    +        <h:outputText value="Usage of bean with name : "/>
    +        <h:outputText value="#{accessedBean.name}"/>
    +        <h:outputText value=" and class : "/>
    +        <h:outputText value="#{accessedBean.clazz}"/>
    +    </h:outputLink>
    +  </h:column>
    +</h:dataTable>
    <br/>
    <br/>


    Added:
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/outputClientId.jsp
    URL:
    http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/outputClientId.jsp?rev=1039499&view=auto

    ==============================================================================
    ---
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/outputClientId.jsp
    (added)
    +++
    myfaces/commons/branches/jsf_11/examples/myfaces-commons-examples/src/main/webapp/outputClientId.jsp
    Fri Nov 26 18:35:04 2010
    @@ -0,0 +1,70 @@
    +<%@ page session="false" contentType="text/html;charset=utf-8"%>
    +<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    +<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    +<%@ taglib uri="http://myfaces.apache.org/commons/converters"
    +    prefix="mcc"%>
    +<%@ taglib uri="http://myfaces.apache.org/commons/components"
    +    prefix="mc"%>
    +<%@ taglib uri="http://myfaces.apache.org/commons/validators"
    +    prefix="mcv"%>
    +
    +<html>
    +<f:view>
    +
    +<%@include file="inc/head.inc"%>
    +
    +<!--
    +/*
    + * 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


    --
    Jakob Korherr

    blog: http://www.jakobk.com
    twitter: http://twitter.com/jakobkorherr
    work: http://www.irian.at

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdev @
categoriesmyfaces
postedNov 26, '10 at 6:40p
activeNov 26, '10 at 6:48p
posts3
users2
websitemyfaces.apache.org

2 users in discussion

Jakob Korherr: 2 posts Leonardo Uribe: 1 post

People

Translate

site design / logo © 2019 Grokbase