You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by iv...@apache.org on 2008/10/29 18:59:59 UTC

svn commit: r708961 - /wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/RadioChoice.java

Author: ivaynberg
Date: Wed Oct 29 10:59:58 2008
New Revision: 708961

URL: http://svn.apache.org/viewvc?rev=708961&view=rev
Log:
WICKET-1903

Modified:
    wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/RadioChoice.java

Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/RadioChoice.java
URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/RadioChoice.java?rev=708961&r1=708960&r2=708961&view=diff
==============================================================================
--- wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/RadioChoice.java (original)
+++ wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/RadioChoice.java Wed Oct 29 10:59:58 2008
@@ -437,13 +437,16 @@
 				String id = getChoiceRenderer().getIdValue(choice, index);
 				final String idAttr = getMarkupId() + "_" + id;
 
+				boolean enabled = isEnabled() && isEnableAllowed() &&
+					!isDisabled(choice, index, selected);
+
 				// Add radio tag
 				buffer.append("<input name=\"")
 					.append(getInputName())
 					.append("\"")
 					.append(" type=\"radio\"")
 					.append((isSelected(choice, index, selected) ? " checked=\"checked\"" : ""))
-					.append((isEnabled() ? "" : " disabled=\"disabled\""))
+					.append((enabled ? "" : " disabled=\"disabled\""))
 					.append(" value=\"")
 					.append(id)
 					.append("\" id=\"")