From 805fcf95891160d53745af042ecffd6d1ea5a4f5 Mon Sep 17 00:00:00 2001 From: Ken ISHIMOTO Date: Sat, 14 Jul 2012 11:48:31 +0200 Subject: [PATCH] Add disable Binding --- .../ERJQueryMobile/Components/ERQMRadioList.api | 1 + .../ERQMRadioList.wo/ERQMRadioList.wod | 2 +- .../jquerymobile/components/ERQMRadioList.java | 16 ++++++++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/Frameworks/Ajax/ERJQueryMobile/Components/ERQMRadioList.api b/Frameworks/Ajax/ERJQueryMobile/Components/ERQMRadioList.api index f8ffb5c7d9e..b00501c766f 100644 --- a/Frameworks/Ajax/ERJQueryMobile/Components/ERQMRadioList.api +++ b/Frameworks/Ajax/ERJQueryMobile/Components/ERQMRadioList.api @@ -15,5 +15,6 @@ + diff --git a/Frameworks/Ajax/ERJQueryMobile/Components/Nonlocalized.lproj/ERQMRadioList.wo/ERQMRadioList.wod b/Frameworks/Ajax/ERJQueryMobile/Components/Nonlocalized.lproj/ERQMRadioList.wo/ERQMRadioList.wod index 86048d84667..0780b46663c 100644 --- a/Frameworks/Ajax/ERJQueryMobile/Components/Nonlocalized.lproj/ERQMRadioList.wo/ERQMRadioList.wod +++ b/Frameworks/Ajax/ERJQueryMobile/Components/Nonlocalized.lproj/ERQMRadioList.wo/ERQMRadioList.wod @@ -19,7 +19,7 @@ RadioButton : WOGenericElement { name = wrapperElementID; id = id; value = index; - otherTagString = isCurrentItemSelected; + otherTagString = otherTagString; } LABEL : WOGenericContainer { diff --git a/Frameworks/Ajax/ERJQueryMobile/Sources/er/jquerymobile/components/ERQMRadioList.java b/Frameworks/Ajax/ERJQueryMobile/Sources/er/jquerymobile/components/ERQMRadioList.java index 95b089ce269..6ce19368989 100644 --- a/Frameworks/Ajax/ERJQueryMobile/Sources/er/jquerymobile/components/ERQMRadioList.java +++ b/Frameworks/Ajax/ERJQueryMobile/Sources/er/jquerymobile/components/ERQMRadioList.java @@ -5,6 +5,8 @@ import com.webobjects.appserver.WOContext; import com.webobjects.woextensions.WORadioButtonMatrix; +import er.extensions.foundation.ERXStringUtilities; + @SuppressWarnings("serial") public class ERQMRadioList extends WORadioButtonMatrix { @@ -39,4 +41,18 @@ public String id() { return wrapperElementID + String.valueOf(index); } + public String otherTagString() { + String s = super.isCurrentItemSelected(); + + if(valueForBooleanBinding("disabled", false)) { + if(!ERXStringUtilities.stringIsNullOrEmpty(s)) { + s += " "; + } else { + s = ""; + } + s += "disabled"; + } + + return s; + } }