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/12/12 23:33:21 UTC

svn commit: r1044945 - in /myfaces/gsoc/html5-comp-lib/trunk: html5-comp-lib-core/src/main/java/org/apache/myfaces/html5/component/output/ html5-comp-lib-core/src/main/java/org/apache/myfaces/html5/renderkit/output/ html5-comp-lib-core/src/main/java/or...

Author: aliok
Date: Sun Dec 12 22:33:20 2010
New Revision: 1044945

URL: http://svn.apache.org/viewvc?rev=1044945&view=rev
Log:
Html5
Meter and progress components

Added:
    myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/java/org/apache/myfaces/html5/component/output/
    myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/java/org/apache/myfaces/html5/component/output/AbstractMeter.java
    myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/java/org/apache/myfaces/html5/component/output/AbstractProgress.java
    myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/java/org/apache/myfaces/html5/renderkit/output/
    myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/java/org/apache/myfaces/html5/renderkit/output/MeterRenderer.java
    myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/java/org/apache/myfaces/html5/renderkit/output/ProgressRenderer.java
    myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-examples/src/main/webapp/meterProgress/
    myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-examples/src/main/webapp/meterProgress.xhtml
      - copied, changed from r1044533, myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-examples/src/main/webapp/inputColor.xhtml
    myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-examples/src/main/webapp/meterProgress/meterProgress01.xhtml
      - copied, changed from r1044533, myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-examples/src/main/webapp/inputColor/inputColor01.xhtml
Modified:
    myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/java/org/apache/myfaces/html5/renderkit/util/HTML5.java
    myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/java/org/apache/myfaces/html5/renderkit/util/JsfProperties.java
    myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/java/org/apache/myfaces/html5/renderkit/util/PassThroughAttributes.java
    myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/java/org/apache/myfaces/html5/renderkit/util/PassThroughClientBehaviorEvents.java
    myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-examples/src/main/webapp/index.xhtml

Added: myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/java/org/apache/myfaces/html5/component/output/AbstractMeter.java
URL: http://svn.apache.org/viewvc/myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/java/org/apache/myfaces/html5/component/output/AbstractMeter.java?rev=1044945&view=auto
==============================================================================
--- myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/java/org/apache/myfaces/html5/component/output/AbstractMeter.java (added)
+++ myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/java/org/apache/myfaces/html5/component/output/AbstractMeter.java Sun Dec 12 22:33:20 2010
@@ -0,0 +1,40 @@
+package org.apache.myfaces.html5.component.output;
+
+import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFComponent;
+import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFProperty;
+import org.apache.myfaces.html5.component.properties.*;
+
+@JSFComponent(
+        name = "hx:meter",
+        clazz = "org.apache.myfaces.html5.component.output.Meter",
+        tagClass = "org.apache.myfaces.html5.tag.output.MeterTag",
+        defaultRendererType = "org.apache.myfaces.html5.Meter",
+        family = "org.apache.myfaces.Meter",
+        type = "org.apache.myfaces.html5.Meter",
+        implementz = "javax.faces.component.behavior.ClientBehaviorHolder",
+        defaultEventName="click"
+)
+public abstract class AbstractMeter extends javax.faces.component.UIComponentBase implements
+        javax.faces.component.behavior.ClientBehaviorHolder, Html5GlobalProperties, AccesskeyProperty,
+        TabindexProperty, MouseEventProperties, GlobalEventProperties {
+
+    @JSFProperty(required = true, deferredValueType = "java.lang.Double")
+    public abstract Double getValue();
+
+    @JSFProperty(required = false, deferredValueType = "java.lang.Double", defaultValue = "0.0")
+    public abstract Double getMinimum();
+
+    @JSFProperty(required = false, deferredValueType = "java.lang.Double", defaultValue = "1.0")
+    public abstract Double getMaximum();
+
+    @JSFProperty(required = false, deferredValueType = "java.lang.Double")
+    public abstract Double getLow();
+
+    @JSFProperty(required = false, deferredValueType = "java.lang.Double")
+    public abstract Double getHigh();
+
+    @JSFProperty(required = false, deferredValueType = "java.lang.Double")
+    public abstract Double getOptimum();
+
+
+}

Added: myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/java/org/apache/myfaces/html5/component/output/AbstractProgress.java
URL: http://svn.apache.org/viewvc/myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/java/org/apache/myfaces/html5/component/output/AbstractProgress.java?rev=1044945&view=auto
==============================================================================
--- myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/java/org/apache/myfaces/html5/component/output/AbstractProgress.java (added)
+++ myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/java/org/apache/myfaces/html5/component/output/AbstractProgress.java Sun Dec 12 22:33:20 2010
@@ -0,0 +1,34 @@
+package org.apache.myfaces.html5.component.output;
+
+import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFComponent;
+import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFProperty;
+import org.apache.myfaces.html5.component.properties.*;
+
+/**
+ * Convenience component for Html5 progress element. <br/>
+ *
+ * @author Ali Ok
+ *
+ */
+@JSFComponent(
+        name = "hx:progress",
+        clazz = "org.apache.myfaces.html5.component.output.Progress",
+        tagClass = "org.apache.myfaces.html5.tag.output.ProgressTag",
+        defaultRendererType = "org.apache.myfaces.html5.Progress",
+        family = "org.apache.myfaces.Progress",
+        type = "org.apache.myfaces.html5.Progress",
+        implementz = "javax.faces.component.behavior.ClientBehaviorHolder",
+        defaultEventName="click"
+)
+public abstract class AbstractProgress extends javax.faces.component.UIComponentBase implements
+        javax.faces.component.behavior.ClientBehaviorHolder, Html5GlobalProperties, AccesskeyProperty,
+        TabindexProperty, MouseEventProperties, GlobalEventProperties
+{
+
+    @JSFProperty(required = false, deferredValueType = "java.lang.Double")
+    public abstract Double getValue();
+
+    @JSFProperty(required = false, deferredValueType = "java.lang.Double", defaultValue = "1.0")
+    public abstract Double getMaximum();
+    
+}

Added: myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/java/org/apache/myfaces/html5/renderkit/output/MeterRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/java/org/apache/myfaces/html5/renderkit/output/MeterRenderer.java?rev=1044945&view=auto
==============================================================================
--- myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/java/org/apache/myfaces/html5/renderkit/output/MeterRenderer.java (added)
+++ myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/java/org/apache/myfaces/html5/renderkit/output/MeterRenderer.java Sun Dec 12 22:33:20 2010
@@ -0,0 +1,126 @@
+package org.apache.myfaces.html5.renderkit.output;
+
+import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFRenderer;
+import org.apache.myfaces.html5.component.output.AbstractMeter;
+import org.apache.myfaces.html5.renderkit.panel.DivRenderer;
+import org.apache.myfaces.html5.renderkit.util.HTML5;
+import org.apache.myfaces.html5.renderkit.util.Html5RendererUtils;
+import org.apache.myfaces.html5.renderkit.util.PassThroughAttributes;
+import org.apache.myfaces.html5.renderkit.util.PassThroughClientBehaviorEvents;
+import org.apache.myfaces.shared_html5.renderkit.RendererUtils;
+import org.apache.myfaces.shared_html5.renderkit.html.HtmlRenderer;
+
+import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
+import javax.faces.component.behavior.ClientBehavior;
+import javax.faces.component.behavior.ClientBehaviorHolder;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * User: Ali Ok (ali.ok@innflow.com)
+ * Date: 2010-12-12
+ * Time: 22:55:45
+ */
+@JSFRenderer(renderKitId = "HTML_BASIC", family = "org.apache.myfaces.Meter", type = "org.apache.myfaces.html5.Meter")
+public class MeterRenderer extends HtmlRenderer
+{
+    private static final Logger log = Logger.getLogger(DivRenderer.class.getName());
+
+    @Override
+    public void encodeBegin(FacesContext facesContext, UIComponent uiComponent) throws IOException {
+        if (log.isLoggable(Level.FINE))
+            log.fine("encodeBegin");
+
+        super.encodeBegin(facesContext, uiComponent);
+
+        RendererUtils.checkParamValidity(facesContext, uiComponent, AbstractMeter.class);
+
+        ResponseWriter writer = facesContext.getResponseWriter();
+
+        AbstractMeter component = (AbstractMeter) uiComponent;
+
+        writer.startElement("meter", uiComponent);
+
+        // write id
+        writer.writeAttribute(HTML5.ID_ATTR, component.getClientId(facesContext), null);
+
+        final Double value = component.getValue();
+        final Double maximum = component.getMaximum();
+        final Double minimum = component.getMinimum();
+
+        if(minimum > maximum){
+            throw new FacesException("Minimum value of meter component cannot be larger than maximum value, but " + minimum + " > " + maximum);
+        }
+
+        if(value < minimum){
+            throw new FacesException("Value of meter component cannot be smaller than minimum value, but " + value + " < " + minimum);
+        }
+
+        if(value > maximum ){
+            throw new FacesException("Value of meter component cannot be larger than maximum value, but " + value + " > " + maximum);
+        }
+
+        final Double low = component.getLow();
+        final Double high = component.getHigh();
+        final Double optimum = component.getOptimum();
+
+        if(low!=null && (low < minimum || low>maximum)){
+            throw new FacesException("Low value of meter component must be between minimum value and maximum value. Low :" + low + " , minimum : " + minimum + " , maximum : " + maximum);
+        }
+
+        if(high!=null && (high < minimum || high>maximum)){
+            throw new FacesException("High value of meter component must be between minimum value and maximum value. High :" + high + " , minimum : " + minimum + " , maximum : " + maximum);
+        }
+
+        if(optimum!=null && (optimum < minimum || optimum>maximum)){
+            throw new FacesException("Optimum value of meter component must be between minimum value and maximum value. Optimum :" + optimum + " , minimum : " + minimum + " , maximum : " + maximum);
+        }
+
+        if(low!=null && high!=null && low>high){
+            throw new FacesException("Low value of meter component cannot be larger than high value, but " + low + " > " + high);
+        }
+
+        if(low!=null && optimum!=null && optimum < low ){
+            throw new FacesException("Optimum value of meter component cannot be smaller than low value, but " + optimum + " < " + low);
+        }
+
+        if(high!=null && optimum!=null && optimum > high ){
+            throw new FacesException("Optimum value of meter component cannot be larger than high value, but " + optimum + " > " + high);
+        }
+
+
+        renderPassThruAttrsAndEvents(facesContext, uiComponent);
+    }
+
+    // to make this extendible
+    protected void renderPassThruAttrsAndEvents(FacesContext facesContext, UIComponent uiComponent) throws IOException
+    {
+        Map<String, List<ClientBehavior>> clientBehaviors = ((ClientBehaviorHolder) uiComponent).getClientBehaviors();
+
+        Html5RendererUtils.renderPassThroughClientBehaviorEventHandlers(facesContext, uiComponent,
+                PassThroughClientBehaviorEvents.METER, clientBehaviors);
+
+        Html5RendererUtils.renderPassThroughAttributes(facesContext.getResponseWriter(), uiComponent,
+                PassThroughAttributes.METER);
+    }
+
+    @Override
+    public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException
+    {
+        if (log.isLoggable(Level.FINE))
+            log.fine("encodeEnd");
+        // just close the element
+        super.encodeEnd(facesContext, component);
+
+        ResponseWriter writer = facesContext.getResponseWriter();
+
+        writer.endElement("meter");
+    }
+}
+

Added: myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/java/org/apache/myfaces/html5/renderkit/output/ProgressRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/java/org/apache/myfaces/html5/renderkit/output/ProgressRenderer.java?rev=1044945&view=auto
==============================================================================
--- myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/java/org/apache/myfaces/html5/renderkit/output/ProgressRenderer.java (added)
+++ myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/java/org/apache/myfaces/html5/renderkit/output/ProgressRenderer.java Sun Dec 12 22:33:20 2010
@@ -0,0 +1,100 @@
+package org.apache.myfaces.html5.renderkit.output;
+
+import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFRenderer;
+import org.apache.myfaces.html5.component.media.AbstractMedia;
+import org.apache.myfaces.html5.component.output.AbstractProgress;
+import org.apache.myfaces.html5.renderkit.panel.DivRenderer;
+import org.apache.myfaces.html5.renderkit.util.HTML5;
+import org.apache.myfaces.html5.renderkit.util.Html5RendererUtils;
+import org.apache.myfaces.html5.renderkit.util.PassThroughAttributes;
+import org.apache.myfaces.html5.renderkit.util.PassThroughClientBehaviorEvents;
+import org.apache.myfaces.shared_html5.renderkit.JSFAttr;
+import org.apache.myfaces.shared_html5.renderkit.RendererUtils;
+import org.apache.myfaces.shared_html5.renderkit.html.HtmlRenderer;
+
+import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
+import javax.faces.component.behavior.ClientBehavior;
+import javax.faces.component.behavior.ClientBehaviorHolder;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * Progress renderer.
+ *
+ * @author Ali Ok
+ *
+ */
+@JSFRenderer(renderKitId = "HTML_BASIC", family = "org.apache.myfaces.Progress", type = "org.apache.myfaces.html5.Progress")
+public class ProgressRenderer extends HtmlRenderer
+{
+    private static final Logger log = Logger.getLogger(DivRenderer.class.getName());
+
+    @Override
+    public void encodeBegin(FacesContext facesContext, UIComponent uiComponent) throws IOException {
+        if (log.isLoggable(Level.FINE))
+            log.fine("encodeBegin");
+
+        super.encodeBegin(facesContext, uiComponent);
+
+        RendererUtils.checkParamValidity(facesContext, uiComponent, AbstractProgress.class);
+
+        ResponseWriter writer = facesContext.getResponseWriter();
+
+        AbstractProgress component = (AbstractProgress) uiComponent;
+
+        writer.startElement("progress", uiComponent);
+
+        // write id
+        writer.writeAttribute(HTML5.ID_ATTR, component.getClientId(facesContext), null);
+
+        final Double value = component.getValue();
+        if(value!= null && value < 0){
+            throw new FacesException("Value of progress component cannot be negative, but " + value);
+        }
+
+        final Double maximum = component.getMaximum();
+        if(maximum!=null && maximum < 0){
+            throw new FacesException("Maximum value of progress component cannot be negative, but " + maximum);
+        }
+
+        if(value!=null && maximum!=null){
+            if(value > maximum){
+                throw new FacesException("Value of progress component cannot be greater than the maximum value. But " + value + " > " + maximum);
+            }
+        }
+
+
+        renderPassThruAttrsAndEvents(facesContext, uiComponent);
+    }
+
+    // to make this extendible
+    protected void renderPassThruAttrsAndEvents(FacesContext facesContext, UIComponent uiComponent) throws IOException
+    {
+        Map<String, List<ClientBehavior>> clientBehaviors = ((ClientBehaviorHolder) uiComponent).getClientBehaviors();
+
+        Html5RendererUtils.renderPassThroughClientBehaviorEventHandlers(facesContext, uiComponent,
+                PassThroughClientBehaviorEvents.PROGRESS, clientBehaviors);
+
+        Html5RendererUtils.renderPassThroughAttributes(facesContext.getResponseWriter(), uiComponent,
+                PassThroughAttributes.PROGRESS);
+    }
+
+    @Override
+    public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException
+    {
+        if (log.isLoggable(Level.FINE))
+            log.fine("encodeEnd");
+        // just close the element
+        super.encodeEnd(facesContext, component);
+
+        ResponseWriter writer = facesContext.getResponseWriter();
+
+        writer.endElement("progress");
+    }
+}

Modified: myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/java/org/apache/myfaces/html5/renderkit/util/HTML5.java
URL: http://svn.apache.org/viewvc/myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/java/org/apache/myfaces/html5/renderkit/util/HTML5.java?rev=1044945&r1=1044944&r2=1044945&view=diff
==============================================================================
--- myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/java/org/apache/myfaces/html5/renderkit/util/HTML5.java (original)
+++ myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/java/org/apache/myfaces/html5/renderkit/util/HTML5.java Sun Dec 12 22:33:20 2010
@@ -91,4 +91,10 @@ public interface HTML5
     String CONTENTEDITABLE_ATTR = "contenteditable";
     String SPELLCHECK_ATTR = "spellcheck";
 
+
+    // meter
+    String LOW_ATTR = "low";
+    String HIGH_ATTR = "high";
+    String OPTIMUM_ATTR = "optimum";
+
 }

Modified: myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/java/org/apache/myfaces/html5/renderkit/util/JsfProperties.java
URL: http://svn.apache.org/viewvc/myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/java/org/apache/myfaces/html5/renderkit/util/JsfProperties.java?rev=1044945&r1=1044944&r2=1044945&view=diff
==============================================================================
--- myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/java/org/apache/myfaces/html5/renderkit/util/JsfProperties.java (original)
+++ myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/java/org/apache/myfaces/html5/renderkit/util/JsfProperties.java Sun Dec 12 22:33:20 2010
@@ -41,6 +41,8 @@ public interface JsfProperties
     String WIDTH_PROP = "width";
     String HEIGHT_PROP = "height";
 
+    String VALUE_PROP = "value";
+
     // new Html5 common props
     String HIDDEN_PROP = "hidden";
     String DRAGGABLE_PROP = "draggable";
@@ -129,5 +131,11 @@ public interface JsfProperties
     String INPUTDATETIME_TYPE_WEEK = "week";
     String INPUTDATETIME_TYPE_DATETIME_LOCAL = "datetime-local";
     
+    //progress and meter
+    String MAXIMUM_PROP = "maximum";
+    String MINIMUM_PROP = "minimum";
+    String OPTIMUM_PROP = "optimum";
+    String LOW_PROP = "low";
+    String HIGH_PROP = "high";
 
 }

Modified: myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/java/org/apache/myfaces/html5/renderkit/util/PassThroughAttributes.java
URL: http://svn.apache.org/viewvc/myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/java/org/apache/myfaces/html5/renderkit/util/PassThroughAttributes.java?rev=1044945&r1=1044944&r2=1044945&view=diff
==============================================================================
--- myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/java/org/apache/myfaces/html5/renderkit/util/PassThroughAttributes.java (original)
+++ myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/java/org/apache/myfaces/html5/renderkit/util/PassThroughAttributes.java Sun Dec 12 22:33:20 2010
@@ -106,5 +106,23 @@ public interface PassThroughAttributes
         .attr(REQUIRED_PROP)
         .attr(READONLY_PROP)
         .unmodifiable();
+
+    Map<String, String> PROGRESS = map(11)
+        .attrs(PassThroughAttributeGroups.HTML5_GLOBAL_PROPS)
+        .attrs(PassThroughAttributeGroups.HTML_GLOBAL_PROPS)
+        .attr(VALUE_PROP)
+        .attr(MAXIMUM_PROP, MAX_ATTR)
+        .unmodifiable();
+
+    Map<String, String> METER = map(11)
+        .attrs(PassThroughAttributeGroups.HTML5_GLOBAL_PROPS)
+        .attrs(PassThroughAttributeGroups.HTML_GLOBAL_PROPS)
+        .attr(VALUE_PROP)
+        .attr(MAXIMUM_PROP, MAX_ATTR)
+        .attr(MINIMUM_PROP, MIN_ATTR)
+        .attr(LOW_PROP, LOW_ATTR)
+        .attr(HIGH_PROP, HIGH_ATTR)
+        .attr(OPTIMUM_PROP, OPTIMUM_ATTR)
+        .unmodifiable();
     
 }

Modified: myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/java/org/apache/myfaces/html5/renderkit/util/PassThroughClientBehaviorEvents.java
URL: http://svn.apache.org/viewvc/myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/java/org/apache/myfaces/html5/renderkit/util/PassThroughClientBehaviorEvents.java?rev=1044945&r1=1044944&r2=1044945&view=diff
==============================================================================
--- myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/java/org/apache/myfaces/html5/renderkit/util/PassThroughClientBehaviorEvents.java (original)
+++ myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-core/src/main/java/org/apache/myfaces/html5/renderkit/util/PassThroughClientBehaviorEvents.java Sun Dec 12 22:33:20 2010
@@ -72,6 +72,14 @@ public interface PassThroughClientBehavi
         .events(PassThroughClientBehaviorEventGroups.HTML5_INPUT_BEHAVIOR_EVENTS)
         .unmodifiable();
 
+    Map<String, String> PROGRESS = map(7)
+        .events(PassThroughClientBehaviorEventGroups.HTML5_GLOBAL_BEHAVIOR_EVENTS)
+        .unmodifiable();
+
+    Map<String, String> METER = map(7)
+        .events(PassThroughClientBehaviorEventGroups.HTML5_GLOBAL_BEHAVIOR_EVENTS)
+        .unmodifiable();
+
     Map<String, String> DIV = map(11)
         .events(PassThroughClientBehaviorEventGroups.HTML_GLOBAL_BEHAVIOR_EVENTS)
         .events(PassThroughClientBehaviorEventGroups.HTML5_GLOBAL_BEHAVIOR_EVENTS)

Modified: myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-examples/src/main/webapp/index.xhtml
URL: http://svn.apache.org/viewvc/myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-examples/src/main/webapp/index.xhtml?rev=1044945&r1=1044944&r2=1044945&view=diff
==============================================================================
--- myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-examples/src/main/webapp/index.xhtml (original)
+++ myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-examples/src/main/webapp/index.xhtml Sun Dec 12 22:33:20 2010
@@ -45,6 +45,9 @@
 		<li>
 			<h:link outcome="inputNumberXXX" value="hx:inputNumberSlider and hx:inputNumberSpinner"/>
 		</li>
+        <li>
+			<h:link outcome="meterProgress" value="hx:meter and hx:progress"/>
+		</li>
 	</ul>
 	
 </h:body>

Copied: myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-examples/src/main/webapp/meterProgress.xhtml (from r1044533, myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-examples/src/main/webapp/inputColor.xhtml)
URL: http://svn.apache.org/viewvc/myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-examples/src/main/webapp/meterProgress.xhtml?p2=myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-examples/src/main/webapp/meterProgress.xhtml&p1=myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-examples/src/main/webapp/inputColor.xhtml&r1=1044533&r2=1044945&rev=1044945&view=diff
==============================================================================
--- myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-examples/src/main/webapp/inputColor.xhtml (original)
+++ myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-examples/src/main/webapp/meterProgress.xhtml Sun Dec 12 22:33:20 2010
@@ -24,14 +24,14 @@
 	
 	 <ui:composition template="/_template.xhtml">
 	    <ui:define name="pageName">
-	    	<h1>inputColor Index</h1>
+	    	<h1>meter and progress Index</h1>
 	    </ui:define>
 
 		<ui:define name="content">
 	    	<ul>
-				<li><h:link outcome="inputColor/inputColor01" value="Simple inputColor"/></li>
+				<li><h:link outcome="meterProgress/meterProgress01" value="Simple progress"/></li>
 			</ul>
-	    </ui:define>		
+	    </ui:define>
 			
 	</ui:composition>
 	

Copied: myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-examples/src/main/webapp/meterProgress/meterProgress01.xhtml (from r1044533, myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-examples/src/main/webapp/inputColor/inputColor01.xhtml)
URL: http://svn.apache.org/viewvc/myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-examples/src/main/webapp/meterProgress/meterProgress01.xhtml?p2=myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-examples/src/main/webapp/meterProgress/meterProgress01.xhtml&p1=myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-examples/src/main/webapp/inputColor/inputColor01.xhtml&r1=1044533&r2=1044945&rev=1044945&view=diff
==============================================================================
--- myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-examples/src/main/webapp/inputColor/inputColor01.xhtml (original)
+++ myfaces/gsoc/html5-comp-lib/trunk/html5-comp-lib-examples/src/main/webapp/meterProgress/meterProgress01.xhtml Sun Dec 12 22:33:20 2010
@@ -27,29 +27,35 @@
 
 	 <ui:composition template="/_template.xhtml">
 	    <ui:define name="pageName">
-	    	<h1>Simple inputColor</h1>
+	    	<h1>Simple progress</h1>
 	    </ui:define>
 
 		<ui:define name="content">
 			<p>
 				Notes:
 				<ul>
-					<li>No browser support for this component yet!</li>
-					<li>Browser will send a valid color value defined in the Html5 spec. e.g: #FFAAFF, #001122. 
-						So the value is validated according to the spec in the server-side.</li>
 				</ul>
 			</p>
 			<h:form id="demoForm">
 				<h:panelGrid cols="2">
-					<label>Simple color input:</label><br/>
-			    	<hx:inputColor value="#{inputColorBean.color}" required="true" />
+					<label>Simple progress:</label><br/>
+			    	<hx:progress value="#{101}" maximum="#{201.0}" />
+
+                    <label>Simple progress:</label><br/>
+			    	<hx:progress value="0.25" />
+
+                    <label>Simple meter:</label><br/>
+                    <hx:meter value="2" maximum="10" minimum="0" optimum="5" low="4" high="10"/>
+
+                    <label>Simple meter:</label><br/>
+                    <hx:meter value="0.6"/>
 			    	
 					<br/>
 			    	<h:commandButton action="none"/><br/>
 				</h:panelGrid>
 			</h:form>
-	    </ui:define>		
-			
+	    </ui:define>
+
 	</ui:composition>
 
 </h:body>