-
Bug
-
Resolution: Fixed
-
Normal
-
6.5.3
-
Irrelevant
This code is better for org.zkoss.zkplus.databind.RadiogroupSelectedItemConverter:
public Object coerceToUi(Object val, Component comp) {
if (val != null && comp instanceof Radiogroup) {
Radiogroup rg = (Radiogroup) comp;
// iterate to find the selected radio via the value
for (Iterator<Radio> it = rg.getItems().iterator(); it.hasNext() {
Radio child = it.next();
if (val.equals(((Radio) child).getValue()))
}
}
return null;
}
Feel free to add this simple snippet to ZK.