mirror of
https://github.com/apache/struts.git
synced 2026-08-11 01:27:14 +00:00
WW-4168 Added if statement in method isChecked to verify that the String Array of checkBox name values is not null.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1512348 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
+6
-4
@@ -106,10 +106,12 @@ public class CheckboxListHandler extends AbstractTagHandler implements TagGenera
|
||||
Boolean checked = false;
|
||||
if (itemKeyStr != null) {
|
||||
String[] nameValues = (String[]) params.get("nameValue");
|
||||
for (String value : nameValues) {
|
||||
if (checked = value.equalsIgnoreCase(itemKeyStr)) {
|
||||
break;
|
||||
}
|
||||
if (nameValues != null) {
|
||||
for (String value : nameValues) {
|
||||
if (checked = value.equalsIgnoreCase(itemKeyStr)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return checked;
|
||||
|
||||
Reference in New Issue
Block a user