myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject svn commit: r1367921 [1/2] - in /myfaces/tobago/trunk: tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ tobago-core/src/main/java/org/apache/myfaces/tobago/util/ tobago-example/tobago-example-demo/src/main/webapp/content/0...
Date Wed, 01 Aug 2012 11:13:48 GMT
Author: lofwyr
Date: Wed Aug  1 11:13:46 2012
New Revision: 1367921

URL: http://svn.apache.org/viewvc?rev=1367921&view=rev
Log:
TOBAGO-1187: new tag tc:dataAttribute for HTML5 data-*

Added:
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/DataAttributeTag.java
      - copied, changed from r1367539, myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/AttributeTag.java
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/70-dataAttribute/
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/70-dataAttribute/dataAttribute.js
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/70-dataAttribute/dataAttribute.xhtml
      - copied, changed from r1367539, myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/01-basic/basic.xhtml
    myfaces/tobago/trunk/tobago-extension/tobago-facelets/src/main/java/org/apache/myfaces/tobago/facelets/DataAttributeHandler.java
      - copied, changed from r1367539, myfaces/tobago/trunk/tobago-extension/tobago-facelets/src/main/java/org/apache/myfaces/tobago/facelets/AttributeHandler.java
Modified:
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/util/ComponentUtils.java
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/01-basic/basic.xhtml
    myfaces/tobago/trunk/tobago-extension/tobago-facelets/src/main/java/org/apache/myfaces/tobago/facelets/AbstractTobagoTagLibrary.java
    myfaces/tobago/trunk/tobago-extension/tobago-sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/sandbox/standard/tag/NumberSliderRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/BoxRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ButtonRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/CalendarRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/FileRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/HiddenRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ImageRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/InRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/LabelRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/LinkRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MenuBarRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MessagesRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ObjectRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/OutRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PageRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PanelRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PopupRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ProgressRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/RichTextEditorRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectBooleanCheckboxRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyCheckboxRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyListboxRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyShuttleRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectOneChoiceRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectOneListboxRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectOneRadioRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TabGroupRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TextareaRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TimeRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ToolBarRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeCommandRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeIconRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeIndentRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeLabelRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeListboxRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeMenuNodeRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeNodeRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeSelectRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-speyside/src/main/java/org/apache/myfaces/tobago/renderkit/html/speyside/standard/tag/BoxRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/MediatorRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SeparatorRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/util/HtmlRendererUtils.java

Copied: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/DataAttributeTag.java (from r1367539, myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/AttributeTag.java)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/DataAttributeTag.java?p2=myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/DataAttributeTag.java&p1=myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/AttributeTag.java&r1=1367539&r2=1367921&rev=1367921&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/AttributeTag.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/DataAttributeTag.java Wed Aug  1 11:13:46 2012
@@ -21,9 +21,6 @@ import org.apache.myfaces.tobago.apt.ann
 import org.apache.myfaces.tobago.apt.annotation.Tag;
 import org.apache.myfaces.tobago.apt.annotation.TagAttribute;
 import org.apache.myfaces.tobago.apt.annotation.TagGeneration;
-import org.apache.myfaces.tobago.compat.FacesUtils;
-import org.apache.myfaces.tobago.component.Attributes;
-import org.apache.myfaces.tobago.component.SupportsRenderedPartially;
 import org.apache.myfaces.tobago.util.ComponentUtils;
 
 import javax.faces.component.UIComponent;
@@ -32,12 +29,14 @@ import javax.servlet.jsp.JspException;
 import javax.servlet.jsp.tagext.TagSupport;
 
 /**
- * Add an attribute on the UIComponent
+ * Add an data attribute on the UIComponent
  * associated with the closest parent UIComponent custom action.
+ * Data attributes will be passed through the renderers into the DOM of the user agent and
+ * can be used by scripts.
  */
-@Tag(name = "attribute", bodyContent = BodyContent.EMPTY)
-@TagGeneration(className = "org.apache.myfaces.tobago.internal.taglib.AttributeTag")
-public abstract class AttributeTag extends TagSupport {
+@Tag(name = "dataAttribute", bodyContent = BodyContent.EMPTY)
+@TagGeneration(className = "org.apache.myfaces.tobago.internal.taglib.DataAttributeTag")
+public abstract class DataAttributeTag extends TagSupport {
 
   public abstract boolean isNameLiteral();
 
@@ -65,33 +64,12 @@ public abstract class AttributeTag exten
   public abstract String getValueExpression();
 
   /**
-   * Warning: The mode is only available when using Facelets.
-   * Allowed values are "action", "actionListener", "actionFromValue", "isNotSet", "isSet", "valueIfSet".
-   * <br/>
-   * "action" (method binding) evaluate the expression to find the method binding which is referenced with the template.
-   * <br/>
-   * "actionListener" same as "action" but for the method signature of ActionListeners.
-   * <br/>
-   * "isSet" (boolean) checks, if the expression is set from the composition caller.
-   * <br/>
-   * "isNotSet" (boolean) negation of "isSet"
-   * <br/>
-   * "actionFromValue" Evaluates the ValueBinding to get an outcome set directly (no action method)
-   * <br/>
-   * "valueIfSet" set the attribute only if the value is set.
-   */
-  @TagAttribute(name = "mode")
-  public void setMode(String mode) {
-    throw new RuntimeException("The mode is only available when using Facelets, not with JSP.");
-  }
-  
-  /**
    * @throws javax.servlet.jsp.JspException if a JSP error occurs
    */
   public int doStartTag() throws JspException {
 
     // Locate our parent UIComponentTag
-    UIComponentTag tag =
+    final UIComponentTag tag =
         UIComponentTag.getParentUIComponentTag(pageContext);
     if (tag == null) {
       // TODO Message resource i18n
@@ -102,40 +80,35 @@ public abstract class AttributeTag exten
       return (SKIP_BODY);
     }
 
-    UIComponent component = tag.getComponentInstance();
+    final UIComponent component = tag.getComponentInstance();
     if (component == null) {
       // TODO Message resource i18n
       throw new JspException("Component Instance is null");
     }
-    String attributeName;
+    final Object attributeName;
     if (!isNameLiteral()) {
-      Object nameValueBindingOrValueExpression = getNameAsBindingOrExpression();
-      if (nameValueBindingOrValueExpression != null) {
-        attributeName = (String) FacesUtils.getValueFromBindingOrExpression(nameValueBindingOrValueExpression);
-      } else {
+      attributeName = getNameAsBindingOrExpression();
+      if (attributeName == null) {
         // TODO Message resource i18n
         throw new JspException("Can not get ValueBinding for attribute name " + getNameExpression());
       }
     } else {
       attributeName = getNameValue();
     }
+
+    final Object attributeValue;
     if (!isValueLiteral()) {
-      Object obj = getValueAsBindingOrExpression();
-      if (obj != null) {
-        FacesUtils.setBindingOrExpression(component, attributeName, obj);
-      } else {
+      attributeValue = getValueAsBindingOrExpression();
+      if (attributeValue == null) {
         // TODO Message resource i18n
         throw new JspException("Can not get ValueBinding for attribute value " + getValueExpression());
       }
-    } else if (Attributes.STYLE_CLASS.equals(attributeName)) {
-      ComponentUtils.setStyleClasses(component, getValueValue());
-    } else if (Attributes.RENDERED_PARTIALLY.equals(attributeName)
-        && component instanceof SupportsRenderedPartially) {
-      String[] components = ComponentUtils.splitList(getValueValue());
-      ((SupportsRenderedPartially) component).setRenderedPartially(components);
     } else {
-      component.getAttributes().put(attributeName, getValueValue());
+      attributeValue = getValueValue();
     }
+
+    ComponentUtils.putDataAttribute(component, attributeName, attributeValue);
+
     return (SKIP_BODY);
   }
 }

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/util/ComponentUtils.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/util/ComponentUtils.java?rev=1367921&r1=1367920&r2=1367921&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/util/ComponentUtils.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/util/ComponentUtils.java Wed Aug  1 11:13:46 2012
@@ -65,6 +65,7 @@ import javax.faces.render.Renderer;
 import javax.faces.webapp.UIComponentTag;
 import javax.servlet.jsp.JspException;
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
@@ -86,6 +87,12 @@ public class ComponentUtils {
   public static final Class[] VALIDATOR_ARGS = {FacesContext.class, UIComponent.class, Object.class};
   public static final String LIST_SEPARATOR_CHARS = ", ";
 
+  /**
+   * Name of the map for data attributes in components. New in JSF 2.2.
+   * @since 1.6.0
+   */
+  public static final String DATA_ATTRIBUTES_KEY = "javax.faces.component.DATA_ATTRIBUTES_KEY";
+
   private ComponentUtils() {
   }
 
@@ -1024,4 +1031,17 @@ public class ComponentUtils {
     }
     return ArrayUtils.EMPTY_STRING_ARRAY;
   }
+
+  public static void putDataAttribute(UIComponent component, Object name, Object value) {
+    Map<Object, Object> map = (Map<Object, Object>) component.getAttributes().get(DATA_ATTRIBUTES_KEY);
+    if (map == null) {
+      map = new HashMap<Object, Object>();
+      component.getAttributes().put(DATA_ATTRIBUTES_KEY, map);
+    }
+    map.put(name, value);
+  }
+
+  public static Map<Object, Object> getDataAttributes(UIComponent component) {
+    return (Map<Object, Object>) component.getAttributes().get(DATA_ATTRIBUTES_KEY);
+  }
 }

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/01-basic/basic.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/01-basic/basic.xhtml?rev=1367921&r1=1367920&r2=1367921&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/01-basic/basic.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/01-basic/basic.xhtml Wed Aug  1 11:13:46 2012
@@ -24,6 +24,20 @@
                 xmlns:f="http://java.sun.com/jsf/core">
   <ui:param name="title" value="#{overviewBundle.basic}"/>
 
+  <tc:script>
+
+    jQuery(document).ready(function () {
+      jQuery("[data-colored]")
+          .click(function () {
+            jQuery(this).css("background-color", jQuery(this).data("colored"));
+          })
+          .dblclick(function () {
+            jQuery(this).css("background-color", "");
+          });
+    });
+
+  </tc:script>
+
   <tc:panel>
     <f:facet name="layout">
       <tc:gridLayout rows="auto;2*;3*;auto;2*;2*;auto;2*;2*"/>
@@ -46,11 +60,15 @@
         <f:facet name="layout">
           <tc:gridLayout rows="auto;auto;auto;auto"/>
         </f:facet>
-        <tx:in value="#{overviewController.basicInput}" required="true" tabIndex="1"
-               label="#{overviewBundle.basic_textboxLabel}" tip="#{overviewBundle.basic_textboxTip}"/>
+        <tc:in value="#{overviewController.basicInput}" required="true" tabIndex="1"
+               label="#{overviewBundle.basic_textboxLabel}" tip="#{overviewBundle.basic_textboxTip}">
+          <tc:dataAttribute name="colored" value="red"/>
+        </tc:in>
         <tx:in value="#{overviewController.suggestInput}" tabIndex="3"
                label="#{overviewBundle.basic_suggestLabel}" tip="#{overviewBundle.basic_suggestTip}"
-               suggestMethod="#{overviewController.getInputSuggestItems}"/>
+               suggestMethod="#{overviewController.getInputSuggestItems}">
+          <tc:dataAttribute name="colored" value="#ffff00"/>
+        </tx:in>
         <tx:date value="#{overviewController.basicDate}" tabIndex="4"
                  label="#{overviewBundle.basic_dateLabel}" required="true">
           <f:convertDateTime pattern="dd/MM/yyyy"/>

Added: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/70-dataAttribute/dataAttribute.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/70-dataAttribute/dataAttribute.js?rev=1367921&view=auto
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/70-dataAttribute/dataAttribute.js (added)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/70-dataAttribute/dataAttribute.js Wed Aug  1 11:13:46 2012
@@ -0,0 +1,27 @@
+/*
+ * 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.
+ */
+
+jQuery(document).ready(function () {
+  jQuery("[data-colored]")
+      .css("background-color", "#aaaaaa")
+      .click(function () {
+        jQuery(this).css("background-color", jQuery(this).data("colored"));
+      })
+      .dblclick(function () {
+        jQuery(this).css("background-color", "#aaaaaa");
+      });
+});

Copied: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/70-dataAttribute/dataAttribute.xhtml (from r1367539, myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/01-basic/basic.xhtml)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/70-dataAttribute/dataAttribute.xhtml?p2=myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/70-dataAttribute/dataAttribute.xhtml&p1=myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/01-basic/basic.xhtml&r1=1367539&r2=1367921&rev=1367921&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/01-basic/basic.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/70-dataAttribute/dataAttribute.xhtml Wed Aug  1 11:13:46 2012
@@ -19,120 +19,54 @@
 
 <ui:composition template="/WEB-INF/tags/layout/overview.xhtml"
                 xmlns:tc="http://myfaces.apache.org/tobago/component"
-                xmlns:tx="http://myfaces.apache.org/tobago/extension"
                 xmlns:ui="http://java.sun.com/jsf/facelets"
                 xmlns:f="http://java.sun.com/jsf/core">
-  <ui:param name="title" value="#{overviewBundle.basic}"/>
+  <ui:param name="title" value="The Data Attributes"/>
+
+  <tc:script file="content/70-dataAttribute/dataAttribute.js"/>
 
   <tc:panel>
     <f:facet name="layout">
-      <tc:gridLayout rows="auto;2*;3*;auto;2*;2*;auto;2*;2*"/>
-      <!--<tc:gridLayout border="0" rows="*;*;*;*;*;*;*;*;*;*"/>-->
+      <tc:gridLayout rows="100px;*;*" columns="*;*"/>
     </f:facet>
 
-    <!-- row -->
-    <tc:separator label="#{overviewBundle.basic_sampleInputTitle}"/>
-
-    <!-- row -->
-    <tc:out escape="false" value="#{overviewBundle.basic_text_input}"/>
-
-    <!-- row -->
-    <tc:panel>
-      <f:facet name="layout">
-        <tc:gridLayout columns="*;*" border="0"/>
-      </f:facet>
+    <tc:out escape="false" value="Each box contains a panel with a tc:dataAttribute.
+      It contains a color code which will be used by JavaScript which is included into this page.
+      &lt;br&gt;
+      Demo: Try to click or double-click in the content area of the boxes.
+      &lt;ul&gt;
+      &lt;li&gt; click: get the color from the data-colored attribute and set the background-color with it.
+      &lt;/li&gt;
+      &lt;li&gt; double-click: reset the background-color.
+      &lt;/li&gt;
+      &lt;/ul&gt;
+      ">
+      <tc:gridLayoutConstraint columnSpan="2"/>
+    </tc:out>
 
+    <tc:box label="Green">
       <tc:panel>
-        <f:facet name="layout">
-          <tc:gridLayout rows="auto;auto;auto;auto"/>
-        </f:facet>
-        <tx:in value="#{overviewController.basicInput}" required="true" tabIndex="1"
-               label="#{overviewBundle.basic_textboxLabel}" tip="#{overviewBundle.basic_textboxTip}"/>
-        <tx:in value="#{overviewController.suggestInput}" tabIndex="3"
-               label="#{overviewBundle.basic_suggestLabel}" tip="#{overviewBundle.basic_suggestTip}"
-               suggestMethod="#{overviewController.getInputSuggestItems}"/>
-        <tx:date value="#{overviewController.basicDate}" tabIndex="4"
-                 label="#{overviewBundle.basic_dateLabel}" required="true">
-          <f:convertDateTime pattern="dd/MM/yyyy"/>
-          <tc:validateSubmittedValueLength maximum="10"/>
-        </tx:date>
-        <tx:time label="#{overviewBundle.basic_timeLabel}" tabIndex="5"
-                 value="#{overviewController.basicTime}"/>
+        <tc:dataAttribute name="colored" value="#00ff00"/>
       </tc:panel>
+    </tc:box>
 
-      <tx:textarea value="#{overviewController.basicArea}" tabIndex="2"
-                   label="#{overviewBundle.basic_textareaLabel}">
-        <f:validateLength maximum="10" />
-      </tx:textarea>
-    </tc:panel>
-
-    <!-- row -->
-    <tc:separator label="#{overviewBundle.basic_sampleSelectTitle}"/>
-
-    <!-- row -->
-    <tc:out escape="false" value="#{overviewBundle.basic_text_select}"/>
-
-    <!-- row -->
-    <tc:panel>
-      <f:facet name="layout">
-        <tc:gridLayout columns="*;*" border="0"/>
-      </f:facet>
-      <tc:selectOneRadio value="#{overviewController.radioValue}"
-                         id="rg0" converter="salutationId">
-        <f:selectItems value="#{overviewController.items}" id="items0"/>
-        <f:facet name="click">
-          <tc:command/>
-        </f:facet>
-      </tc:selectOneRadio>
-
+    <tc:box label="Red">
       <tc:panel>
-        <f:facet name="layout">
-          <tc:gridLayout rows="auto;auto"/>
-        </f:facet>
-        <tc:selectManyCheckbox value="#{overviewController.multiValue}"
-                               id="cbg0" renderRange="1-2" converter="salutationId">
-          <f:selectItems value="#{overviewController.items}" id="itemsg0"/>
-        </tc:selectManyCheckbox>
-        <tc:selectOneChoice value="#{overviewController.singleValue}"
-                            converter="salutationId">
-          <f:selectItems value="#{overviewController.items}"/>
-        </tc:selectOneChoice>
+        <tc:dataAttribute name="colored" value="#ff0000"/>
       </tc:panel>
-    </tc:panel>
-
-    <!-- row -->
-    <tc:separator label="#{overviewBundle.basic_sampleLinkTitle}"/>
+    </tc:box>
 
-    <!-- row -->
-    <tc:out escape="false" value="#{overviewBundle.basic_text_action}"/>
+    <tc:box label="Yellow">
+      <tc:panel>
+        <tc:dataAttribute name="colored" value="#ffff00"/>
+      </tc:panel>
+    </tc:box>
 
-    <!-- row -->
-    <tc:panel>
-      <f:facet name="layout">
-        <tc:gridLayout columns="120px;*;120px;*;120px" rows="auto;auto" border="0"/>
-      </f:facet>
-      <tc:link id="link" action="/content/01-basic/basic"
-               actionListener="#{overviewController.click}"
-               label="#{overviewBundle.basic_linkAction}"/>
-      <tc:panel/>
-      <tc:link id="image" action="/content/01-basic/basic"
-               actionListener="#{overviewController.click}"
-               image="image/image_button.gif"/>
-      <tc:panel/>
-      <tc:button id="button" action="/content/01-basic/basic"
-                 actionListener="#{overviewController.click}"
-                 label="#{overviewBundle.basic_buttonAction}"/>
-
-      <tx:in value="#{overviewController.lastAction}" readonly="true"
-             label="#{overviewBundle.basic_lastActionLabel}">
-        <tc:gridLayoutConstraint columnSpan="5"/>
-      </tx:in>
-    </tc:panel>
-
-    <tc:script>
-      new Tobago.AcceleratorKey(function() {Tobago.clickOnElement('page:image');}, 'O', "ctrl");
-      new Tobago.AcceleratorKey(function() {Tobago.clickOnElement('page:button');}, 'B', "ctrl");
-    </tc:script>
+    <tc:box label="Blue">
+      <tc:panel>
+        <tc:dataAttribute name="colored" value="#0000ff"/>
+      </tc:panel>
+    </tc:box>
 
   </tc:panel>
 </ui:composition>

Modified: myfaces/tobago/trunk/tobago-extension/tobago-facelets/src/main/java/org/apache/myfaces/tobago/facelets/AbstractTobagoTagLibrary.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-extension/tobago-facelets/src/main/java/org/apache/myfaces/tobago/facelets/AbstractTobagoTagLibrary.java?rev=1367921&r1=1367920&r2=1367921&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-extension/tobago-facelets/src/main/java/org/apache/myfaces/tobago/facelets/AbstractTobagoTagLibrary.java (original)
+++ myfaces/tobago/trunk/tobago-extension/tobago-facelets/src/main/java/org/apache/myfaces/tobago/facelets/AbstractTobagoTagLibrary.java Wed Aug  1 11:13:46 2012
@@ -27,6 +27,7 @@ public class AbstractTobagoTagLibrary  e
   public AbstractTobagoTagLibrary(String namespace) {
     super(namespace);
     addTagHandler("attribute", AttributeHandler.class);
+    addTagHandler("dataAttribute", DataAttributeHandler.class);
     addTagHandler("tabChangeListener", TabChangeListenerHandler.class);
     addTagHandler("popupReference", PopupReferenceHandler.class);
     addTagHandler("resetInputActionListener", ResetInputActionListenerHandler.class);

Copied: myfaces/tobago/trunk/tobago-extension/tobago-facelets/src/main/java/org/apache/myfaces/tobago/facelets/DataAttributeHandler.java (from r1367539, myfaces/tobago/trunk/tobago-extension/tobago-facelets/src/main/java/org/apache/myfaces/tobago/facelets/AttributeHandler.java)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-extension/tobago-facelets/src/main/java/org/apache/myfaces/tobago/facelets/DataAttributeHandler.java?p2=myfaces/tobago/trunk/tobago-extension/tobago-facelets/src/main/java/org/apache/myfaces/tobago/facelets/DataAttributeHandler.java&p1=myfaces/tobago/trunk/tobago-extension/tobago-facelets/src/main/java/org/apache/myfaces/tobago/facelets/AttributeHandler.java&r1=1367539&r2=1367921&rev=1367921&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-extension/tobago-facelets/src/main/java/org/apache/myfaces/tobago/facelets/AttributeHandler.java (original)
+++ myfaces/tobago/trunk/tobago-extension/tobago-facelets/src/main/java/org/apache/myfaces/tobago/facelets/DataAttributeHandler.java Wed Aug  1 11:13:46 2012
@@ -18,50 +18,28 @@ package org.apache.myfaces.tobago.facele
  */
 
 import com.sun.facelets.FaceletContext;
-import com.sun.facelets.el.ELAdaptor;
-import com.sun.facelets.el.LegacyMethodBinding;
-import com.sun.facelets.el.TagMethodExpression;
 import com.sun.facelets.tag.TagAttribute;
 import com.sun.facelets.tag.TagConfig;
 import com.sun.facelets.tag.TagException;
 import com.sun.facelets.tag.TagHandler;
 import com.sun.facelets.tag.jsf.ComponentSupport;
-import org.apache.commons.lang.StringUtils;
 import org.apache.myfaces.tobago.component.Attributes;
-import org.apache.myfaces.tobago.component.SupportsMarkup;
-import org.apache.myfaces.tobago.component.SupportsRenderedPartially;
-import org.apache.myfaces.tobago.context.Markup;
-import org.apache.myfaces.tobago.el.ConstantMethodBinding;
 import org.apache.myfaces.tobago.util.ComponentUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 import javax.el.ELException;
-import javax.el.ExpressionFactory;
-import javax.el.MethodExpression;
-import javax.el.ValueExpression;
 import javax.faces.FacesException;
-import javax.faces.component.ActionSource;
-import javax.faces.component.EditableValueHolder;
 import javax.faces.component.UIComponent;
-import javax.faces.component.ValueHolder;
-import javax.faces.convert.Converter;
 
-public final class AttributeHandler extends TagHandler {
-
-  private static final Logger LOG = LoggerFactory.getLogger(AttributeHandler.class);
+public final class DataAttributeHandler extends TagHandler {
 
   private final TagAttribute name;
 
   private final TagAttribute value;
 
-  private final TagAttribute mode;
-
-  public AttributeHandler(TagConfig config) {
+  public DataAttributeHandler(TagConfig config) {
     super(config);
     this.name = getRequiredAttribute(Attributes.NAME);
     this.value = getRequiredAttribute(Attributes.VALUE);
-    this.mode = getAttribute(Attributes.MODE);
   }
 
   public void apply(FaceletContext faceletContext, UIComponent parent)
@@ -72,274 +50,13 @@ public final class AttributeHandler exte
 
     if (ComponentSupport.isNew(parent)) {
 
-      if (mode != null) {
-        if ("isNotSet".equals(mode.getValue())) {
-          boolean result = false;
-          String expressionString = value.getValue();
-          if (!value.isLiteral()) {
-            while (isSimpleExpression(expressionString)) {
-              if (isMethodOrValueExpression(expressionString)) {
-                ValueExpression expression
-                    = faceletContext.getVariableMapper().resolveVariable(removeElParenthesis(expressionString));
-                if (expression == null) {
-                  result = true;
-                  break;
-                } else {
-                  expressionString = expression.getExpressionString();
-                }
-              } else {
-                result = false;
-                break;
-              }
-            }
-          } else {
-            result = StringUtils.isEmpty(expressionString);
-          }
-          parent.getAttributes().put(name.getValue(), Boolean.valueOf(result));
-        } else if ("isSet".equals(mode.getValue())) {
-          boolean result = true;
-          String expressionString = value.getValue();
-          if (!value.isLiteral()) {
-            while (isSimpleExpression(expressionString)) {
-              if (isMethodOrValueExpression(expressionString)) {
-                ValueExpression expression
-                    = faceletContext.getVariableMapper().resolveVariable(removeElParenthesis(expressionString));
-                if (expression == null) {
-                  result = false;
-                  break;
-                } else {
-                  expressionString = expression.getExpressionString();
-                }
-              } else {
-                result = true;
-                break;
-              }
-            }
-          } else {
-            result = StringUtils.isNotEmpty(expressionString);
-          }
-          parent.getAttributes().put(name.getValue(), Boolean.valueOf(result));
-        } else if ("action".equals(mode.getValue())) {
-          String expressionString = value.getValue();
-          while (isSimpleExpression(expressionString)) {
-            if (isMethodOrValueExpression(expressionString)) {
-              ValueExpression expression
-                  = faceletContext.getVariableMapper().resolveVariable(removeElParenthesis(expressionString));
-              if (expression == null) {
-                // when the action hasn't been set while using a composition.
-                if (LOG.isDebugEnabled()) {
-                  LOG.debug("Variable can't be resolved: value='" + expressionString + "'");
-                }
-                expressionString = null;
-                break;
-              } else {
-                expressionString = expression.getExpressionString();
-              }
-            } else {
-              break;
-            }
-          }
-          if (expressionString != null) {
-            ExpressionFactory expressionFactory = faceletContext.getExpressionFactory();
-            MethodExpression action = new TagMethodExpression(value, expressionFactory.createMethodExpression(
-                faceletContext, expressionString, String.class, ComponentUtils.ACTION_ARGS));
-            // TODO jsf 1.2
-            ((ActionSource) parent).setAction(new LegacyMethodBinding(action));
-          }
-        } else if ("actionListener".equals(mode.getValue())) {
-          String expressionString = value.getValue();
-          while (isSimpleExpression(expressionString)) {
-            if (isMethodOrValueExpression(expressionString)) {
-              ValueExpression expression
-                  = faceletContext.getVariableMapper().resolveVariable(removeElParenthesis(expressionString));
-              if (expression == null) {
-                if (LOG.isDebugEnabled()) {
-                  // when the action hasn't been set while using a composition.
-                  LOG.debug("Variable can't be resolved: value='" + expressionString + "'");
-                }
-                expressionString = null;
-                break;
-              } else {
-                expressionString = expression.getExpressionString();
-              }
-            } else {
-              LOG.warn("Only expressions are supported mode=actionListener value='" + expressionString + "'");
-              expressionString = null;
-              break;
-            }
-          }
-          if (expressionString != null) {
-            ExpressionFactory expressionFactory = faceletContext.getExpressionFactory();
-            MethodExpression actionListener = new TagMethodExpression(value, expressionFactory.createMethodExpression(
-                faceletContext, expressionString, null, ComponentUtils.ACTION_LISTENER_ARGS));
-            // TODO jsf 1.2
-            ((ActionSource) parent).setActionListener(new LegacyMethodBinding(actionListener));
-          }
-        } else if ("actionFromValue".equals(mode.getValue())) {
-          if (!value.isLiteral()) {
-            String result = value.getValue(faceletContext);
-            parent.getAttributes().put(name.getValue(), new ConstantMethodBinding(result));
-          }
-        } else if ("valueIfSet".equals(mode.getValue())) {
-          String expressionString = value.getValue();
-          while (isMethodOrValueExpression(expressionString) && isSimpleExpression(expressionString)) {
-            ValueExpression expression
-                = faceletContext.getVariableMapper().resolveVariable(removeElParenthesis(expressionString));
-            if (expression == null) {
-              if (LOG.isDebugEnabled()) {
-                // when the action hasn't been set while using a composition.
-                LOG.debug("Variable can't be resolved: value='" + expressionString + "'");
-              }
-              expressionString = null;
-              break;
-            } else {
-              expressionString = expression.getExpressionString();
-            }
-          }
-          if (expressionString != null) {
-            if (containsMethodOrValueExpression(expressionString)) {
-              ValueExpression expression = value.getValueExpression(faceletContext, Object.class);
-              ELAdaptor.setExpression(parent, name.getValue(faceletContext), expression);
-            } else {
-              parent.getAttributes().put(name.getValue(faceletContext), expressionString);
-            }
-          }
-        } else {
-          throw new FacesException("Type " + mode + " not suppored");
-        }
-      } else {
-
-        String nameValue = name.getValue(faceletContext);
-        if (Attributes.RENDERED.equals(nameValue)) {
-          if (value.isLiteral()) {
-            parent.setRendered(value.getBoolean(faceletContext));
-          } else {
-            ELAdaptor.setExpression(parent, nameValue, value.getValueExpression(faceletContext, Boolean.class));
-          }
-        } else if (Attributes.RENDERED_PARTIALLY.equals(nameValue)
-            && parent instanceof SupportsRenderedPartially) {
-
-          if (value.isLiteral()) {
-            String[] components = ComponentUtils.splitList(value.getValue());
-            ((SupportsRenderedPartially) parent).setRenderedPartially(components);
-          } else {
-            ELAdaptor.setExpression(parent, nameValue, value.getValueExpression(faceletContext, Object.class));
-          }
-        } else if (Attributes.STYLE_CLASS.equals(nameValue)) {
-          // TODO expression
-          ComponentUtils.setStyleClasses(parent, value.getValue());
-        } else if (Attributes.MARKUP.equals(nameValue)) {
-          if (parent instanceof SupportsMarkup) {
-            if (value.isLiteral()) {
-              ((SupportsMarkup) parent).setMarkup(Markup.valueOf(value.getValue()));
-            } else {
-              ValueExpression expression = value.getValueExpression(faceletContext, Object.class);
-              ELAdaptor.setExpression(parent, nameValue, expression);
-            }
-          } else {
-            LOG.error("Component is not instanceof SupportsMarkup. Instance is: " + parent.getClass().getName());
-          }
-        } else if (parent instanceof EditableValueHolder && Attributes.VALIDATOR.equals(nameValue)) {
-          MethodExpression methodExpression = getMethodExpression(faceletContext, null, ComponentUtils.VALIDATOR_ARGS);
-          if (methodExpression != null) {
-            // TODO jsf 1.2
-            ((EditableValueHolder) parent).setValidator(new LegacyMethodBinding(methodExpression));
-          }
-        } else if (parent instanceof EditableValueHolder
-            && Attributes.VALUE_CHANGE_LISTENER.equals(nameValue)) {
-          MethodExpression methodExpression =
-              getMethodExpression(faceletContext, null, ComponentUtils.VALUE_CHANGE_LISTENER_ARGS);
-          if (methodExpression != null) {
-            // TODO jsf 1.2
-            ((EditableValueHolder) parent).setValueChangeListener(new LegacyMethodBinding(methodExpression));
-          }
-        } else if (parent instanceof ValueHolder && Attributes.CONVERTER.equals(nameValue)) {
-          setConverter(faceletContext, parent, nameValue);
-        } else if (parent instanceof ActionSource && Attributes.ACTION.equals(nameValue)) {
-          MethodExpression action = getMethodExpression(faceletContext, String.class, ComponentUtils.ACTION_ARGS);
-          if (action != null) {
-            // TODO jsf 1.2
-            ((ActionSource) parent).setAction(new LegacyMethodBinding(action));
-          }
-        } else if (parent instanceof ActionSource && Attributes.ACTION_LISTENER.equals(nameValue)) {
-          MethodExpression action = getMethodExpression(faceletContext, null, ComponentUtils.ACTION_LISTENER_ARGS);
-          if (action != null) {
-            // TODO jsf 1.2
-            ((ActionSource) parent).setActionListener(new LegacyMethodBinding(action));
-          }
-        } else if (!parent.getAttributes().containsKey(nameValue)) {
-          if (value.isLiteral()) {
-            parent.getAttributes().put(nameValue, value.getValue());
-          } else {
-            ELAdaptor.setExpression(parent, nameValue, value.getValueExpression(faceletContext, Object.class));
-          }
-        }
-      }
-    }
-  }
-
-  private boolean isMethodOrValueExpression(String string) {
-    return (string.startsWith("${") || string.startsWith("#{")) && string.endsWith("}");
-  }
-
-  private boolean containsMethodOrValueExpression(String string) {
-    return (StringUtils.contains(string, "${") || StringUtils.contains(string, "#{"))
-        && StringUtils.contains(string, "}");
-  }
-
-  private boolean isSimpleExpression(String string) {
-    return string.indexOf('.') < 0 && string.indexOf('[') < 0;
-  }
-
-  private String removeElParenthesis(String string) {
-    return string.substring(2, string.length() - 1);
-  }
-
-  private ValueExpression getExpression(FaceletContext faceletContext) {
-    String myValue = removeElParenthesis(value.getValue());
-    return faceletContext.getVariableMapper().resolveVariable(myValue);
-  }
-
-  private MethodExpression getMethodExpression(FaceletContext faceletContext, Class returnType, Class[] args) {
-    // in a composition may be we get the method expression string from the current variable mapper
-    // the expression can be empty
-    // in this case return nothing
-    if (value.getValue().startsWith("${")) {
-      ValueExpression expression = getExpression(faceletContext);
-      if (expression != null) {
-        ExpressionFactory expressionFactory = faceletContext.getExpressionFactory();
-        return new TagMethodExpression(value, expressionFactory.createMethodExpression(faceletContext,
-            expression.getExpressionString(), returnType, args));
-      } else {
-        return null;
-      }
-    } else {
-      return value.getMethodExpression(faceletContext, returnType, args);
-    }
-  }
-
-  private void setConverter(FaceletContext faceletContext, UIComponent parent, String nameValue) {
-    // in a composition may be we get the converter expression string from the current variable mapper
-    // the expression can be empty
-    // in this case return nothing
-    if (value.getValue().startsWith("${")) {
-      ValueExpression expression = getExpression(faceletContext);
-      if (expression != null) {
-        setConverter(faceletContext, parent, nameValue, expression);
-      }
-    } else {
-      setConverter(faceletContext, parent, nameValue, value.getValueExpression(faceletContext, Object.class));
-    }
-  }
-
-  private void setConverter(
-      FaceletContext faceletContext, UIComponent parent, String nameValue, ValueExpression expression) {
-    if (expression.isLiteralText()) {
-      Converter converter =
-          faceletContext.getFacesContext().getApplication().createConverter(expression.getExpressionString());
-      ((ValueHolder) parent).setConverter(converter);
-    } else {
-      ELAdaptor.setExpression(parent, nameValue, expression);
+      Object attributeName = name.isLiteral()
+          ? (Object) name.getValue(faceletContext)
+          : name.getValueExpression(faceletContext, Object.class);
+      Object attributeValue = value.isLiteral()
+          ? (Object) value.getValue(faceletContext)
+          : value.getValueExpression(faceletContext, Object.class);
+      ComponentUtils.putDataAttribute(parent, attributeName, attributeValue);
     }
   }
 }

Modified: myfaces/tobago/trunk/tobago-extension/tobago-sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/sandbox/standard/tag/NumberSliderRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-extension/tobago-sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/sandbox/standard/tag/NumberSliderRenderer.java?rev=1367921&r1=1367920&r2=1367921&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-extension/tobago-sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/sandbox/standard/tag/NumberSliderRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-extension/tobago-sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/sandbox/standard/tag/NumberSliderRenderer.java Wed Aug  1 11:13:46 2012
@@ -82,6 +82,7 @@ public class NumberSliderRenderer extend
     writer.startElement(HtmlElements.TABLE, slider);
     writer.writeIdAttribute(id);
     writer.writeClassAttribute(Classes.create(slider));
+    HtmlRendererUtils.writeDataAttributes(facesContext, writer, slider);
     writer.writeStyleAttribute(style);
     //writer.writeAttribute(HtmlAttributes.BORDER,"1",false);
 

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/BoxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/BoxRenderer.java?rev=1367921&r1=1367920&r2=1367921&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/BoxRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/BoxRenderer.java Wed Aug  1 11:13:46 2012
@@ -57,6 +57,7 @@ public class BoxRenderer extends BoxRend
 
     writer.startElement(HtmlElements.FIELDSET, box);
     writer.writeClassAttribute(Classes.create(box));
+    HtmlRendererUtils.writeDataAttributes(facesContext, writer, box);
     writer.writeStyleAttribute(style);
 
     if (label != null || labelString != null) {

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ButtonRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ButtonRenderer.java?rev=1367921&r1=1367920&r2=1367921&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ButtonRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ButtonRenderer.java Wed Aug  1 11:13:46 2012
@@ -63,6 +63,7 @@ public class ButtonRenderer extends Comm
     writer.writeAttribute(HtmlAttributes.TYPE, HtmlButtonTypes.BUTTON, false);
     writer.writeNameAttribute(clientId);
     writer.writeIdAttribute(clientId);
+    HtmlRendererUtils.writeDataAttributes(facesContext, writer, button);
     HtmlRendererUtils.renderTip(button, writer);
     writer.writeAttribute(HtmlAttributes.DISABLED, helper.isDisabled());
     Integer tabIndex = button.getTabIndex();

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/CalendarRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/CalendarRenderer.java?rev=1367921&r1=1367920&r2=1367921&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/CalendarRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/CalendarRenderer.java Wed Aug  1 11:13:46 2012
@@ -70,6 +70,7 @@ public class CalendarRenderer extends La
     writer.startElement(HtmlElements.DIV, component);
     writer.writeIdAttribute(id);
     writer.writeClassAttribute(Classes.create(output));
+    HtmlRendererUtils.writeDataAttributes(facesContext, writer, component);
     Style style = new Style(facesContext, output);
     writer.writeStyleAttribute(style);
     String dateInputId = (String) output.getAttributes().get(Attributes.DATE_INPUT_ID);

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/FileRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/FileRenderer.java?rev=1367921&r1=1367920&r2=1367921&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/FileRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/FileRenderer.java Wed Aug  1 11:13:46 2012
@@ -103,6 +103,7 @@ public class FileRenderer extends InputR
     writer.startElement(HtmlElements.DIV, file);
     writer.writeIdAttribute(clientId);
     writer.writeClassAttribute(Classes.create(file));
+    HtmlRendererUtils.writeDataAttributes(facesContext, writer, file);
     writer.writeStyleAttribute(style);
 
     // visible fake input for a pretty look

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/HiddenRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/HiddenRenderer.java?rev=1367921&r1=1367920&r2=1367921&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/HiddenRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/HiddenRenderer.java Wed Aug  1 11:13:46 2012
@@ -54,6 +54,7 @@ public class HiddenRenderer extends Inpu
     }
     writer.writeNameAttribute(clientId);
     writer.writeIdAttribute(clientId);
+    HtmlRendererUtils.writeDataAttributes(facesContext, writer, component);
     writer.writeAttribute(HtmlAttributes.VALUE, value != null ? value : "", true);
     writer.endElement(HtmlElements.INPUT);
   }

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ImageRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ImageRenderer.java?rev=1367921&r1=1367920&r2=1367921&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ImageRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ImageRenderer.java Wed Aug  1 11:13:46 2012
@@ -78,6 +78,7 @@ public class ImageRenderer extends Layou
     writer.startElement(HtmlElements.IMG, image);
     final String clientId = image.getClientId(facesContext);
     writer.writeIdAttribute(clientId);
+    HtmlRendererUtils.writeDataAttributes(facesContext, writer, image);
     if (src != null) {
       writer.writeAttribute(HtmlAttributes.SRC, src, true);
     }

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/InRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/InRenderer.java?rev=1367921&r1=1367920&r2=1367921&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/InRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/InRenderer.java Wed Aug  1 11:13:46 2012
@@ -98,6 +98,7 @@ public class InRenderer extends InputRen
       writer.writeAttribute(HtmlAttributes.TYPE, type, false);
       writer.writeNameAttribute(id);
       writer.writeIdAttribute(id);
+      HtmlRendererUtils.writeDataAttributes(facesContext, writer, input);
       if (currentValue != null) {
         writer.writeAttribute(HtmlAttributes.VALUE, currentValue, true);
       }

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/LabelRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/LabelRenderer.java?rev=1367921&r1=1367920&r2=1367921&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/LabelRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/LabelRenderer.java Wed Aug  1 11:13:46 2012
@@ -66,6 +66,7 @@ public class LabelRenderer extends Layou
 
     String clientId = label.getClientId(facesContext);
     writer.startElement(HtmlElements.LABEL, label);
+    HtmlRendererUtils.writeDataAttributes(facesContext, writer, label);
     HtmlRendererUtils.renderDojoDndItem(label, writer, true);
     final Classes classes = Classes.create(label);
     writer.writeClassAttribute(classes);

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/LinkRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/LinkRenderer.java?rev=1367921&r1=1367920&r2=1367921&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/LinkRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/LinkRenderer.java Wed Aug  1 11:13:46 2012
@@ -73,6 +73,7 @@ public class LinkRenderer extends Comman
         writer.writeAttribute(HtmlAttributes.ACCESSKEY, Character.toString(label.getAccessKey()), false);
       }
     }
+    HtmlRendererUtils.writeDataAttributes(facesContext, writer, link);
     Style style = new Style(facesContext, link);
     writer.writeStyleAttribute(style);
     HtmlRendererUtils.renderDojoDndItem(component, writer, true);

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MenuBarRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MenuBarRenderer.java?rev=1367921&r1=1367920&r2=1367921&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MenuBarRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MenuBarRenderer.java Wed Aug  1 11:13:46 2012
@@ -40,6 +40,7 @@ public class MenuBarRenderer extends Lay
     writer.startElement(HtmlElements.OL, menuBar);
     writer.writeIdAttribute(menuBar.getClientId(facesContext));
     writer.writeClassAttribute(Classes.create(menuBar));
+    HtmlRendererUtils.writeDataAttributes(facesContext, writer, menuBar);
     Style style = new Style(facesContext, menuBar);
     writer.writeStyleAttribute(style);
   }

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MessagesRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MessagesRenderer.java?rev=1367921&r1=1367920&r2=1367921&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MessagesRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MessagesRenderer.java Wed Aug  1 11:13:46 2012
@@ -82,6 +82,7 @@ public class MessagesRenderer extends La
     if (messageList.size() > 0) { // in ie empty span gets a height
       writer.startElement(HtmlElements.SPAN, messages);
       writer.writeClassAttribute(Classes.create(messages));
+      HtmlRendererUtils.writeDataAttributes(facesContext, writer, messages);
       writer.writeStyleAttribute(new Style(facesContext, messages));
 
       // with id

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ObjectRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ObjectRenderer.java?rev=1367921&r1=1367920&r2=1367921&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ObjectRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ObjectRenderer.java Wed Aug  1 11:13:46 2012
@@ -41,6 +41,7 @@ public class ObjectRenderer extends Layo
     writer.writeAttribute(HtmlAttributes.FRAMEBORDER, "0", false);
     writer.writeIdAttribute(object.getClientId(facesContext));
     writer.writeNameAttribute(object.getClientId(facesContext));
+    HtmlRendererUtils.writeDataAttributes(facesContext, writer, object);
     Object src = object.getSrc();
     if (src != null) {
       writer.writeAttribute(HtmlAttributes.SRC, String.valueOf(src), true);

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/OutRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/OutRenderer.java?rev=1367921&r1=1367920&r2=1367921&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/OutRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/OutRenderer.java Wed Aug  1 11:13:46 2012
@@ -52,6 +52,7 @@ public class OutRenderer extends LayoutC
       String id = out.getClientId(facesContext);
       writer.startElement(HtmlElements.SPAN, out);
       writer.writeIdAttribute(id);
+      HtmlRendererUtils.writeDataAttributes(facesContext, writer, out);
       Style style = new Style(facesContext, out);
       writer.writeStyleAttribute(style);
       HtmlRendererUtils.renderDojoDndItem(out, writer, true);

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PageRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PageRenderer.java?rev=1367921&r1=1367920&r2=1367921&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PageRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PageRenderer.java Wed Aug  1 11:13:46 2012
@@ -310,6 +310,7 @@ public class PageRenderer extends PageRe
     writer.startElement(HtmlElements.BODY, page);
     writer.writeIdAttribute(clientId);
     writer.writeClassAttribute(Classes.create(page));
+    HtmlRendererUtils.writeDataAttributes(facesContext, writer, page);
     HtmlRendererUtils.renderCommandFacet(page, facesContext, writer);
 
     if (debugMode) {

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PanelRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PanelRenderer.java?rev=1367921&r1=1367920&r2=1367921&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PanelRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PanelRenderer.java Wed Aug  1 11:13:46 2012
@@ -77,6 +77,7 @@ public class PanelRenderer extends Layou
     HtmlRendererUtils.renderDojoDndItem(panel, writer, true);
     writer.writeIdAttribute(clientId);
     writer.writeClassAttribute(Classes.create(panel));
+    HtmlRendererUtils.writeDataAttributes(facesContext, writer, panel);
     Style style = new Style(facesContext, panel);
     // XXX hotfix for panels in sheets
     if (style.getPosition() == null) {

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PopupRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PopupRenderer.java?rev=1367921&r1=1367920&r2=1367921&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PopupRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PopupRenderer.java Wed Aug  1 11:13:46 2012
@@ -91,6 +91,7 @@ public class PopupRenderer extends Layou
 
     writer.startElement(HtmlElements.DIV, popup);
     writer.writeIdAttribute(clientId);
+    HtmlRendererUtils.writeDataAttributes(facesContext, writer, popup);
     Style style = new Style(facesContext, popup);
     Integer zIndex = popup.getZIndex();
     if (zIndex == null) {

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ProgressRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ProgressRenderer.java?rev=1367921&r1=1367920&r2=1367921&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ProgressRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ProgressRenderer.java Wed Aug  1 11:13:46 2012
@@ -70,6 +70,7 @@ public class ProgressRenderer extends La
 
     writer.startElement(HtmlElements.DIV, progress);
     writer.writeClassAttribute(Classes.create(progress));
+    HtmlRendererUtils.writeDataAttributes(facesContext, writer, progress);
     writer.writeStyleAttribute(style);
     writer.writeAttribute(HtmlAttributes.TITLE, String.valueOf(title), true);
     UIComponent facet = progress.getFacet("complete");

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/RichTextEditorRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/RichTextEditorRenderer.java?rev=1367921&r1=1367920&r2=1367921&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/RichTextEditorRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/RichTextEditorRenderer.java Wed Aug  1 11:13:46 2012
@@ -99,6 +99,7 @@ public class RichTextEditorRenderer exte
 
     writer.startElement(HtmlElements.DIV, input);
     writer.writeClassAttribute(Classes.create(input, "container"));
+    HtmlRendererUtils.writeDataAttributes(facesContext, writer, input);
     Style style = new Style(facesContext, input);
     writer.writeStyleAttribute(style);
 

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectBooleanCheckboxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectBooleanCheckboxRenderer.java?rev=1367921&r1=1367920&r2=1367921&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectBooleanCheckboxRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectBooleanCheckboxRenderer.java Wed Aug  1 11:13:46 2012
@@ -81,6 +81,7 @@ public class SelectBooleanCheckboxRender
     writer.startElement(HtmlElements.DIV, select);
     writer.writeStyleAttribute(new Style(facesContext, select));
     writer.writeClassAttribute(Classes.create(select));
+    HtmlRendererUtils.writeDataAttributes(facesContext, writer, select);
     if (title != null) {
       writer.writeAttribute(HtmlAttributes.TITLE, title, true);
     }

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyCheckboxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyCheckboxRenderer.java?rev=1367921&r1=1367920&r2=1367921&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyCheckboxRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyCheckboxRenderer.java Wed Aug  1 11:13:46 2012
@@ -68,6 +68,7 @@ public class SelectManyCheckboxRenderer 
     writer.writeIdAttribute(id);
     writer.writeStyleAttribute(style);
     writer.writeClassAttribute(Classes.create(select));
+    HtmlRendererUtils.writeDataAttributes(facesContext, writer, select);
     if (title != null) {
       writer.writeAttribute(HtmlAttributes.TITLE, title, true);
     }

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyListboxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyListboxRenderer.java?rev=1367921&r1=1367920&r2=1367921&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyListboxRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyListboxRenderer.java Wed Aug  1 11:13:46 2012
@@ -63,6 +63,7 @@ public class SelectManyListboxRenderer e
     writer.startElement(HtmlElements.SELECT, select);
     writer.writeNameAttribute(id);
     writer.writeIdAttribute(id);
+    HtmlRendererUtils.writeDataAttributes(facesContext, writer, select);
     writer.writeAttribute(HtmlAttributes.DISABLED, disabled);
     writer.writeAttribute(HtmlAttributes.READONLY, readonly);
     writer.writeAttribute(HtmlAttributes.REQUIRED, select.isRequired());

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyShuttleRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyShuttleRenderer.java?rev=1367921&r1=1367920&r2=1367921&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyShuttleRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyShuttleRenderer.java Wed Aug  1 11:13:46 2012
@@ -49,6 +49,7 @@ public class SelectManyShuttleRenderer e
     writer.writeClassAttribute(Classes.create(select));
     String clientId = select.getClientId(facesContext);
     writer.writeIdAttribute(clientId);
+    HtmlRendererUtils.writeDataAttributes(facesContext, writer, select);
     String title = HtmlRendererUtils.getTitleFromTipAndMessages(facesContext, select);
     if (title != null) {
       writer.writeAttribute(HtmlAttributes.TITLE, title, true);

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectOneChoiceRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectOneChoiceRenderer.java?rev=1367921&r1=1367920&r2=1367921&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectOneChoiceRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectOneChoiceRenderer.java Wed Aug  1 11:13:46 2012
@@ -64,6 +64,7 @@ public class SelectOneChoiceRenderer ext
     writer.startElement(HtmlElements.SELECT, select);
     writer.writeNameAttribute(id);
     writer.writeIdAttribute(id);
+    HtmlRendererUtils.writeDataAttributes(facesContext, writer, select);
     writer.writeAttribute(HtmlAttributes.DISABLED, disabled);
     Integer tabIndex = select.getTabIndex();
     if (tabIndex != null) {

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectOneListboxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectOneListboxRenderer.java?rev=1367921&r1=1367920&r2=1367921&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectOneListboxRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectOneListboxRenderer.java Wed Aug  1 11:13:46 2012
@@ -62,6 +62,7 @@ public class SelectOneListboxRenderer ex
     writer.startElement(HtmlElements.SELECT, select);
     writer.writeNameAttribute(id);
     writer.writeIdAttribute(id);
+    HtmlRendererUtils.writeDataAttributes(facesContext, writer, select);
     writer.writeAttribute(HtmlAttributes.DISABLED, disabled);
     writer.writeAttribute(HtmlAttributes.READONLY, select.isReadonly());
     writer.writeAttribute(HtmlAttributes.REQUIRED, select.isRequired());

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectOneRadioRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectOneRadioRenderer.java?rev=1367921&r1=1367920&r2=1367921&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectOneRadioRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectOneRadioRenderer.java Wed Aug  1 11:13:46 2012
@@ -68,6 +68,7 @@ public class SelectOneRadioRenderer exte
     writer.writeIdAttribute(id);
     writer.writeStyleAttribute(style);
     writer.writeClassAttribute(Classes.create(select));
+    HtmlRendererUtils.writeDataAttributes(facesContext, writer, select);
     if (title != null) {
       writer.writeAttribute(HtmlAttributes.TITLE, title, true);
     }

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java?rev=1367921&r1=1367920&r2=1367921&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java Wed Aug  1 11:13:46 2012
@@ -99,6 +99,7 @@ public class SheetRenderer extends Layou
     // Outer sheet div
     writer.startElement(HtmlElements.DIV, sheet);
     writer.writeIdAttribute(sheetId);
+    HtmlRendererUtils.writeDataAttributes(facesContext, writer, sheet);
     final String css = Classes.create(sheet).getStringValue() + " " + Classes.create(sheet, "outer").getStringValue();
     // todo: please remove the "outer" sub in the future,
     // todo: it was renamed from tobago-sheet-outer to tobago-sheet because of naming conventions.

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TabGroupRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TabGroupRenderer.java?rev=1367921&r1=1367920&r2=1367921&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TabGroupRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TabGroupRenderer.java Wed Aug  1 11:13:46 2012
@@ -101,6 +101,7 @@ public class TabGroupRenderer extends La
     writer.startElement(HtmlElements.DIV, null);
     writer.writeIdAttribute(clientId);
     writer.writeClassAttribute(Classes.create(tabGroup));
+    HtmlRendererUtils.writeDataAttributes(facesContext, writer, tabGroup);
     writer.writeStyleAttribute(new Style(facesContext, tabGroup));
     writer.writeAttribute(HtmlAttributes.SWITCHTYPE, switchType, false);
 

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TextareaRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TextareaRenderer.java?rev=1367921&r1=1367920&r2=1367921&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TextareaRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TextareaRenderer.java Wed Aug  1 11:13:46 2012
@@ -59,6 +59,7 @@ public class TextareaRenderer extends In
     writer.startElement(HtmlElements.TEXTAREA, input);
     writer.writeNameAttribute(clientId);
     writer.writeIdAttribute(clientId);
+    HtmlRendererUtils.writeDataAttributes(facesContext, writer, input);
     writer.writeAttribute(HtmlAttributes.ROWS, null, Attributes.ROWS);
     if (title != null) {
       writer.writeAttribute(HtmlAttributes.TITLE, title, true);

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TimeRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TimeRenderer.java?rev=1367921&r1=1367920&r2=1367921&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TimeRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TimeRenderer.java Wed Aug  1 11:13:46 2012
@@ -93,6 +93,7 @@ public class TimeRenderer extends InputR
     writer.startElement(HtmlElements.DIV, time);
     writer.writeIdAttribute(id);
     writer.writeClassAttribute(Classes.create(time));
+    HtmlRendererUtils.writeDataAttributes(facesContext, writer, time);
     Style style = new Style(facesContext, time);
     writer.writeStyleAttribute(style);
     String dateInputId = (String) time.getAttributes().get(Attributes.DATE_INPUT_ID);

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ToolBarRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ToolBarRenderer.java?rev=1367921&r1=1367920&r2=1367921&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ToolBarRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ToolBarRenderer.java Wed Aug  1 11:13:46 2012
@@ -43,6 +43,7 @@ public class ToolBarRenderer extends Too
 
     writer.startElement(HtmlElements.DIV, toolBar);
     writer.writeIdAttribute(toolBar.getClientId(facesContext));
+    HtmlRendererUtils.writeDataAttributes(facesContext, writer, toolBar);
     HtmlRendererUtils.renderDojoDndItem(toolBar, writer, true);
     writer.writeClassAttribute(Classes.create(toolBar));
     Style style = new Style(facesContext, toolBar);

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeCommandRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeCommandRenderer.java?rev=1367921&r1=1367920&r2=1367921&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeCommandRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeCommandRenderer.java Wed Aug  1 11:13:46 2012
@@ -80,6 +80,7 @@ public class TreeCommandRenderer extends
     writer.writeStyleAttribute(createStyle(facesContext, command));
     writer.writeClassAttribute(Classes.create(command));
     writer.writeIdAttribute(clientId);
+    HtmlRendererUtils.writeDataAttributes(facesContext, writer, command);
     if (label.getAccessKey() != null) {
       writer.writeAttribute(HtmlAttributes.ACCESSKEY, Character.toString(label.getAccessKey()), false);
     }

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeIconRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeIconRenderer.java?rev=1367921&r1=1367920&r2=1367921&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeIconRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeIconRenderer.java Wed Aug  1 11:13:46 2012
@@ -92,7 +92,7 @@ public class TreeIconRenderer extends La
 
     writer.startElement(HtmlElements.IMG, null);
     writer.writeClassAttribute(Classes.create(node, "toggle", Markup.NULL));
-
+    HtmlRendererUtils.writeDataAttributes(facesContext, writer, image);
     writer.writeAttribute(HtmlAttributes.SRC, source, true);
     if (folder) {
       writer.writeAttribute(DataAttributes.SRCOPEN, openSource, true);

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeIndentRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeIndentRenderer.java?rev=1367921&r1=1367920&r2=1367921&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeIndentRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeIndentRenderer.java Wed Aug  1 11:13:46 2012
@@ -61,6 +61,7 @@ public class TreeIndentRenderer extends 
 
     writer.startElement(HtmlElements.SPAN, indent);
     writer.writeIdAttribute(indent.getClientId(facesContext));
+    HtmlRendererUtils.writeDataAttributes(facesContext, writer, indent);
 
     encodeIndent(
         facesContext, writer, node, showLines, showIcons, showRootJunction, showRoot, junctions);



Mime
View raw message