/** * Sets the value of the widget. * * <p> * * @param value the new value */ @SuppressWarnings("unchecked") public void setFormValue(Object value) { if (value instanceof List<?>) { List<String> keys = (List<String>) value; Set<String> keySet = new HashSet<String>(keys); int i = 0; for (Map.Entry<String, String> entry : m_items.entrySet()) { String key = entry.getKey(); CmsCheckBox checkbox = m_checkboxes.get(i); checkbox.setChecked(keySet.contains(key)); i += 1; } } }
/** @see org.opencms.gwt.client.ui.input.I_CmsFormWidget#reset() */ public void reset() { for (CmsCheckBox checkbox : m_checkboxes) { checkbox.setChecked(false); } }