Map parameters = ai.getInvocationContext().getParameters();
Map<String, String> newParams = new HashMap<String, String>();
Set<String> keys = parameters.keySet();
for (Iterator<String> iterator = keys.iterator(); iterator.hasNext();) {
String key = iterator.next();
if (key.startsWith("__checkbox_")) {
String name = key.substring("__checkbox_".length());
iterator.remove();
// is this checkbox checked/submitted?
if (!parameters.containsKey(name)) {
// if not, let's be sure to default the value to false
newParams.put(name, uncheckedValue);
}
}
}
parameters.putAll(newParams);
return ai.invoke();