You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2016/03/11 09:28:51 UTC

svn commit: r1734506 - in /myfaces/tobago/branches/tobago-3.0.x: tobago-example/tobago-example-demo/src/main/webapp/script/ tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ tobago-theme/to...

Author: lofwyr
Date: Fri Mar 11 08:28:51 2016
New Revision: 1734506

URL: http://svn.apache.org/viewvc?rev=1734506&view=rev
Log:
 TOBAGO-1543 Paradigm: The clientId shoud be rendered in the local root element in HTML

Modified:
    myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/script/demo.js
    myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/FileRenderer.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/InRenderer.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/LabelLayoutRendererBase.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/OutRenderer.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectManyCheckboxRenderer.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectManyListboxRenderer.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectManyShuttleRenderer.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectOneChoiceRenderer.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectOneListboxRenderer.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectOneRadioRenderer.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TextareaRenderer.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-in.js
    myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/script/demo.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/script/demo.js?rev=1734506&r1=1734505&r2=1734506&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/script/demo.js (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/script/demo.js Fri Mar 11 08:28:51 2016
@@ -53,7 +53,7 @@ var initInspect = function (elements) {
     var element = jQuery(this);
     element.addClass("demo-selected");
 
-    var clientId = element.attr("id");
+    var clientId = element.closest("[id]").attr("id");
     var id = clientId.substr(clientId.lastIndexOf(":") + 1);
 
     var source = jQuery("#demo-view-source");

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/FileRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/FileRenderer.java?rev=1734506&r1=1734505&r2=1734506&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/FileRenderer.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/FileRenderer.java Fri Mar 11 08:28:51 2016
@@ -99,7 +99,6 @@ public class FileRenderer extends LabelL
     final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
 
     writer.startElement(HtmlElements.DIV);
-    writer.writeIdAttribute(clientId);
     writer.writeClassAttribute(Classes.create(file), file.getCustomClass());
     HtmlRendererUtils.writeDataAttributes(facesContext, writer, file);
     writer.writeStyleAttribute(file.getStyle());

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/InRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/InRenderer.java?rev=1734506&r1=1734505&r2=1734506&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/InRenderer.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/InRenderer.java Fri Mar 11 08:28:51 2016
@@ -66,7 +66,6 @@ public class InRenderer extends LabelLay
     writer.startElement(HtmlElements.INPUT);
     writer.writeAttribute(HtmlAttributes.TYPE, type);
     writer.writeNameAttribute(id);
-    writer.writeIdAttribute(id);
     HtmlRendererUtils.writeDataAttributes(facesContext, writer, input);
     if (currentValue != null) {
       writer.writeAttribute(HtmlAttributes.VALUE, currentValue, true);

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/LabelLayoutRendererBase.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/LabelLayoutRendererBase.java?rev=1734506&r1=1734505&r2=1734506&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/LabelLayoutRendererBase.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/LabelLayoutRendererBase.java Fri Mar 11 08:28:51 2016
@@ -118,6 +118,7 @@ public abstract class LabelLayoutRendere
 
 //    if (labelLayout != LabelLayout.none) {
     writer.startElement(HtmlElements.DIV);
+    writer.writeIdAttribute(component.getClientId(facesContext));
 //    }
 //    writer.writeClassAttribute(divClass, BootstrapClass.maximumSeverity(component));
     // todo: check if BootstrapClass.FORM_GROUP is needed, I've removed it, because of it's margin-bottom: 15px;

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/OutRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/OutRenderer.java?rev=1734506&r1=1734505&r2=1734506&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/OutRenderer.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/OutRenderer.java Fri Mar 11 08:28:51 2016
@@ -21,8 +21,8 @@ package org.apache.myfaces.tobago.render
 
 import org.apache.myfaces.tobago.component.UIOut;
 import org.apache.myfaces.tobago.config.TobagoConfig;
-import org.apache.myfaces.tobago.renderkit.css.Classes;
 import org.apache.myfaces.tobago.renderkit.css.BootstrapClass;
+import org.apache.myfaces.tobago.renderkit.css.Classes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlElements;
 import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtils;
@@ -54,9 +54,7 @@ public class OutRenderer extends LabelLa
     final boolean createSpan = out.isCreateSpan();
 
     if (createSpan) {
-      final String id = out.getClientId(facesContext);
       writer.startElement(HtmlElements.SPAN);
-      writer.writeIdAttribute(id);
       HtmlRendererUtils.writeDataAttributes(facesContext, writer, out);
       writer.writeStyleAttribute(out.getStyle());
       writer.writeClassAttribute(Classes.create(out), BootstrapClass.FORM_CONTROL_STATIC, out.getCustomClass());

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectManyCheckboxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectManyCheckboxRenderer.java?rev=1734506&r1=1734505&r2=1734506&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectManyCheckboxRenderer.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectManyCheckboxRenderer.java Fri Mar 11 08:28:51 2016
@@ -51,7 +51,6 @@ public class SelectManyCheckboxRenderer
     final boolean required = select.isRequired();
 
     writer.startElement(HtmlElements.OL);
-    writer.writeIdAttribute(id);
     writer.writeStyleAttribute(select.getStyle());
     writer.writeClassAttribute(Classes.create(select), select.getCustomClass());
     HtmlRendererUtils.writeDataAttributes(facesContext, writer, select);

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectManyListboxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectManyListboxRenderer.java?rev=1734506&r1=1734505&r2=1734506&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectManyListboxRenderer.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectManyListboxRenderer.java Fri Mar 11 08:28:51 2016
@@ -59,7 +59,6 @@ public class SelectManyListboxRenderer e
     final String title = HtmlRendererUtils.getTitleFromTipAndMessages(facesContext, select);
     writer.startElement(HtmlElements.SELECT);
     writer.writeNameAttribute(id);
-    writer.writeIdAttribute(id);
     HtmlRendererUtils.writeDataAttributes(facesContext, writer, select);
     writer.writeAttribute(HtmlAttributes.DISABLED, disabled);
     writer.writeAttribute(HtmlAttributes.READONLY, readonly);

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectManyShuttleRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectManyShuttleRenderer.java?rev=1734506&r1=1734505&r2=1734506&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectManyShuttleRenderer.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectManyShuttleRenderer.java Fri Mar 11 08:28:51 2016
@@ -48,7 +48,6 @@ public class SelectManyShuttleRenderer e
     writer.startElement(HtmlElements.DIV);
     writer.writeClassAttribute(Classes.create(select), select.getCustomClass());
     final String clientId = select.getClientId(facesContext);
-    writer.writeIdAttribute(clientId);
     HtmlRendererUtils.writeDataAttributes(facesContext, writer, select);
     final String title = HtmlRendererUtils.getTitleFromTipAndMessages(facesContext, select);
     if (title != null) {

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectOneChoiceRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectOneChoiceRenderer.java?rev=1734506&r1=1734505&r2=1734506&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectOneChoiceRenderer.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectOneChoiceRenderer.java Fri Mar 11 08:28:51 2016
@@ -55,7 +55,6 @@ public class SelectOneChoiceRenderer ext
 
     writer.startElement(HtmlElements.SELECT);
     writer.writeNameAttribute(id);
-    writer.writeIdAttribute(id);
     HtmlRendererUtils.writeDataAttributes(facesContext, writer, select);
     writer.writeAttribute(HtmlAttributes.DISABLED, disabled);
     writer.writeAttribute(HtmlAttributes.TABINDEX, select.getTabIndex());

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectOneListboxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectOneListboxRenderer.java?rev=1734506&r1=1734505&r2=1734506&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectOneListboxRenderer.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectOneListboxRenderer.java Fri Mar 11 08:28:51 2016
@@ -57,7 +57,6 @@ public class SelectOneListboxRenderer ex
 
     writer.startElement(HtmlElements.SELECT);
     writer.writeNameAttribute(id);
-    writer.writeIdAttribute(id);
     HtmlRendererUtils.writeDataAttributes(facesContext, writer, select);
     writer.writeAttribute(HtmlAttributes.DISABLED, disabled);
     writer.writeAttribute(HtmlAttributes.READONLY, select.isReadonly());

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectOneRadioRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectOneRadioRenderer.java?rev=1734506&r1=1734505&r2=1734506&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectOneRadioRenderer.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectOneRadioRenderer.java Fri Mar 11 08:28:51 2016
@@ -54,7 +54,6 @@ public class SelectOneRadioRenderer exte
     final boolean required = select.isRequired();
 
     writer.startElement(HtmlElements.OL);
-    writer.writeIdAttribute(id);
     writer.writeStyleAttribute(select.getStyle());
     writer.writeClassAttribute(Classes.create(select), select.getCustomClass());
     HtmlRendererUtils.writeDataAttributes(facesContext, writer, select);

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TextareaRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TextareaRenderer.java?rev=1734506&r1=1734505&r2=1734506&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TextareaRenderer.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TextareaRenderer.java Fri Mar 11 08:28:51 2016
@@ -60,7 +60,6 @@ public class TextareaRenderer extends La
 
     writer.startElement(HtmlElements.TEXTAREA);
     writer.writeNameAttribute(clientId);
-    writer.writeIdAttribute(clientId);
     HtmlRendererUtils.writeDataAttributes(facesContext, writer, input);
     writer.writeAttribute(HtmlAttributes.ROWS, rows);
     writer.writeAttribute(HtmlAttributes.TITLE, title, true);

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-in.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-in.js?rev=1734506&r1=1734505&r2=1734506&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-in.js (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-in.js Fri Mar 11 08:28:51 2016
@@ -26,19 +26,19 @@ Tobago.In = function(inId, required, req
 Tobago.In.init = function(elements) {
   var ins = Tobago.Utils.selectWithJQuery(elements, ".tobago-in");
   ins.each(function(){
-    var id = jQuery(this).attr("id");
+    var id = jQuery(this).closest("[id]").attr("id");
     var required = jQuery(this).attr("required") != undefined;
     new Tobago.In(id, required, 'tobago-in-markup-required');
   });
   ins = Tobago.Utils.selectWithJQuery(elements, ".tobago-date");
   ins.each(function(){
-    var id = jQuery(this).attr("id");
+    var id = jQuery(this).closest("[id]").attr("id");
     var required = jQuery(this).attr("required") != undefined;
       new Tobago.In(id, required, 'tobago-date-markup-required');
   });
   ins = Tobago.Utils.selectWithJQuery(elements, ".tobago-textarea");
   ins.each(function(){
-    var id = jQuery(this).attr("id");
+    var id = jQuery(this).closest("[id]").attr("id");
     var required = jQuery(this).attr("required") != undefined;
     new Tobago.In(id, required, 'tobago-textarea-markup-required');
   });

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js?rev=1734506&r1=1734505&r2=1734506&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js Fri Mar 11 08:28:51 2016
@@ -2422,33 +2422,33 @@ Tobago.SelectOneRadio.init = function(el
   var selectOneRadios = Tobago.Utils.selectWithJQuery(elements, ".tobago-selectOneRadio");
   selectOneRadios.each(function() {
     var ul = jQuery(this);
-    var radios = jQuery('input[name="' + ul.attr('id').replace(/:/g, '\\:') + '"]');
+    var id = ul.closest("[id]").attr("id");
+    var radios = jQuery('input[name="' + id.replace(/([:\.])/g, '\\$1') + '"]');
     radios.each(function () {
       var selectOneRadio = jQuery(this);
-      selectOneRadio.data("oldValue", selectOneRadio.prop("checked"));
+      selectOneRadio.data("tobago-old-value", selectOneRadio.prop("checked"));
     });
     radios.click(function() {
       var selectOneRadio = jQuery(this);
       var readonly = selectOneRadio.prop("readonly");
       var required = selectOneRadio.prop("required");
       if (!required && !readonly) {
-        if (selectOneRadio.data("oldValue") == selectOneRadio.prop("checked")) {
+        if (selectOneRadio.data("tobago-old-value") == selectOneRadio.prop("checked")) {
           selectOneRadio.prop("checked", false);
         }
-        selectOneRadio.data("oldValue", selectOneRadio.prop("checked"));
+        selectOneRadio.data("tobago-old-value", selectOneRadio.prop("checked"));
       }
-      var radios = jQuery('input[name="' + ul.attr('id').replace(/:/g, '\\:') + '"]');
       if (readonly) {
         radios.each(function () {
           var radio = jQuery(this);
-          radio.prop("checked", radio.data("oldValue"));
+          radio.prop("checked", radio.data("tobago-old-value"));
         });
       } else {
         radios.each(function () {
           if (this.id != selectOneRadio.get(0).id) {
             var radio = jQuery(this);
             radio.prop("checked", false);
-            radio.data("oldValue", radio.prop("checked"));
+            radio.data("tobago-old-value", radio.prop("checked"));
           }
         });
       }
@@ -2469,16 +2469,16 @@ Tobago.SelectOneListbox.init = function
   notRequired
       .change(function () {
         var element = jQuery(this);
-        if (element.data("tobago-oldvalue") == undefined) {
-          element.data("tobago-oldvalue", -1);
+        if (element.data("tobago-old-value") == undefined) {
+          element.data("tobago-old-value", -1);
         }
       }).click(function () {
         var element = jQuery(this);
-        if (element.data("tobago-oldvalue") == undefined
-            || element.data("tobago-oldvalue") == element.prop("selectedIndex")) {
+        if (element.data("tobago-old-value") == undefined
+            || element.data("tobago-old-value") == element.prop("selectedIndex")) {
           element.prop("selectedIndex", -1);
         }
-        element.data("tobago-oldvalue", element.prop("selectedIndex"));
+        element.data("tobago-old-value", element.prop("selectedIndex"));
       });
 };