You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by al...@apache.org on 2010/07/31 00:37:34 UTC

svn commit: r980988 [6/8] - in /myfaces/gsoc/html5-comp-lib/trunk: ./ html5-comp-lib-core/ html5-comp-lib-core/src/ html5-comp-lib-core/src/main/ html5-comp-lib-core/src/main/java/ html5-comp-lib-core/src/main/java/META-INF/ html5-comp-lib-core/src/mai...

Added: myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/resources/META-INF/componentClass20.vm
URL: http://svn.apache.org/viewvc/myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/resources/META-INF/componentClass20.vm?rev=980988&view=auto
==============================================================================
--- myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/resources/META-INF/componentClass20.vm (added)
+++ myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/resources/META-INF/componentClass20.vm Fri Jul 30 22:37:29 2010
@@ -0,0 +1,486 @@
+## Velocity template used to generate JSF1.2-compatible component classes
+## from component meta-data.
+##
+## Note that there are two types of component generation:
+##  * "subclass mode" (use annotated class as a parent class)
+##  * "template mode" (use annotated class as a template)
+## This template file is used for both.
+##
+## Variable $component refers to a ComponentMeta object to process
+## Variable $utils refers to an instance of MyfacesUtils.
+##
+## When "template mode" is being used then variable $innersource
+## holds a String containing all the non-abstract functions defined
+## in the annotated class.
+##
+/*
+ *  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 ${component.packageName};
+
+import javax.el.ValueExpression;
+import javax.faces.context.FacesContext;
+$utils.importTagClasses($component)
+
+#if ($component.isTemplate())
+#set ($generatedClassParent = $component.sourceClassParentClassName)
+#else
+#set ($generatedClassParent = $component.sourceClassName)
+#end
+// Generated from class ${component.sourceClassName}.
+//
+// WARNING: This file was automatically generated. Do not edit it directly,
+//          or you will lose your changes.
+public class ${utils.getClassFromFullClass($component.className)} extends $generatedClassParent
+#if ($component.implements)
+    implements $component.implements
+#end
+{
+#if ($component.serialuid)
+    private static final long serialVersionUID = ${component.serialuid}; 
+#end  
+
+    static public final String COMPONENT_FAMILY =
+        "$component.family";
+    static public final String COMPONENT_TYPE =
+        "$component.type";
+##if ($component.rendererType)
+##if (!($component.rendererType == ""))
+##    static public final String DEFAULT_RENDERER_TYPE = 
+##        "$component.rendererType";
+##end
+##end
+
+#if ($innersource)
+    //BEGIN CODE COPIED FROM $component.sourceClassName 
+$innersource
+    //END CODE COPIED FROM $component.sourceClassName
+#end
+
+    public ${utils.getClassFromFullClass($component.className)}()
+    {
+#if ($component.rendererType)
+#if ($component.rendererType == "")
+        setRendererType(null);
+#else
+        setRendererType("$component.rendererType");
+#end
+#else
+        setRendererType(null);
+#end
+    }
+
+## On myfaces 1.1 the family is inherited, so this could be commented
+## On other this should not be commented
+    @Override    
+    public String getFamily()
+    {
+        return COMPONENT_FAMILY;
+    }
+
+## Iterate over full component property list
+#set ($propertyList = ${component.propertyList})
+
+## TODO: this condition should be checked for parent components
+## and csv implements
+#if ($component.implements)
+#if ($component.implements == "javax.faces.component.behavior.ClientBehaviorHolder")
+    static private final java.util.Collection<String> CLIENT_EVENTS_LIST = 
+        java.util.Collections.unmodifiableCollection(
+            java.util.Arrays.asList(
+#set ($commavar = "")
+#foreach( $property in $propertyList )
+#if ($property.clientEvent)
+#if ($property.clientEvent != "")
+            $commavar "$property.clientEvent"
+#set ($commavar = ",")            
+#end
+#end
+#end
+#end
+        ));
+
+    public java.util.Collection<String> getEventNames()
+    {
+        return CLIENT_EVENTS_LIST;
+    }
+#end
+#if ($component.defaultEventName)
+#if ($component.defaultEventName != "")
+
+    //ClientBehaviorHolder default: $component.defaultEventName
+    public String getDefaultEventName()
+    {
+        return "$component.defaultEventName";
+    }
+#end
+#end
+
+#set ($propertyList = ${component.propertyComponentList})
+    
+#foreach( $property in $propertyList )
+#set ($field = $property.fieldName)
+#set ($type = $utils.getClassFromFullClass($property.className))
+#if($utils.getDefaultValueField($property)) 
+#set ($defaultValue = $utils.getDefaultValueField($property))
+#else
+#set ($defaultValue = false)
+#end
+    // Property: $property.name
+#if ($property.isPartialStateHolder())
+#if ($property.isLiteralOnly() || $property.isTagExcluded() )
+    private $type $field #if($defaultValue) = $defaultValue;#{else};#{end}
+
+     
+#else
+    private $type $field;
+    
+#end
+
+    private boolean _$utils.getPrefixedPropertyName("isSet", $property.name)()
+    {
+        Boolean value = (Boolean) getStateHelper().get(PropertyKeys.${property.name}Set);
+        return value == null ? false : value;
+    }
+
+#if($utils.isPrimitiveClass($type) && !$property.isTagExcluded() )
+    private boolean ${field}Set;
+    
+#if ($property.isSetMethod())
+    $property.setMethodScope boolean $utils.getPrefixedPropertyName("isSet", $property.name)()
+    {
+        return ${field}Set;
+    }
+#end
+#end
+#if($property.isLocalMethod())
+#if("boolean" == $type)
+#set ($methodName = $utils.getPrefixedPropertyName("isLocal", $property.name))
+#else
+#set ($methodName = $utils.getPrefixedPropertyName("getLocal", $property.name))
+#end
+    final $property.localMethodScope $type ${methodName}()
+    {
+        return $field;
+    }
+     
+#end
+    public $type $utils.getMethodReaderFromProperty($property.name, $type)()
+    {
+#if ($property.isTagExcluded() || $property.isLiteralOnly())
+        return $field;
+#else
+#if ($utils.isPrimitiveClass($type))
+        if (${field}Set)
+#else
+        if ($field != null)
+#end
+        {
+            return $field;
+        }
+        ValueExpression vb = getValueExpression("$property.name");
+        if (vb != null)
+        {
+#if ($utils.isPrimitiveClass($type))
+            return ($utils.castIfNecessary($type) vb.getValue(getFacesContext().getELContext())).${type}Value();
+#else
+#set ($pritype = $utils.getPrimitiveType($property.className))
+#if ($utils.isPrimitiveClass($pritype))
+            Object value = vb == null ? null : vb.getValue(getFacesContext().getELContext());
+            if (!(value instanceof $type)){
+                value = ${type}.valueOf(value.toString());
+            }            
+            return $utils.castIfNecessary($type) value;
+#else
+            return $utils.castIfNecessary($type) vb.getValue(getFacesContext().getELContext());
+#end
+#end
+        }
+#if ($defaultValue)
+        return $defaultValue; 
+#elseif ($utils.isPrimitiveClass($type))
+        return $utils.primitiveDefaultValue($type);
+#else       
+        return null;
+#end
+#end
+    }
+
+    public void $utils.getPrefixedPropertyName("set", $property.name)($type $utils.getVariableFromName($property.name))
+    {
+        this.$field = $utils.getVariableFromName($property.name);
+        if (initialStateMarked())
+        {
+            getStateHelper().put(PropertyKeys.${property.name}Set,Boolean.TRUE);
+        }
+#if ($utils.isPrimitiveClass($type) && !$property.isTagExcluded() )
+        this.${field}Set = true;        
+#end
+    }
+#else
+## StateHelper aware property
+#if ($property.name == "for")
+## To keep compatibility with RI, we should call it forVal
+#set ($field = "forVal")
+#else
+#set ($field = $property.name)
+#end
+
+    public $type $utils.getMethodReaderFromProperty($property.name, $type)()
+    {
+#if ($property.isLiteralOnly())
+#if ($defaultValue)
+        Object value = getStateHelper().get(PropertyKeys.$field);
+        if (value != null)
+        {
+            return $utils.castIfNecessary($type) value;        
+        }
+        return $defaultValue;        
+#else
+        return $utils.castIfNecessary($type) getStateHelper().get(PropertyKeys.$field);        
+#end
+#else
+#if ($defaultValue)
+        return $utils.castIfNecessary($type) getStateHelper().eval(PropertyKeys.$field, $defaultValue);
+#else
+        return $utils.castIfNecessary($type) getStateHelper().eval(PropertyKeys.$field);
+#end
+#end
+    }
+    
+    public void $utils.getPrefixedPropertyName("set", $property.name)($type $utils.getVariableFromName($property.name))
+    {
+        getStateHelper().put(PropertyKeys.$field, $utils.getVariableFromName($property.name) ); 
+    }    
+#end
+#end
+
+#if ($component.className.startsWith("javax.faces.component.html"))
+    protected enum PropertyKeys
+    {
+#else
+    enum PropertyKeys
+    {
+#end
+#set ($comma = "")
+#set ($addc = "false")
+#foreach( $property in $propertyList )
+#if ($property.name == "for")
+#set ($addc = "true")
+## To keep compatibility with RI, we should call it forVal
+#set ($field = "forVal")
+#else
+#set ($field = $property.name)
+#end
+#set ($type = $utils.getClassFromFullClass($property.className))
+#if($utils.getDefaultValueField($property)) 
+#set ($defaultValue = $utils.getDefaultValueField($property))
+#else
+#set ($defaultValue = false)
+#end
+#if ($property.name == "for")
+        $comma $field("for")
+#else
+#if ($property.isPartialStateHolder())
+        $comma ${field}Set
+#else
+        $comma $field
+#end
+#end
+#set($comma = ",")
+#end
+#if ("true" == $addc)
+        ;
+        String c;
+        
+        PropertyKeys()
+        {
+        }
+        
+        //Constructor needed by "for" property
+        PropertyKeys(String c)
+        { 
+            this.c = c;
+        }
+        
+        public String toString()
+        {
+            return ((this.c != null) ? this.c : super.toString());
+        }
+#end
+    }
+
+#set ($primitiveCount = 1) ## $propertyList.size() + 1 
+#foreach( $property in $propertyList )
+#if ($property.isPartialStateHolder())
+#set ($primitiveCount = $primitiveCount + 1)
+#if($utils.isPrimitiveClass($property.className))
+#set ($primitiveCount = $primitiveCount + 1)
+#end
+#end
+#end
+## saveState and restoreState methods only has sense if we have properties
+## that does not use StateHelper class.
+#if ($primitiveCount > 1)
+
+    public void markInitialState()
+    {
+        super.markInitialState();
+#foreach( $property in $propertyList )
+#set ($field = $property.fieldName)
+#if ($property.isPartialStateHolder())        
+        if ($field != null && 
+            $field instanceof PartialStateHolder)
+        {
+            ((PartialStateHolder)$field).markInitialState();
+        }
+#end
+#end
+    }
+    
+    public void clearInitialState()
+    {
+        if (initialStateMarked())
+        {
+            super.clearInitialState();
+#foreach( $property in $propertyList )
+#set ($field = $property.fieldName)
+#if ($property.isPartialStateHolder())
+##          //Only has sense propagate this method if is initialStateMarked
+            if ($field != null && 
+                $field instanceof PartialStateHolder)
+            {
+                ((PartialStateHolder)$field).clearInitialState();
+            }
+#end
+#end
+        }
+    }
+
+    @Override
+    public Object saveState(FacesContext facesContext)
+    {
+        if (initialStateMarked())
+        {
+            boolean nullDelta = true;
+            Object parentSaved = super.saveState(facesContext);
+#set ($arrayIndex = 0)
+#foreach( $property in $propertyList )
+#set ($field = $property.fieldName)
+#set ($type = $property.className)
+#if ($property.isPartialStateHolder())
+#set ($arrayIndex = $arrayIndex + 1)
+            Object ${property.name}Saved = null;
+            if (!_$utils.getPrefixedPropertyName("isSet", $property.name)() &&
+                $field != null && $field instanceof PartialStateHolder)
+            {
+                //Delta
+                StateHolder holder = (StateHolder) $field;
+                if (!holder.isTransient())
+                {
+                    Object attachedState = holder.saveState(facesContext);
+                    if (attachedState != null)
+                    {
+                        nullDelta = false;
+                    }
+                    ${property.name}Saved = new _AttachedDeltaWrapper(${field}.getClass(),
+                        attachedState);
+                }
+            }
+            else if (_$utils.getPrefixedPropertyName("isSet", $property.name)() || $field != null )
+            {
+                //Full
+                ${property.name}Saved = saveAttachedState(facesContext,$field);
+                nullDelta = false;
+            }        
+## StateHelper Properties does not need save and restore
+#end
+#end
+            if (parentSaved == null && nullDelta)
+            {
+                //No values
+                return null;
+            }
+            
+            Object[] values = new Object[$primitiveCount];
+            values[0] = parentSaved;
+## Save full state
+#set ($arrayIndex = 0)
+#foreach( $property in $propertyList )
+#set ($field = $property.fieldName)
+#set ($type = $property.className)
+#if ($property.isPartialStateHolder())
+#set ($arrayIndex = $arrayIndex + 1)
+            values[$arrayIndex] = ${property.name}Saved;
+## StateHelper Properties does not need save and restore
+#end
+#end
+            return values;
+        }
+        else
+        {
+            Object[] values = new Object[$primitiveCount];
+            values[0] = super.saveState(facesContext);
+## Save full state
+#set ($arrayIndex = 0)
+#foreach( $property in $propertyList )
+#set ($field = $property.fieldName)
+#set ($type = $property.className)
+#if ($property.isPartialStateHolder())
+#set ($arrayIndex = $arrayIndex + 1)
+            values[$arrayIndex] = saveAttachedState(facesContext,$field);
+## StateHelper Properties does not need save and restore
+#end
+#end
+            return values;
+        }
+    }
+
+    @Override
+    public void restoreState(FacesContext facesContext, Object state)
+    {
+        if (state == null)
+        {
+            return;
+        }
+        
+        Object[] values = (Object[])state;
+        super.restoreState(facesContext,values[0]);
+#set ($arrayIndex = 0)
+#foreach( $property in $propertyList )
+#set ($field = $property.fieldName)
+#set ($type = $property.className)
+#if ($property.isPartialStateHolder())
+#set ($arrayIndex = $arrayIndex + 1)
+        if (values[$arrayIndex] instanceof _AttachedDeltaWrapper)
+        {
+            //Delta
+            ((StateHolder)$field).restoreState(facesContext, ((_AttachedDeltaWrapper) values[$arrayIndex]).getWrappedStateObject());
+        }
+        else
+        {
+            //Full
+            $field = $utils.castIfNecessary($type) restoreAttachedState(facesContext,values[$arrayIndex]);
+        }         
+#else
+## StateHelper Properties does not need save and restore
+#end
+#end
+    }
+#end
+}

Added: myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/resources/META-INF/facelets-taglib-base.xml
URL: http://svn.apache.org/viewvc/myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/resources/META-INF/facelets-taglib-base.xml?rev=980988&view=auto
==============================================================================
--- myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/resources/META-INF/facelets-taglib-base.xml (added)
+++ myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/resources/META-INF/facelets-taglib-base.xml Fri Jul 30 22:37:29 2010
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<facelet-taglib xmlns="http://java.sun.com/xml/ns/javaee"
+              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+              xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facelettaglibrary_2_0.xsd"
+              version="2.0">
+
+</facelet-taglib>
\ No newline at end of file

Added: myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/resources/META-INF/facelets-taglib20.vm
URL: http://svn.apache.org/viewvc/myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/resources/META-INF/facelets-taglib20.vm?rev=980988&view=auto
==============================================================================
--- myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/resources/META-INF/facelets-taglib20.vm (added)
+++ myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/resources/META-INF/facelets-taglib20.vm Fri Jul 30 22:37:29 2010
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<facelet-taglib xmlns="http://java.sun.com/xml/ns/javaee"
+              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+              xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facelettaglibrary_2_0.xsd"
+              version="2.0">
+              
+    <namespace>$uri</namespace>
+
+    <!-- Component Tags -->
+#set ($componentList = ${model.getComponents()})
+#foreach( $component in $componentList )
+#if ($modelIds.contains($component.modelId) 
+    && ($component.name) && $utils.getTagPrefix($component.name) == $shortname)
+    
+#if (!$component.isConfigExcluded())
+    <tag>
+        <tag-name>$utils.getTagName($component.name)</tag-name>
+        <component>
+            <component-type>$component.type</component-type>
+#if ($component.rendererType)
+#if (!($component.rendererType == ""))
+            <renderer-type>$component.rendererType</renderer-type>
+#end
+#end
+#if ($component.tagHandler)
+            <handler-class>$component.tagHandler</handler-class>
+#end
+        </component>
+    </tag>
+#end
+#end
+#end
+
+   <!-- Converter tags -->
+#set ($componentList = ${model.getConverters()})
+#foreach( $component in $componentList )
+#if ($modelIds.contains($component.modelId) 
+    && ($component.name))
+#if ($component.converterId) 
+    <tag>
+        <tag-name>$utils.getTagName($component.name)</tag-name>
+        <converter>
+            <converter-id>$component.converterId</converter-id>
+        </converter>
+    </tag>
+#end
+#end
+#end
+
+   <!-- Validator tags -->
+#set ($componentList = ${model.getValidators()})
+#foreach( $component in $componentList )
+#if ($modelIds.contains($component.modelId) 
+    && ($component.name))
+#if ($component.validatorId)
+    <tag>
+        <tag-name>$utils.getTagName($component.name)</tag-name>
+        <validator>
+            <validator-id>$component.validatorId</validator-id>
+        </validator>      
+    </tag>
+#end
+#end
+#end
+
+#* ATTENTION: FACELET TAGS THAT ARE SPECIFIED BY @JSFJspTag annotation's tagHandler property are ignored!    
+   <!-- Single Tags -->
+#set ($tagList = $model.getTags())
+#foreach( $tag in $tagList )
+#if ($modelIds.contains($tag.modelId))
+#if ($tag.tagHandler)
+   <tag>
+      <tag-name>$utils.getTagName($tag.name)</tag-name>
+      <handler-class>$tag.tagHandler</handler-class>
+   </tag>
+#end
+#end
+#end
+*#
+
+   <!-- Single Facelets Tags -->
+#set ($faceletTagList = $model.getFaceletTags())
+#foreach( $faceletTag in $faceletTagList )
+#if ($modelIds.contains($faceletTag.modelId) 
+    && ($faceletTag.name) && $utils.getTagPrefix($faceletTag.name) == $shortname)
+#if ($faceletTag.className)
+   <tag>
+      <tag-name>$utils.getTagName($faceletTag.name)</tag-name>
+      <handler-class>$faceletTag.className</handler-class>
+   </tag>
+#end
+#end
+#end
+</facelet-taglib>
\ No newline at end of file

Added: myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/resources/META-INF/facelets-taglib20_fx.vm
URL: http://svn.apache.org/viewvc/myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/resources/META-INF/facelets-taglib20_fx.vm?rev=980988&view=auto
==============================================================================
--- myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/resources/META-INF/facelets-taglib20_fx.vm (added)
+++ myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/resources/META-INF/facelets-taglib20_fx.vm Fri Jul 30 22:37:29 2010
@@ -0,0 +1,128 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<facelet-taglib xmlns="http://java.sun.com/xml/ns/javaee"
+              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+              xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facelettaglibrary_2_0.xsd"
+              version="2.0">
+              
+    <namespace>$uri</namespace>
+
+    <!-- Component Tags -->
+#set ($componentList = ${model.getComponents()})
+#foreach( $component in $componentList )
+#if ($modelIds.contains($component.modelId) 
+    && ($component.name) && $utils.getTagPrefix($component.name) == $shortname)
+    
+#if (!$component.isConfigExcluded())
+    <tag>
+        <tag-name>$utils.getTagName($component.name)</tag-name>
+        <component>
+            <component-type>$component.type</component-type>
+#if ($component.rendererType)
+#if (!($component.rendererType == ""))
+            <renderer-type>$component.rendererType</renderer-type>
+#end
+#end
+#if ($component.tagHandler)
+            <handler-class>$component.tagHandler</handler-class>
+#end
+        </component>
+    </tag>
+#end
+#end
+#end
+
+   <!-- Converter tags -->
+#set ($componentList = ${model.getConverters()})
+#foreach( $component in $componentList )
+#if ($modelIds.contains($component.modelId) 
+    && ($component.name))
+#if ($component.converterId) 
+    <tag>
+        <tag-name>$utils.getTagName($component.name)</tag-name>
+        <converter>
+            <converter-id>$component.converterId</converter-id>
+        </converter>
+    </tag>
+#end
+#end
+#end
+
+   <!-- Validator tags -->
+#set ($componentList = ${model.getValidators()})
+#foreach( $component in $componentList )
+#if ($modelIds.contains($component.modelId) 
+    && ($component.name))
+#if ($component.validatorId)
+    <tag>
+        <tag-name>$utils.getTagName($component.name)</tag-name>
+        <validator>
+            <validator-id>$component.validatorId</validator-id>
+        </validator>      
+    </tag>
+#end
+#end
+#end
+
+#* ATTENTION: FACELET TAGS THAT ARE SPECIFIED BY @JSFJspTag annotation's tagHandler property are ignored!    
+   <!-- Single Tags -->
+#set ($tagList = $model.getTags())
+#foreach( $tag in $tagList )
+#if ($modelIds.contains($tag.modelId))
+#if ($tag.tagHandler)
+   <tag>
+      <tag-name>$utils.getTagName($tag.name)</tag-name>
+      <handler-class>$tag.tagHandler</handler-class>
+   </tag>
+#end
+#end
+#end
+*#
+
+   <!-- Single Facelets Tags -->
+#set ($faceletTagList = $model.getFaceletTags())
+#foreach( $faceletTag in $faceletTagList )
+#if ($modelIds.contains($faceletTag.modelId) 
+    && ($faceletTag.name) && $utils.getTagPrefix($faceletTag.name) == $shortname)
+#if ($faceletTag.className)
+   <tag>
+      <tag-name>$utils.getTagName($faceletTag.name)</tag-name>
+      <handler-class>$faceletTag.className</handler-class>
+   </tag>
+#end
+#end
+#end
+   <!-- TODO: generate it with myfaces-builder-plugin -->
+   <tag>
+      <tag-name>dragSource</tag-name>
+      <behavior>
+         <behavior-id>org.apache.myfaces.html5.DragSourceBehavior</behavior-id>
+         <handler-class>org.apache.myfaces.html5.handler.DragSourceBehaviorHandler</handler-class>
+      </behavior>
+   </tag>
+   <tag>
+      <tag-name>dropTarget</tag-name>
+      <behavior>
+         <behavior-id>org.apache.myfaces.html5.DropTargetBehavior</behavior-id>
+         <handler-class>org.apache.myfaces.html5.handler.DropTargetBehaviorHandler</handler-class>
+      </behavior>
+   </tag>
+   
+</facelet-taglib>
\ No newline at end of file

Added: myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/resources/META-INF/faces-config20.vm
URL: http://svn.apache.org/viewvc/myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/resources/META-INF/faces-config20.vm?rev=980988&view=auto
==============================================================================
--- myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/resources/META-INF/faces-config20.vm (added)
+++ myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/resources/META-INF/faces-config20.vm Fri Jul 30 22:37:29 2010
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+
+<faces-config xmlns="http://java.sun.com/xml/ns/javaee" 
+              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+              xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd" 
+              version="2.0">
+
+$baseContent
+
+#set ($componentList = ${model.getComponents()})
+#foreach( $component in $componentList )
+#if ($modelIds.contains($component.modelId) 
+    && !($component.className.contains("UIComponent"))
+    && !($component.isConfigExcluded()))
+  <component>
+    <component-type>$component.type</component-type>
+    <component-class>$component.className</component-class>
+  </component>    
+#end
+#end
+#set ($converterList = ${model.getConverters()})
+#foreach( $converter in $converterList )
+#if ($modelIds.contains($converter.modelId))
+  <converter>
+    <converter-id>$converter.converterId</converter-id>
+    <converter-class>$converter.className</converter-class>
+  </converter>
+#end
+#end
+#set ($validatorList = ${model.getValidators()})
+#foreach( $validator in $validatorList )
+#if ($modelIds.contains($validator.modelId) &&
+    !($validator.isConfigExcluded().booleanValue()) &&
+    $validator.validatorId)
+  <validator>
+    <validator-id>$validator.validatorId</validator-id>
+    <validator-class>$validator.className</validator-class>
+  </validator>
+#end
+#end
+#set ($renderKitList = ${model.getRenderKits()})
+#foreach( $renderKit in $renderKitList )
+  <render-kit>
+    <render-kit-id>$renderKit.renderKitId</render-kit-id>
+#if ($renderKit.className)
+    <render-kit-class>$renderKit.className</render-kit-class>
+#end
+#set ($rendererList = ${renderKit.getRenderers()})
+#foreach( $renderer in $rendererList )
+      <renderer>
+        <component-family>$renderer.componentFamily</component-family>
+        <renderer-type>$renderer.rendererType</renderer-type>
+        <renderer-class>$renderer.className</renderer-class>
+      </renderer>
+#end
+
+<!-- TODO: use the myfaces-builder-plugin here -->
+      <client-behavior-renderer>
+      	<client-behavior-renderer-type>org.apache.myfaces.html5.DragSourceBehavior</client-behavior-renderer-type>
+      	<client-behavior-renderer-class>org.apache.myfaces.html5.renderkit.behavior.DragSourceBehaviorRenderer</client-behavior-renderer-class>
+      </client-behavior-renderer>
+      <client-behavior-renderer>
+      	<client-behavior-renderer-type>org.apache.myfaces.html5.DropTargetBehavior</client-behavior-renderer-type>
+      	<client-behavior-renderer-class>org.apache.myfaces.html5.renderkit.behavior.DropTargetBehaviorRenderer</client-behavior-renderer-class>
+      </client-behavior-renderer>
+
+  </render-kit>
+#end
+
+
+<!-- TODO: use the myfaces-builder-plugin here -->
+	<behavior>
+		<behavior-id>org.apache.myfaces.html5.DragSourceBehavior</behavior-id>
+		<behavior-class>org.apache.myfaces.html5.behavior.DragSourceBehavior</behavior-class>
+	</behavior>
+	<behavior>
+		<behavior-id>org.apache.myfaces.html5.DropTargetBehavior</behavior-id>
+		<behavior-class>org.apache.myfaces.html5.behavior.DropTargetBehavior</behavior-class>
+	</behavior>
+
+
+</faces-config>

Added: myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/resources/META-INF/jsp-tld-base.tld
URL: http://svn.apache.org/viewvc/myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/resources/META-INF/jsp-tld-base.tld?rev=980988&view=auto
==============================================================================
--- myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/resources/META-INF/jsp-tld-base.tld (added)
+++ myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/resources/META-INF/jsp-tld-base.tld Fri Jul 30 22:37:29 2010
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ * 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.
+-->
+<taglib xmlns="http://java.sun.com/xml/ns/javaee" 
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd" 
+        version="2.1">
+   
+</taglib>
\ No newline at end of file

Added: myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/resources/META-INF/jsp-tld.vm
URL: http://svn.apache.org/viewvc/myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/resources/META-INF/jsp-tld.vm?rev=980988&view=auto
==============================================================================
--- myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/resources/META-INF/jsp-tld.vm (added)
+++ myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/resources/META-INF/jsp-tld.vm Fri Jul 30 22:37:29 2010
@@ -0,0 +1,229 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<taglib xmlns="http://java.sun.com/xml/ns/javaee" 
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd" 
+        version="2.1">
+  <tlib-version>1.1.7</tlib-version>
+   <short-name>$shortname</short-name>
+   <uri>$uri</uri>
+   <display-name>$displayname</display-name>
+   <description>$description</description>
+
+$baseContent
+
+    <!-- Component Tags -->
+#set ($componentList = ${model.getComponents()})
+#foreach( $component in $componentList )
+#if ($modelIds.contains($component.modelId) 
+    && ($component.name))
+#if ($utils.getTagPrefix($component.name) == $shortname) 
+   <tag>
+      <name>$utils.getTagName($component.name)</name>
+      <tag-class>$component.tagClass</tag-class>
+#if ($component.bodyContent)
+      <body-content>$component.bodyContent</body-content>
+#else
+      <body-content>JSP</body-content>
+#end
+      <description><![CDATA[$component.longDescription]]></description>
+      
+#set ($propertyList = ${component.propertyList})
+#foreach( $property in $propertyList )
+#if (!$property.isTagExcluded())
+      <attribute>
+         <name>$property.jspName</name>
+#if ($property.isRequired())
+         <required>$property.isRequired()</required>
+#end
+#if ($property.isMethodExpression() || $property.isMethodBinding())
+#if ($property.getMethodBindingSignature())
+        <deferred-method>
+#set ($sig = $property.getMethodBindingSignature())
+            <method-signature>$sig.returnType myMethod( $sig.parameterTypesAsString )</method-signature>
+
+        </deferred-method>
+#else
+## This is a very special case. If a property is MethodBinding or MethodExpression
+## this should have a signature. If not, for allow multiple MethodBinding
+## simulate a ValueExpression and write a custom code like in 
+## org.apache.myfaces.custom.suggestajax.AbstractSuggestAjaxTag
+         <deferred-value/>
+#end
+#elseif ($property.isLiteralOnly())
+         <rtexprvalue>false</rtexprvalue>
+#else
+#if ( "$!property.isRtexprvalue()" == "")
+#set ($type = $utils.getClassFromFullClass($property.className))
+#if ($type == "String")
+         <deferred-value></deferred-value>
+#else
+         <deferred-value>
+             <type>$property.className</type>
+         </deferred-value>
+#end
+#else
+         <rtexprvalue>$property.isRtexprvalue().booleanValue()</rtexprvalue>
+#end
+#end
+#if ($property.longDescription)
+         <description><![CDATA[$property.longDescription]]></description>
+#else
+         <description><![CDATA[]]></description>
+#end
+      </attribute>
+#end
+#end
+   </tag>
+#end
+#end
+#end
+   <!-- Converter tags -->
+#set ($componentList = ${model.getConverters()})
+#foreach( $component in $componentList )
+#if ($modelIds.contains($component.modelId) 
+    && ($component.name))
+#if ($utils.getTagPrefix($component.name) == $shortname) 
+   <tag>
+      <name>$utils.getTagName($component.name)</name>
+      <tag-class>$component.tagClass</tag-class>
+#if ($component.bodyContent)
+      <body-content>$component.bodyContent</body-content>
+#else
+      <body-content>empty</body-content>
+#end
+      <description><![CDATA[$component.longDescription]]></description>
+      
+#set ($propertyList = ${component.propertyList})
+#foreach( $property in $propertyList )
+#if (!$property.isTagExcluded())
+      <attribute>
+         <name>$property.name</name>
+#if ($property.isRequired())
+         <required>$property.isRequired()</required>
+#end
+#if ($property.isLiteralOnly())
+         <rtexprvalue>false</rtexprvalue>
+#else
+#set ($type = $utils.getClassFromFullClass($property.className))
+#if ($type == "String")
+         <deferred-value></deferred-value>
+#else
+         <deferred-value>
+             <type>$property.className</type>
+         </deferred-value>
+#end
+#end
+#if ($property.longDescription)
+         <description><![CDATA[$property.longDescription]]></description>
+#else
+         <description><![CDATA[]]></description>
+#end
+      </attribute>
+#end
+#end
+   </tag>
+#end
+#end
+#end
+   <!-- Validator tags -->
+#set ($componentList = ${model.getValidators()})
+#foreach( $component in $componentList )
+#if ($modelIds.contains($component.modelId) 
+    && ($component.name))
+#if ($utils.getTagPrefix($component.name) == $shortname) 
+   <tag>
+      <name>$utils.getTagName($component.name)</name>
+      <tag-class>$component.tagClass</tag-class>
+#if ($component.bodyContent)
+      <body-content>$component.bodyContent</body-content>
+#else
+      <body-content>empty</body-content>
+#end
+      <description><![CDATA[$component.longDescription]]></description>
+      
+#set ($propertyList = ${component.propertyList})
+#foreach( $property in $propertyList )
+#if (!$property.isTagExcluded())
+      <attribute>
+         <name>$property.name</name>
+#if ($property.isRequired())
+         <required>$property.isRequired()</required>
+#end
+#if ($property.isLiteralOnly())
+         <rtexprvalue>false</rtexprvalue>
+#else
+#set ($type = $utils.getClassFromFullClass($property.className))
+#if ($type == "String")
+         <deferred-value></deferred-value>
+#else
+         <deferred-value>
+             <type>$property.className</type>
+         </deferred-value>
+#end
+#end
+#if ($property.longDescription)
+         <description><![CDATA[$property.longDescription]]></description>
+#else
+         <description><![CDATA[]]></description>
+#end
+      </attribute>
+#end
+#end
+   </tag>
+#end
+#end
+#end
+   <!-- Single Tags -->
+#set ($tagList = $model.getTags())
+#foreach( $tag in $tagList )
+#if ($modelIds.contains($tag.modelId))
+   <tag>
+      <name>$utils.getTagName($tag.name)</name>
+      <tag-class>$tag.className</tag-class>
+      <body-content>$tag.bodyContent</body-content>
+      <description><![CDATA[$tag.longDescription]]></description>
+#set ($attributeList = ${tag.attributeList})
+#foreach( $attribute in $attributeList )
+      <attribute>
+         <name>$attribute.name</name>
+         <required>$attribute.isRequired()</required>
+#set ($type = $utils.getClassFromFullClass($attribute.className))
+#if ($type == "ValueExpression")
+         <deferred-value></deferred-value>
+#else
+         <rtexprvalue>$attribute.isRtexprvalue()</rtexprvalue>
+#if ($attribute.className)         
+         <type>$attribute.className</type>
+#else
+         <type>java.lang.String</type>
+#end
+#end
+#if ($property.longDescription)
+         <description><![CDATA[$property.longDescription]]></description>
+#else
+         <description><![CDATA[]]></description>
+#end
+      </attribute>
+#end
+   </tag>
+#end
+#end
+</taglib>

Added: myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/resources/META-INF/resources/myfaces.apache.org/html5.js
URL: http://svn.apache.org/viewvc/myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/resources/META-INF/resources/myfaces.apache.org/html5.js?rev=980988&view=auto
==============================================================================
--- myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/resources/META-INF/resources/myfaces.apache.org/html5.js (added)
+++ myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/resources/META-INF/resources/myfaces.apache.org/html5.js Fri Jul 30 22:37:29 2010
@@ -0,0 +1,167 @@
+/*
+ * 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.
+ */
+//TODO: use the approach(es) in jsf.js
+
+var myfaces;
+if(myfaces == undefined || myfaces == null)
+	myfaces = {};
+
+myfaces.html5 = {};
+
+myfaces.html5.PARAM_MIME_TYPE 				= 'text/x-myfaces-html5-dnd-param';
+myfaces.html5.COMPONENT_SOURCE_MIME_TYPE 	= 'text/x-myfaces-html5-dnd-source';
+myfaces.html5.DROP_TARGETS_MIME_TYPE 		= 'text/x-myfaces-html5-drop-target-type';
+myfaces.html5.COMPONENT_SOURCE 				= 'org.apache.myfaces';
+
+//myfaces.html5.COMPONENT_SOURCE_MIME_TYPE 	= 'text/x-myfaces-html5-dnd-source';
+
+
+/*
+ * This function is only used by MyFaces generated draggable elements, the ones that have <fx:dragSource> behavior.
+ */
+myfaces.html5.dragStart = function(event, effectAllowed, dropTargetTypes, paramToSendToServer) {
+	//set allowed effect
+    event.dataTransfer.effectAllowed = effectAllowed;   //only allow some specific event
+ 
+    //with this, drop target will understand that source of this dnd operation is some MyFaces component
+    event.dataTransfer.setData(myfaces.html5.COMPONENT_SOURCE_MIME_TYPE, myfaces.html5.COMPONENT_SOURCE);
+ 
+    //this will be set if we want to send an optional parameter to the server-side drop listener
+    if(paramToSendToServer)
+        event.dataTransfer.setData(myfaces.html5.PARAM_MIME_TYPE, paramToSendToServer);    
+ 
+    //this will be set if we want to make the drop only into specific dropTargets with specific types
+    if(dropTargetTypes)
+        event.dataTransfer.setData(myfaces.html5.DROP_TARGETS_MIME_TYPE, myfaces.html5._getArrayAsString(dropTargetTypes));    
+       
+    return true;
+}
+ 
+myfaces.html5.dragEnterOrOver = function(event, allowedEffect, dropTargetTypes, acceptedMimeTypes) {
+	//check allowed mime types first
+    var foundMimeTypes = acceptedMimeTypes.filter(function (mimeType){return event.dataTransfer.types.contains(mimeType)});
+    //if even one of the event mime types are not allowed, stop DnD 
+    if(foundMimeTypes == null || foundMimeTypes.length == 0)
+    {
+        return true; //don't cancel the event, thus stop DnD
+    }
+    
+    //if allowed effect is specified, set it. so the browser can decide whether continue or stop dnd operation.
+    if(allowedEffect){
+    	event.dataTransfer.effectAllowed = allowedEffect;
+    }
+    
+    //check drop target type
+    var strAcceptedDropTargetTypesOfDragSource = event.dataTransfer.getData(myfaces.html5.DROP_TARGETS_MIME_TYPE);
+    if(strAcceptedDropTargetTypesOfDragSource){		//if drag source defines a drop target type
+    	//then, let's check this drop target's type matches with that
+    	var acceptedDropTargetTypesFromDragSource = myfaces.html5._convertStringToArray(event.dataTransfer.getData(myfaces.html5.DROP_TARGETS_MIME_TYPE));
+    	var foundDropTargetTypes = acceptedDropTargetTypesFromDragSource.filter(function (dropTargetType){return myfaces.html5._contains(dropTargetTypes, dropTargetType)});
+    	
+    	//if even one of the drop target types are not allowed, stop DnD 
+    	if(foundDropTargetTypes.length == 0)
+    		return true; //don't cancel the event, thus stop DnD
+    }
+
+    //cancel the event, so effect on screen is updated
+    if (event.preventDefault)
+        event.preventDefault();
+ 
+    return false;
+}
+ 
+myfaces.html5.drop = function(event, source, rerender, acceptedMimeTypes){
+	//cancel the event. this is necessary for DnD execution
+    if (event.preventDefault)
+        event.preventDefault();
+ 
+    //CALL jsf.ajax.request with constructing parameters
+    //this call should will the dropListener and make the rerender operation
+    //also, will send event mime types and values too!
+ 
+    var options = {};
+    //set execute
+    options.execute = "@this";		//XXX: do we need to parametrize this option too?
+
+    //set render
+    if(rerender)
+    	options.render = rerender;
+    else
+    	options.render = "@none";
+    
+    //set param
+    var paramsToSend = event.dataTransfer.getData(myfaces.html5.PARAM_MIME_TYPE);
+    if(paramsToSend)
+    	options[myfaces.html5.PARAM_MIME_TYPE] = paramsToSend;
+
+    //set the data according to acceptedMimeTypes
+    if(acceptedMimeTypes){
+	    var foundMimeTypes = acceptedMimeTypes.filter(function (mimeType){return event.dataTransfer.types.contains(mimeType)});
+	    if(foundMimeTypes.length > 0){
+	    	 options["org.apache.myfaces.dnd.foundMimeTypes"] = myfaces.html5._getArrayAsString(acceptedMimeTypes);
+	    	 for(var i=0; i< foundMimeTypes.length; i++){
+	    		 var mimeType = foundMimeTypes[i];
+	    		 var data = event.dataTransfer.getData(mimeType);
+	    		 if(data){
+	    			 options[mimeType] = data;
+	    		 }
+	    	 }
+	    }
+    }
+    
+    //set event
+    options["javax.faces.behavior.event"] = "drop"
+
+    jsf.ajax.request(source, event, options);
+    
+    return false;
+
+}
+
+
+myfaces.html5._getArrayAsString = function(arr){
+   var retVal = "";
+   for(var key in arr){
+	   if(key){
+		   var elem = arr[key];
+		   if(elem){
+			   if(elem != "")
+				   retVal += elem + ",";
+		   }
+	   }
+   }
+   if(retVal != "")
+	   retVal = retVal.substring(0, retVal.length-1);
+   
+   return retVal;
+}
+
+myfaces.html5._convertStringToArray = function(str){
+   return str.split(",");
+}
+
+myfaces.html5._contains = function(arr, str){
+    if(! str)
+    	return false;
+	for(var i=0; i<arr.length; i++){
+	   if(arr[i]==str)
+		   return true;
+   }
+   return false;;
+}

Added: myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/resources/META-INF/tagClass12.vm
URL: http://svn.apache.org/viewvc/myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/resources/META-INF/tagClass12.vm?rev=980988&view=auto
==============================================================================
--- myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/resources/META-INF/tagClass12.vm (added)
+++ myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/resources/META-INF/tagClass12.vm Fri Jul 30 22:37:29 2010
@@ -0,0 +1,179 @@
+// WARNING: This file was automatically generated. Do not edit it directly,
+//          or you will lose your changes.
+/*
+ *  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 ${component.tagPackage};
+
+import javax.faces.component.UIComponent;
+import javax.el.ValueExpression;
+import javax.el.MethodExpression;
+import javax.faces.context.FacesContext;
+$utils.importTagClasses12($component)
+
+// Generated from class ${component.sourceClassName}.
+//
+// WARNING: This file was automatically generated. Do not edit it directly,
+//          or you will lose your changes.
+public class $utils.getClassFromFullClass($component.tagClass)
+#if (${component.tagSuperclass})
+    extends ${component.tagSuperclass}
+#else
+    extends javax.faces.webapp.UIComponentTag
+#end
+{
+    public $utils.getClassFromFullClass($component.tagClass)()
+    {    
+    }
+    
+    public String getComponentType()
+    {
+#if ($component.type)
+        return "$component.type";
+#else
+        return null;
+#end
+    }
+
+    public String getRendererType()
+    {
+#if ($component.rendererType && !($component.rendererType == ""))
+        return "$component.rendererType";
+#else
+        return null;
+#end
+    }
+
+#set ($propertyList = ${component.propertyTagList})
+#foreach( $property in $propertyList )
+#set ($field = $property.fieldName)
+#set ($type = $utils.getJspPropertyType12($property))
+#if ($property.isLiteralOnly() && $property.className == "boolean")
+#set ($type = "String")
+#end
+    private $type $field;
+    
+#set ($var = $utils.getVariableFromName($property.name))
+    public void $utils.getPrefixedPropertyName("set", $property.jspName)($type $var)
+    {
+        $field = $var;
+    }
+#end
+
+    protected void setProperties(UIComponent component)
+    {
+        if (!(component instanceof $component.className))
+        {
+            throw new IllegalArgumentException("Component "+
+                component.getClass().getName() +" is no $component.className");
+        }
+        
+        $component.className comp = ($component.className) component;
+        
+        super.setProperties(component);
+        
+        FacesContext context = getFacesContext();
+
+#foreach( $property in $propertyList )##            1
+#set ($field = $property.fieldName)
+#set ($type = $utils.getJspPropertyType12($property))
+#if ($property.isLiteralOnly() && $property.className == "boolean")
+#set ($type = "String")
+#end
+#if ($utils.isConverter($property.className))##                   2
+        if ($field != null)
+        {
+            if (!${field}.isLiteralText())
+            {
+                comp.setValueExpression("$property.name", $field);
+            }
+            else
+            {
+                String s = ${field}.getExpressionString();
+                if (s != null)
+                {            
+                    Converter converter = getFacesContext().getApplication().createConverter(s);
+                    comp.setConverter(converter);
+                }
+            }
+        }
+#elseif ($property.isMethodBinding())##                 2
+        if ($field != null)
+        {
+#if ($property.jspName == "actionListener")
+            comp.addActionListener(new MethodExpressionActionListener($field));
+#elseif ($property.jspName == "valueChangeListener")
+            comp.addValueChangeListener(new MethodExpressionValueChangeListener($field));
+#elseif ($property.jspName == "validator")
+            comp.addValidator(new MethodExpressionValidator($field));
+#elseif ($utils.isStringMethodBindingReturnType($property.methodBindingSignature))##3
+            MethodBinding mb;
+            if (isValueReference($field))
+            {
+                mb = context.getApplication().createMethodBinding(
+                    $field, $utils.getSignatureParams($property.methodBindingSignature));            
+            }
+            else
+            {
+                throw new IllegalStateException("Invalid expression " + $field);
+            }
+            comp.${utils.getPrefixedPropertyName("set",$property.name)}(mb);
+#else##                                                 3
+            MethodBinding mb = context.getApplication().createMethodBinding(
+                $field, $utils.getSignatureParams($property.methodBindingSignature));
+            comp.${utils.getPrefixedPropertyName("set",$property.name)}(mb);
+#end##                                                  3
+        }
+#elseif ($property.isMethodExpression())##            2
+        if ($field != null)
+        {
+#if ($property.jspName == "action")
+            comp.setActionExpression($field);
+#elseif ($property.jspName == "actionListener")
+            comp.addActionListener(new MethodExpressionActionListener($field));
+#else
+            comp.${utils.getPrefixedPropertyName("set",$property.name)}($field);
+#end        
+        }        
+#else##                                               2
+        if ($field != null)
+        {
+#if ($property.isLiteralOnly())##                         3
+#if ($utils.isPrimitiveClass($property.className))##               4
+            comp.getAttributes().put("$property.name", ${utils.getBoxedClass($property.className)}.valueOf($field));
+#else##                                                   4
+            comp.getAttributes().put("$property.name", $field);
+#end##                                                    4
+#else##                                                 3
+            comp.setValueExpression("$property.name", $field);
+#end##                                                  3
+        } 
+#end##                                                2
+#end##                                              1
+    }
+
+    public void release()
+    {
+        super.release();
+#foreach( $property in $propertyList )
+#set ($field = $property.fieldName)
+#set ($empty = "null")
+        $field = $empty;
+#end
+    }
+}

Added: myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/resources/META-INF/validatorClass12.vm
URL: http://svn.apache.org/viewvc/myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/resources/META-INF/validatorClass12.vm?rev=980988&view=auto
==============================================================================
--- myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/resources/META-INF/validatorClass12.vm (added)
+++ myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/resources/META-INF/validatorClass12.vm Fri Jul 30 22:37:29 2010
@@ -0,0 +1,215 @@
+## Velocity template used to generate JSF1.2-compatible validator classes
+## from validator meta-data.
+##
+## Note that there are only one type of validator generation:
+##  * "subclass mode" (use annotated class as a parent class)
+##
+## Variable $validator refers to a ValidatorMeta object to process
+## Variable $utils refers to an instance of MyfacesUtils.
+##
+##
+## The java package of the generated class is always the same as
+## the package in which the annotated class exists.
+##
+/*
+ *  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 ${validator.packageName};
+
+import javax.el.ValueExpression;
+import javax.faces.context.FacesContext;
+$utils.importTagClasses($validator)
+
+#if ($validator.isTemplate())
+#set ($generatedClassParent = $validator.sourceClassParentClassName)
+#else
+#set ($generatedClassParent = $validator.sourceClassName)
+#end
+// Generated from class ${validator.sourceClassName}.
+//
+// WARNING: This file was automatically generated. Do not edit it directly,
+//          or you will lose your changes.
+public class ${utils.getClassFromFullClass($validator.className)} extends $generatedClassParent
+#if ($validator.implements)
+    implements $validator.implements
+#end
+{
+
+#if ($validator.validatorId)
+    static public final String VALIDATOR_ID = 
+        "$validator.validatorId";
+#end
+
+    public ${utils.getClassFromFullClass($validator.className)}()
+    {
+    }
+    
+#set ($propertyList = ${validator.propertyValidatorList})
+
+#foreach( $property in $propertyList )
+#set ($field = $property.fieldName)
+#set ($type = $utils.getClassFromFullClass($property.className))
+#if($utils.getDefaultValueField($property)) 
+#set ($defaultValue = $utils.getDefaultValueField($property))
+#else
+#set ($defaultValue = false)
+#end
+    // Property: $property.name
+#if ($property.isLiteralOnly() || $property.isTagExcluded() )
+    private $type $field #if($defaultValue) = $defaultValue;#{else};#{end}
+
+     
+#else
+    private $type $field;
+    
+#end
+#if($utils.isPrimitiveClass($type) && !$property.isTagExcluded() )
+    private boolean ${field}Set;
+    
+#if ($property.isSetMethod())
+    $property.setMethodScope boolean $utils.getPrefixedPropertyName("isSet", $property.name)()
+    {
+        return ${field}Set;
+    }
+#end
+#end
+#if($property.isLocalMethod())
+#if("boolean" == $type)
+#set ($methodName = $utils.getPrefixedPropertyName("isLocal", $property.name))
+#else
+#set ($methodName = $utils.getPrefixedPropertyName("getLocal", $property.name))
+#end
+    final $property.localMethodScope $type ${methodName}()
+    {
+        return $field;
+    }
+     
+#end
+    public $type $utils.getMethodReaderFromProperty($property.name, $type)()
+    {
+#if ($property.isTagExcluded() || $property.isLiteralOnly())
+        return $field;
+#else
+#if ($utils.isPrimitiveClass($type))
+        if (${field}Set)
+#else
+        if ($field != null)
+#end
+        {
+            return $field;
+        }
+        ValueExpression vb = getValueExpression("$property.name");
+        if (vb != null)
+        {
+#if ($utils.isPrimitiveClass($type))
+            return ($utils.castIfNecessary($type) vb.getValue(getFacesContext().getELContext())).${type}Value();
+#else
+#set ($pritype = $utils.getPrimitiveType($property.className))
+#if ($utils.isPrimitiveClass($pritype))
+            Object value = vb == null ? null : vb.getValue(getFacesContext().getELContext());
+            if (!(value instanceof $type)){
+                value = ${type}.valueOf(value.toString());
+            }            
+            return $utils.castIfNecessary($type) value;
+#else
+            return $utils.castIfNecessary($type) vb.getValue(getFacesContext().getELContext());
+#end
+#end
+        }
+#if ($defaultValue)
+        return $defaultValue; 
+#elseif ($utils.isPrimitiveClass($type))
+        return $utils.primitiveDefaultValue($type);
+#else       
+        return null;
+#end
+#end
+    }
+
+    public void $utils.getPrefixedPropertyName("set", $property.name)($type $utils.getVariableFromName($property.name))
+    {
+        this.$field = $utils.getVariableFromName($property.name);
+#if ($utils.isPrimitiveClass($type) && !$property.isTagExcluded() )
+        this.${field}Set = true;        
+#end
+    }
+#end
+
+    public Object saveState(FacesContext facesContext)
+    {
+#set ($primitiveCount = $propertyList.size() + 1)
+#foreach( $property in $propertyList )
+#if($utils.isPrimitiveClass($property.className))
+#set ($primitiveCount = $primitiveCount + 1)
+#end
+#end
+        Object[] values = new Object[$primitiveCount];
+        values[0] = super.saveState(facesContext);
+#set ($arrayIndex = 0)
+#foreach( $property in $propertyList )
+#set ($field = $property.fieldName)
+#set ($type = $property.className)
+#set ($arrayIndex = $arrayIndex + 1)
+#if ($property.jspName == "validator" && $property.isMethodBinding() )
+        values[$arrayIndex] = saveAttachedState(facesContext,${field}List);
+#elseif ( $property.isStateHolder() )## || $utils.isConverter($type)
+        values[$arrayIndex] = saveAttachedState(facesContext,$field);
+#elseif($utils.isPrimitiveClass($type))
+        values[$arrayIndex] = ${utils.getBoxedClass($type)}.valueOf($field);
+#else
+        values[$arrayIndex] = $field;
+#end
+#if($utils.isPrimitiveClass($type) && !$property.isTagExcluded())
+#set ($arrayIndex = $arrayIndex + 1)
+        values[$arrayIndex] = Boolean.valueOf(${field}Set);
+#end
+#end
+        return values; 
+    }
+
+    public void restoreState(FacesContext facesContext, Object state)
+    {
+        Object[] values = (Object[])state;
+        super.restoreState(facesContext,values[0]);
+#set ($arrayIndex = 0)
+#foreach( $property in $propertyList )
+#set ($field = $property.fieldName)
+#set ($type = $property.className)
+#set ($arrayIndex = $arrayIndex + 1)
+#if ( $property.isStateHolder() )
+#if ($property.jspName == "validator" && $property.isMethodBinding() )
+        ${field}List = (List<Validator>) restoreAttachedState(facesContext,values[$arrayIndex]);
+#elseif ($utils.isList($type))
+        $field = (List) restoreAttachedState(facesContext,values[$arrayIndex]);
+#else
+        $field = $utils.castIfNecessary($type) restoreAttachedState(facesContext,values[$arrayIndex]); 
+#end
+#elseif ($utils.isConverter($type)) 
+        $field = (Converter) restoreAttachedState(facesContext,values[$arrayIndex]);
+#elseif ($utils.isPrimitiveClass($type))
+        $field = ($utils.castIfNecessary($type) values[$arrayIndex]).${type}Value();
+#else
+        $field = $utils.castIfNecessary($type) values[$arrayIndex];
+#end
+#if($utils.isPrimitiveClass($type) && !$property.isTagExcluded() )
+#set ($arrayIndex = $arrayIndex + 1)
+        ${field}Set = ((Boolean) values[$arrayIndex]).booleanValue();
+#end
+#end
+    }
+}

Added: myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/resources/META-INF/validatorTagClass12.vm
URL: http://svn.apache.org/viewvc/myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/resources/META-INF/validatorTagClass12.vm?rev=980988&view=auto
==============================================================================
--- myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/resources/META-INF/validatorTagClass12.vm (added)
+++ myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/resources/META-INF/validatorTagClass12.vm Fri Jul 30 22:37:29 2010
@@ -0,0 +1,162 @@
+// WARNING: This file was automatically generated. Do not edit it directly,
+//          or you will lose your changes.
+/*
+ *  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 $utils.getPackageFromFullClass($validator.tagClass);
+
+import javax.faces.context.FacesContext;
+import javax.el.ValueExpression;
+import javax.faces.validator.Validator;
+import javax.faces.application.Application;
+import javax.servlet.jsp.JspException;
+$utils.importTagClasses($validator)
+
+// Generated from class ${validator.sourceClassName}.
+//
+// WARNING: This file was automatically generated. Do not edit it directly,
+//          or you will lose your changes.
+public class $utils.getClassFromFullClass($validator.tagClass)
+#if (${validator.tagSuperclass})
+    extends ${validator.tagSuperclass}
+#else
+    extends javax.faces.webapp.ValidatorELTag
+#end
+{
+#if ($validator.serialuidtag)
+    private static final long serialVersionUID = ${validator.serialuidtag}; 
+#end  
+
+    public $utils.getClassFromFullClass($validator.tagClass)()
+    {    
+    }    
+#set ($propertyList = ${validator.propertyTagList})
+#foreach( $property in $propertyList )
+#set ($field = $property.fieldName)
+#set ($type = $utils.getJspPropertyType12($property))
+ 
+    private $type $field;
+    
+#set ($var = $utils.getVariableFromName($property.name))
+    public void $utils.getPrefixedPropertyName("set", $property.jspName)($type $var)
+    {
+        $field = $var;
+    }
+#end
+
+    protected Validator createValidator() throws JspException {
+        String validatorId = "$validator.validatorId";
+        Application appl = FacesContext.getCurrentInstance().getApplication();
+        Validator validator = (Validator)appl.createValidator(validatorId);
+        _setProperties(validator);
+        return validator;
+    }
+    
+    protected void _setProperties(Validator val) throws JspException {
+        super._setProperties(val);    
+        FacesContext facesContext = FacesContext.getCurrentInstance();
+
+        $validator.className validator = ($validator.className) val;
+#foreach( $property in $propertyList )
+#set ($field = $property.fieldName)
+#set ($type = $utils.getJspPropertyType12($property))
+#set ($className = $utils.getPrimitiveType($property.className))
+        if ($field != null)
+        {
+#if ($property.isLiteralOnly())
+#if ($utils.isPrimitiveClass($property.className))
+                validator.${utils.getPrefixedPropertyName("set",$property.name)}(${utils.getBoxedClass($className)}.valueOf($field).${property.className}Value());
+#elseif ($utils.isPrimitiveClass($className))
+                validator.${utils.getPrefixedPropertyName("set",$property.name)}(${utils.getBoxedClass($className)}.valueOf($field));
+#else
+                validator.${utils.getPrefixedPropertyName("set",$property.name)}($field);
+#end
+#else        
+            if (!${field}.isLiteralText())
+            {
+                validator.setValueExpression("$property.name", $field);
+            }
+            else
+            {
+#if ($utils.isPrimitiveClass($property.className))
+                Object ${field}Value = ${field}.getValue(facesContext.getELContext());
+                if (${field}Value != null){
+                    if (${field}Value instanceof ${utils.getBoxedClass($className)}){
+                        validator.${utils.getPrefixedPropertyName("set",$property.name)}(
+                            ((${utils.getBoxedClass($className)})${field}Value).${property.className}Value());                        
+                    }
+                    else
+                    {
+                        validator.${utils.getPrefixedPropertyName("set",$property.name)}(
+                            ${utils.getBoxedClass($className)}.valueOf(${field}Value.toString()).${property.className}Value());
+                    }                    
+                }
+#elseif ($utils.isPrimitiveClass($className))
+                Object ${field}Value = ${field}.getValue(facesContext.getELContext());
+                if (${field}Value != null){
+                    if (${field}Value instanceof ${utils.getBoxedClass($className)}){
+                        validator.${utils.getPrefixedPropertyName("set",$property.name)}(
+                            ((${utils.getBoxedClass($className)})${field}Value));                        
+                    }
+                    else
+                    {
+                        validator.${utils.getPrefixedPropertyName("set",$property.name)}(
+                            ${utils.getBoxedClass($className)}.valueOf(${field}Value.toString()));
+                    }                    
+                }
+#elseif ($utils.getClassFromFullClass($property.className) == "String")
+                Object ${field}Value = ${field}.getValue(facesContext.getELContext());
+                if (${field}Value != null)
+                {
+                    validator.${utils.getPrefixedPropertyName("set",$property.name)}(
+                        ($property.className)  ${field}Value.toString());                
+                }
+#elseif ($property.className == "java.lang.String[]")
+                try
+                {
+                    String[] value = org.apache.myfaces.commons.util.TagUtils.getStringArray(${field}.getValue(facesContext.getELContext()));
+                    validator.${utils.getPrefixedPropertyName("set",$property.name)}(value);
+                }
+                catch (java.text.ParseException pe)
+                {
+                  throw new JspException(
+                    pe.getMessage() + ": " + "Position " + pe.getErrorOffset());
+                }
+#else
+                validator.${utils.getPrefixedPropertyName("set",$property.name)}(($property.className)  ${field}.getValue(facesContext.getELContext()));
+#end
+            }
+#end
+        }
+#end
+    }
+
+    public void release()
+    {
+        super.release();
+#foreach( $property in $propertyList )
+#set ($field = $property.fieldName)
+#if($utils.getJspPropertyType12($property) == "boolean")
+#set ($empty = "false")
+#else
+#set ($empty = "null")
+#end
+        $field = $empty;
+#end
+    }
+}

Added: myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-examples/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-examples/pom.xml?rev=980988&view=auto
==============================================================================
--- myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-examples/pom.xml (added)
+++ myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-examples/pom.xml Fri Jul 30 22:37:29 2010
@@ -0,0 +1,93 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <artifactId>html5-comp-lib-project</artifactId>
+        <groupId>org.apache.myfaces.html5-comp-lib</groupId>
+        <version>0.0.3-SNAPSHOT</version>
+    </parent>
+
+    <groupId>org.apache.myfaces.html5-comp-lib</groupId>
+    <artifactId>html5-comp-lib-examples</artifactId>
+    <packaging>war</packaging>
+    <name>Showcase of Html5 Renderkit for Apache MyFaces</name>
+    <version>0.0.3-SNAPSHOT</version>
+
+    <dependencies>
+    	<dependency>
+    		<groupId>org.apache.myfaces.html5-comp-lib</groupId>
+    		<artifactId>html5-comp-lib-core</artifactId>
+    		<version>0.0.3-SNAPSHOT</version>
+    	</dependency>
+        
+        <dependency>
+            <groupId>org.apache.myfaces.html5-comp-lib</groupId>
+            <artifactId>myfaces-shared-html5</artifactId>
+            <version>0.0.3-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
+            <version>2.5</version>
+            <scope>compile</scope>
+        </dependency>
+        
+        <dependency>
+            <groupId>javax.servlet.jsp</groupId>
+            <artifactId>jsp-api</artifactId>
+            <version>2.1</version>
+            <scope>provided</scope>
+        </dependency>
+        
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>jstl</artifactId>
+            <version>1.2</version>
+            <scope>provided</scope>
+        </dependency>
+        
+        <dependency>
+            <groupId>commons-logging</groupId>
+            <artifactId>commons-logging</artifactId>
+            <version>1.1.1</version>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>log4j</groupId>
+            <artifactId>log4j</artifactId>
+            <version>1.2.13</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>javax.el</groupId>
+            <artifactId>el-api</artifactId>
+            <version>1.0</version>
+            <scope>provided</scope>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.apache.myfaces.buildtools</groupId>
+            <artifactId>myfaces-builder-annotations</artifactId>
+            <version>1.0.5</version>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.mortbay.jetty</groupId>
+                <artifactId>maven-jetty-plugin</artifactId>
+                <version>6.1.22</version>
+                <configuration>
+                    <scanIntervalSeconds>10</scanIntervalSeconds>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>
\ No newline at end of file

Added: myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-examples/src/main/java/org/apache/myfaces/html5/examples/showcase/beans/DateTimeBean.java
URL: http://svn.apache.org/viewvc/myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-examples/src/main/java/org/apache/myfaces/html5/examples/showcase/beans/DateTimeBean.java?rev=980988&view=auto
==============================================================================
--- myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-examples/src/main/java/org/apache/myfaces/html5/examples/showcase/beans/DateTimeBean.java (added)
+++ myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-examples/src/main/java/org/apache/myfaces/html5/examples/showcase/beans/DateTimeBean.java Fri Jul 30 22:37:29 2010
@@ -0,0 +1,52 @@
+/*
+ * 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.html5.examples.showcase.beans;
+
+import java.util.Date;
+
+import javax.faces.bean.ManagedBean;
+
+@ManagedBean(name="dateTimeBean")
+public class DateTimeBean
+{
+
+    private Date someDateTime;
+    private Date secondDateTime;
+
+    public Date getSomeDateTime()
+    {
+        return someDateTime;
+    }
+
+    public void setSomeDateTime(Date someDateTime)
+    {
+        this.someDateTime = someDateTime;
+    }
+
+    public Date getSecondDateTime()
+    {
+        return secondDateTime;
+    }
+
+    public void setSecondDateTime(Date secondDateTime)
+    {
+        this.secondDateTime = secondDateTime;
+    }
+
+}

Added: myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-examples/src/main/java/org/apache/myfaces/html5/examples/showcase/beans/DnDBean.java
URL: http://svn.apache.org/viewvc/myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-examples/src/main/java/org/apache/myfaces/html5/examples/showcase/beans/DnDBean.java?rev=980988&view=auto
==============================================================================
--- myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-examples/src/main/java/org/apache/myfaces/html5/examples/showcase/beans/DnDBean.java (added)
+++ myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-examples/src/main/java/org/apache/myfaces/html5/examples/showcase/beans/DnDBean.java Fri Jul 30 22:37:29 2010
@@ -0,0 +1,120 @@
+/*
+ * 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.html5.examples.showcase.beans;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.SessionScoped;
+import javax.faces.event.AbortProcessingException;
+
+import org.apache.myfaces.html5.event.DropEvent;
+
+@ManagedBean(name="dndBean")
+@SessionScoped
+public class DnDBean implements Serializable {
+
+	private String someParam;
+
+	public String getSomeParam() {
+		return someParam;
+	}
+
+	public void setSomeParam(String someParam) {
+		this.someParam = someParam;
+	}
+	
+	public void processDropBehavior(DropEvent event) throws AbortProcessingException{
+	    someParam = "";
+	    someParam += "Drop Time : " + new Date() + "<br/>\n";
+        someParam += "DropEvent.getParam() : " + event.getParam() + "<br/>\n";
+        Map<String, String> dropDataMap = event.getDropDataMap();
+        if(dropDataMap != null){
+            Set<String> keySet = dropDataMap.keySet();
+            for (String key : keySet)
+            {
+                someParam += key + "  :  " + dropDataMap.get(key) + "<br/>\n";
+            }
+        }
+    }
+	
+	private List<SportsTeam> teams;
+	
+	public DnDBean()
+    {
+	    initTeams();
+    }
+
+    public String initTeams()
+    {
+        teams = new ArrayList<SportsTeam>();
+	    
+	    teams.add(new SportsTeam("FCB", "FC Barcelona", TeamType.FOOTBALL));
+	    teams.add(new SportsTeam("GS", "Galatasaray SK", TeamType.FOOTBALL));
+	    teams.add(new SportsTeam("RM", "Real Madrid", TeamType.FOOTBALL));
+	    teams.add(new SportsTeam("KS", "Kayserispor", TeamType.FOOTBALL));
+	    teams.add(new SportsTeam("LAL", "LA Lakers", TeamType.BASKETBALL));
+	    teams.add(new SportsTeam("BOC", "Boston Celtics", TeamType.BASKETBALL));
+	    
+	    return null;
+    }
+	
+	public List<SportsTeam> getTeams()
+    {
+        return teams;
+    }
+	
+	public void processTeamDrop(DropEvent event) throws AbortProcessingException{
+	    String param = event.getParam();
+	    if(param == null || param.isEmpty())
+	        return;
+	    
+	    SportsTeam droppedTeam = null;
+	    for (SportsTeam team : this.teams)
+        {
+            if(team.getId().equals(param)){
+                droppedTeam = team;
+                break;
+            }
+        }
+	    
+	    boolean removed = teams.remove(droppedTeam);
+	    
+	    someParam = "Team with Id " + param + " removed : " + removed; 
+	}
+	
+
+	/////////////
+	
+	public String someAction() {
+        System.out.println("someAction");
+        return null;
+    }
+	
+	public String getTest()
+    {
+	    return "test";
+    }
+}

Added: myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-examples/src/main/java/org/apache/myfaces/html5/examples/showcase/beans/InputColorBean.java
URL: http://svn.apache.org/viewvc/myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-examples/src/main/java/org/apache/myfaces/html5/examples/showcase/beans/InputColorBean.java?rev=980988&view=auto
==============================================================================
--- myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-examples/src/main/java/org/apache/myfaces/html5/examples/showcase/beans/InputColorBean.java (added)
+++ myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-examples/src/main/java/org/apache/myfaces/html5/examples/showcase/beans/InputColorBean.java Fri Jul 30 22:37:29 2010
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.html5.examples.showcase.beans;
+
+import javax.faces.bean.ManagedBean;
+
+@ManagedBean(name="inputColorBean")
+public class InputColorBean
+{
+    private String color = "#FFCCAA";
+
+    public String getColor()
+    {
+        return color;
+    }
+
+    public void setColor(String color)
+    {
+        this.color = color;
+    }
+
+}

Added: myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-examples/src/main/java/org/apache/myfaces/html5/examples/showcase/beans/InputNumberBean.java
URL: http://svn.apache.org/viewvc/myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-examples/src/main/java/org/apache/myfaces/html5/examples/showcase/beans/InputNumberBean.java?rev=980988&view=auto
==============================================================================
--- myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-examples/src/main/java/org/apache/myfaces/html5/examples/showcase/beans/InputNumberBean.java (added)
+++ myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-examples/src/main/java/org/apache/myfaces/html5/examples/showcase/beans/InputNumberBean.java Fri Jul 30 22:37:29 2010
@@ -0,0 +1,83 @@
+/*
+ * 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.html5.examples.showcase.beans;
+
+import javax.faces.bean.ManagedBean;
+
+@ManagedBean(name="inputNumberBean")
+public class InputNumberBean
+{
+
+    private int first;
+    private double second;
+    private int third;
+    private int fourth;
+    private int fifth;
+
+    public int getFirst()
+    {
+        return first;
+    }
+
+    public void setFirst(int first)
+    {
+        this.first = first;
+    }
+
+    public double getSecond()
+    {
+        return second;
+    }
+
+    public void setSecond(double second)
+    {
+        this.second = second;
+    }
+
+    public int getThird()
+    {
+        return third;
+    }
+
+    public void setThird(int third)
+    {
+        this.third = third;
+    }
+
+    public int getFourth()
+    {
+        return fourth;
+    }
+
+    public void setFourth(int fourth)
+    {
+        this.fourth = fourth;
+    }
+
+    public int getFifth()
+    {
+        return fifth;
+    }
+
+    public void setFifth(int fifth)
+    {
+        this.fifth = fifth;
+    }
+
+}