You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xap-commits@incubator.apache.org by jm...@apache.org on 2007/06/20 21:25:53 UTC
svn commit: r549241 -
/incubator/xap/trunk/codebase/src/xap/bridges/xap/RadioButtonBridge.js
Author: jmargaris
Date: Wed Jun 20 14:25:52 2007
New Revision: 549241
URL: http://svn.apache.org/viewvc?view=rev&rev=549241
Log:
https://issues.apache.org/jira/browse/XAP-483 setting selected
to true on a selected radio button would change the selected
attribute to false
Modified:
incubator/xap/trunk/codebase/src/xap/bridges/xap/RadioButtonBridge.js
Modified: incubator/xap/trunk/codebase/src/xap/bridges/xap/RadioButtonBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/bridges/xap/RadioButtonBridge.js?view=diff&rev=549241&r1=549240&r2=549241
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/bridges/xap/RadioButtonBridge.js (original)
+++ incubator/xap/trunk/codebase/src/xap/bridges/xap/RadioButtonBridge.js Wed Jun 20 14:25:52 2007
@@ -145,7 +145,10 @@
if (this.group) {
var radioGroup = this.getSession().radioGroup[this.group];
- if (radioGroup && radioGroup.peer && radioGroup.relatedElement) {
+ //attempt to deselect whatever was already selected unless it was this
+ //button already
+ if (radioGroup && radioGroup.peer && radioGroup.relatedElement
+ && (radioGroup.peer != this.getPeer() )) {
radioGroup.peer.setOff();
radioGroup.relatedElement.writeBackAttribute("selected", "false");
}