From d587a687a85edb771d8d6421e45f7e699f116a94 Mon Sep 17 00:00:00 2001 From: Aleksandr Mashchenko Date: Sat, 30 May 2015 18:35:25 +0300 Subject: [PATCH] WW-4499 - Removed readonly attribute from radio, checkbox and checkboxlist tags. --- .../java/org/apache/struts2/components/Checkbox.java | 10 ---------- .../org/apache/struts2/components/CheckboxList.java | 11 ----------- .../java/org/apache/struts2/components/Radio.java | 11 ----------- core/src/main/resources/template/simple/checkbox.ftl | 3 --- core/src/main/resources/template/simple/radiomap.ftl | 3 --- core/src/site/resources/tags/checkbox.html | 8 -------- core/src/site/resources/tags/checkboxlist.html | 8 -------- core/src/site/resources/tags/radio.html | 8 -------- 8 files changed, 62 deletions(-) diff --git a/core/src/main/java/org/apache/struts2/components/Checkbox.java b/core/src/main/java/org/apache/struts2/components/Checkbox.java index 5ab5d44b3..e1765b295 100644 --- a/core/src/main/java/org/apache/struts2/components/Checkbox.java +++ b/core/src/main/java/org/apache/struts2/components/Checkbox.java @@ -60,7 +60,6 @@ public class Checkbox extends UIBean { final public static String TEMPLATE = "checkbox"; protected String fieldValue; - protected String readonly; public Checkbox(ValueStack stack, HttpServletRequest request, HttpServletResponse response) { super(stack, request, response); @@ -76,10 +75,6 @@ public class Checkbox extends UIBean { } else { addParameter("fieldValue", "true"); } - - if (readonly != null) { - addParameter("readonly", findValue(readonly, Boolean.class)); - } } protected Class getValueClassType() { @@ -90,10 +85,5 @@ public class Checkbox extends UIBean { public void setFieldValue(String fieldValue) { this.fieldValue = fieldValue; } - - @StrutsTagAttribute(description="Whether the input is readonly", type="Boolean", defaultValue="false") - public void setReadonly(String readonly) { - this.readonly = readonly; - } } diff --git a/core/src/main/java/org/apache/struts2/components/CheckboxList.java b/core/src/main/java/org/apache/struts2/components/CheckboxList.java index 503dad5cd..e83c8beb8 100644 --- a/core/src/main/java/org/apache/struts2/components/CheckboxList.java +++ b/core/src/main/java/org/apache/struts2/components/CheckboxList.java @@ -53,8 +53,6 @@ import com.opensymphony.xwork2.util.ValueStack; public class CheckboxList extends ListUIBean { final public static String TEMPLATE = "checkboxlist"; - protected String readonly; - public CheckboxList(ValueStack stack, HttpServletRequest request, HttpServletResponse response) { super(stack, request, response); } @@ -65,15 +63,6 @@ public class CheckboxList extends ListUIBean { public void evaluateExtraParams() { super.evaluateExtraParams(); - - if (readonly != null) { - addParameter("readonly", findValue(readonly, Boolean.class)); - } - } - - @StrutsTagAttribute(description="Whether the input is readonly", type="Boolean", defaultValue="false") - public void setReadonly(String readonly) { - this.readonly = readonly; } } \ No newline at end of file diff --git a/core/src/main/java/org/apache/struts2/components/Radio.java b/core/src/main/java/org/apache/struts2/components/Radio.java index ce13803a4..4d1a7451c 100644 --- a/core/src/main/java/org/apache/struts2/components/Radio.java +++ b/core/src/main/java/org/apache/struts2/components/Radio.java @@ -60,8 +60,6 @@ import javax.servlet.http.HttpServletResponse; public class Radio extends ListUIBean { final public static String TEMPLATE = "radiomap"; - protected String readonly; - public Radio(ValueStack stack, HttpServletRequest request, HttpServletResponse response) { super(stack, request, response); } @@ -72,14 +70,5 @@ public class Radio extends ListUIBean { public void evaluateExtraParams() { super.evaluateExtraParams(); - - if (readonly != null) { - addParameter("readonly", findValue(readonly, Boolean.class)); - } - } - - @StrutsTagAttribute(description="Whether the input is readonly", type="Boolean", defaultValue="false") - public void setReadonly(String readonly) { - this.readonly = readonly; } } \ No newline at end of file diff --git a/core/src/main/resources/template/simple/checkbox.ftl b/core/src/main/resources/template/simple/checkbox.ftl index d43188878..fd4781044 100644 --- a/core/src/main/resources/template/simple/checkbox.ftl +++ b/core/src/main/resources/template/simple/checkbox.ftl @@ -27,9 +27,6 @@ <#if parameters.disabled!false> disabled="disabled"<#rt/> -<#if parameters.readonly!false> - readonly="readonly"<#rt/> - <#if parameters.tabindex?has_content> tabindex="${parameters.tabindex?html}"<#rt/> diff --git a/core/src/main/resources/template/simple/radiomap.ftl b/core/src/main/resources/template/simple/radiomap.ftl index 9160e05dc..80b881525 100644 --- a/core/src/main/resources/template/simple/radiomap.ftl +++ b/core/src/main/resources/template/simple/radiomap.ftl @@ -73,9 +73,6 @@ <#if parameters.disabled!false> disabled="disabled"<#rt/> -<#if parameters.readonly!false> - readonly="readonly"<#rt/> - <#if parameters.tabindex?has_content> tabindex="${parameters.tabindex?html}"<#rt/> diff --git a/core/src/site/resources/tags/checkbox.html b/core/src/site/resources/tags/checkbox.html index 368d72331..75cd10679 100644 --- a/core/src/site/resources/tags/checkbox.html +++ b/core/src/site/resources/tags/checkbox.html @@ -273,14 +273,6 @@ Please do not edit it directly. String Set the html onselect attribute on rendered html element - - readonly - false - false - false - Boolean - Whether the input is readonly - requiredLabel false diff --git a/core/src/site/resources/tags/checkboxlist.html b/core/src/site/resources/tags/checkboxlist.html index 5359aa90e..27e90b2a9 100644 --- a/core/src/site/resources/tags/checkboxlist.html +++ b/core/src/site/resources/tags/checkboxlist.html @@ -329,14 +329,6 @@ Please do not edit it directly. String Set the html onselect attribute on rendered html element - - readonly - false - false - false - Boolean - Whether the input is readonly - requiredLabel false diff --git a/core/src/site/resources/tags/radio.html b/core/src/site/resources/tags/radio.html index 0f262821f..5fba64cb8 100644 --- a/core/src/site/resources/tags/radio.html +++ b/core/src/site/resources/tags/radio.html @@ -329,14 +329,6 @@ Please do not edit it directly. String Set the html onselect attribute on rendered html element - - readonly - false - false - false - Boolean - Whether the input is readonly - requiredLabel false