/** * @see org.opencms.widgets.I_CmsWidget#newInstance() */ @Override public I_CmsWidget newInstance() { return new CmsMultiSelectGroupWidget(getConfiguration()); }
/** * Returns if a group filter is configured to match groups to show in the select box.<p> * * @return <code>true</code> if a group filter is configured, otherwise <code>false</code> */ private boolean isUseGroupFilter() { return getGroupFilter() != null; }
/** * Returns if group names are configured to show in the select box.<p> * * @return <code>true</code> if group names are configured, otherwise <code>false</code> */ private boolean isUseGroupNames() { return getGroupNames() != null; }
if (getSelectOptions() == null) { parseConfiguration(cms, messages); List<CmsSelectWidgetOption> result = new ArrayList<CmsSelectWidgetOption>(); if (isUseGroupNames()) { for (Iterator<String> i = getGroupNames().iterator(); i.hasNext();) { String groupName = i.next(); try { CmsGroup group = cms.readGroup(getOuFqn() + groupName); result.add( new CmsSelectWidgetOption(group.getName(), m_defaultAllAvailable, group.getSimpleName())); List<CmsGroup> groups = OpenCms.getOrgUnitManager().getGroups(cms, getOuFqn(), isIncludeSubOus()); for (Iterator<CmsGroup> i = groups.iterator(); i.hasNext();) { CmsGroup group = i.next(); if (isUseGroupFilter()) { if (!getGroupFilter().matcher(group.getSimpleName()).matches()) { continue; setSelectOptions(result); return getSelectOptions();
String height = getHeight(); List<CmsSelectWidgetOption> options = parseSelectOptions(cms, widgetDialog.getMessages(), param); result.append("<td class=\"xmlTd\">"); List<String> values = getSelectedValues(cms, param); if (values.size() > 0) { result.append(values.get(0)); List<String> selected = getSelectedValues(cms, param); Iterator<CmsSelectWidgetOption> i = options.iterator(); while (i.hasNext()) {
/** * @see org.opencms.widgets.I_CmsWidget#getDialogIncludes(org.opencms.file.CmsObject, org.opencms.widgets.I_CmsWidgetDialog) */ @Override public String getDialogIncludes(CmsObject cms, I_CmsWidgetDialog widgetDialog) { return getJSIncludeFile(CmsWorkplace.getSkinUri() + "components/widgets/multiselector.js"); }
String configString = CmsMacroResolver.resolveMacros(getConfiguration(), cms, widgetDialog); Map<String, String> config = CmsStringUtil.splitAsMap(configString, "|", "=");