Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.3.4.1
-
None
-
Centos/tomcat
Description
Hello,
The CheckboxList does not handle correctly the params.get("nameValue");, as for the list they are an array of strings.
The following code makes it work correctly, CheckboxListHandler.java
Boolean checked = false; if (itemKeyStr != null) { String[] parms = (String[]) params.get("nameValue"); for (String parm : parms) { if (checked = parm.equalsIgnoreCase(itemKeyStr)) break; } } //Checkbox button section Attributes a = new Attributes(); a.add("type", "checkbox") .add("name", name) .add("value", itemKeyStr) .addIfTrue("checked", checked) <<< CHANGED .addIfTrue("readonly", params.get("readonly")) .addIfTrue("disabled", disabled) .addIfExists("tabindex", params.get("tabindex")) .addIfExists("id", name + "-" + Integer.toString(cnt++));