/** * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object) */ public int compare(Object arg0, Object arg1) { CmsSelectWidgetOption o1 = (CmsSelectWidgetOption)arg0; CmsSelectWidgetOption o2 = (CmsSelectWidgetOption)arg1; return m_collator.compare(o1.getOption(), o2.getOption()); } });
/** * @see org.opencms.widgets.I_CmsWidget#getDialogWidget(org.opencms.file.CmsObject, org.opencms.widgets.I_CmsWidgetDialog, org.opencms.widgets.I_CmsWidgetParameter) */ public String getDialogWidget(CmsObject cms, I_CmsWidgetDialog widgetDialog, I_CmsWidgetParameter param) { String id = param.getId(); StringBuffer result = new StringBuffer(16); result.append("<td class=\"xmlTd\">"); // get select box options from default value String List<CmsSelectWidgetOption> options = parseSelectOptions(cms, widgetDialog, param); String selected = getSelectedValue(cms, param); Iterator<CmsSelectWidgetOption> i = options.iterator(); while (i.hasNext()) { CmsSelectWidgetOption option = i.next(); // create the option result.append("<input type='radio' name='"); result.append(id); result.append("' value='"); result.append(option.getValue()); result.append("'"); if (selected.indexOf(option.getValue()) >= 0) { result.append(" checked"); } result.append(">"); result.append(option.getOption()); result.append("<br>"); } result.append("</td>"); return result.toString(); }
result.append(option.getOption()); result.append("</option>");
/** * @see org.opencms.widgets.I_CmsWidget#getDialogWidget(org.opencms.file.CmsObject, org.opencms.widgets.I_CmsWidgetDialog, org.opencms.widgets.I_CmsWidgetParameter) */ public String getDialogWidget(CmsObject cms, I_CmsWidgetDialog widgetDialog, I_CmsWidgetParameter param) { String id = param.getId(); StringBuffer result = new StringBuffer(16); result.append("<td class=\"xmlTd\">"); // get select box options from default value String List options = parseSelectOptions(cms, widgetDialog, param); String selected = getSelectedValue(cms, param); Iterator i = options.iterator(); while (i.hasNext()) { CmsSelectWidgetOption option = (CmsSelectWidgetOption)i.next(); // create the option result.append("<input type='radio' name='"); result.append(id); result.append("' value='"); result.append(option.getValue()); result.append("'"); if (selected.indexOf(option.getValue()) >= 0) { result.append(" checked"); } result.append(">"); result.append(option.getOption()); result.append("<br>"); } result.append("</td>"); return result.toString(); }
result.append(option.getOption()); result.append("</option>");
result.append(option.getOption()); result.append("</option>");
result.append(option.getOption()); result.append("</option>");
result.append(option.getOption()); result.append("</option>");
/** * @see org.opencms.widgets.A_CmsWidget#getWidgetStringValue(org.opencms.file.CmsObject, org.opencms.widgets.I_CmsWidgetDialog, org.opencms.widgets.I_CmsWidgetParameter) */ @Override public String getWidgetStringValue(CmsObject cms, I_CmsWidgetDialog widgetDialog, I_CmsWidgetParameter param) { String result = super.getWidgetStringValue(cms, widgetDialog, param); String configuration = CmsMacroResolver.resolveMacros(getConfiguration(), cms, widgetDialog.getMessages()); if (configuration == null) { configuration = param.getDefault(cms); } List options = CmsSelectWidgetOption.parseOptions(configuration); for (int m = 0; m < options.size(); m++) { CmsSelectWidgetOption option = (CmsSelectWidgetOption)options.get(m); if (result.equals(option.getValue())) { result = option.getOption(); break; } } return result; }
/** * @see org.opencms.widgets.A_CmsWidget#getWidgetStringValue(org.opencms.file.CmsObject, org.opencms.widgets.I_CmsWidgetDialog, org.opencms.widgets.I_CmsWidgetParameter) */ @Override public String getWidgetStringValue(CmsObject cms, I_CmsWidgetDialog widgetDialog, I_CmsWidgetParameter param) { String result = super.getWidgetStringValue(cms, widgetDialog, param); String configuration = CmsMacroResolver.resolveMacros(getConfiguration(), cms, widgetDialog.getMessages()); if (configuration == null) { configuration = param.getDefault(cms); } List<CmsSelectWidgetOption> options = CmsSelectWidgetOption.parseOptions(configuration); for (int m = 0; m < options.size(); m++) { CmsSelectWidgetOption option = options.get(m); if (result.equals(option.getValue())) { result = option.getOption(); break; } } return result; }
/** * @see org.opencms.widgets.A_CmsWidget#getWidgetStringValue(org.opencms.file.CmsObject, org.opencms.widgets.I_CmsWidgetDialog, org.opencms.widgets.I_CmsWidgetParameter) */ @Override public String getWidgetStringValue(CmsObject cms, I_CmsWidgetDialog widgetDialog, I_CmsWidgetParameter param) { String result = super.getWidgetStringValue(cms, widgetDialog, param); String configuration = CmsMacroResolver.resolveMacros(getConfiguration(), cms, widgetDialog.getMessages()); if (configuration == null) { configuration = param.getDefault(cms); } List<CmsSelectWidgetOption> options = CmsSelectWidgetOption.parseOptions(configuration); for (int m = 0; m < options.size(); m++) { CmsSelectWidgetOption option = options.get(m); if (result.equals(option.getValue())) { result = option.getOption(); break; } } return result; }
result.append(option.getOption()); result.append("</option>");
/** * @see org.opencms.widgets.A_CmsWidget#getWidgetStringValue(org.opencms.file.CmsObject, org.opencms.widgets.I_CmsWidgetDialog, org.opencms.widgets.I_CmsWidgetParameter) */ @Override public String getWidgetStringValue(CmsObject cms, I_CmsWidgetDialog widgetDialog, I_CmsWidgetParameter param) { String result = super.getWidgetStringValue(cms, widgetDialog, param); String configuration = CmsMacroResolver.resolveMacros(getConfiguration(), cms, widgetDialog.getMessages()); if (configuration == null) { configuration = param.getDefault(cms); } List options = CmsSelectWidgetOption.parseOptions(configuration); for (int m = 0; m < options.size(); m++) { CmsSelectWidgetOption option = (CmsSelectWidgetOption)options.get(m); if (result.equals(option.getValue())) { result = option.getOption(); break; } } return result; }
result.append(option.getOption()); result.append("</option>");
I_CmsFormatterBean formatter = cacheState.getFormatters().get(mapKey); if (formatter != null) { title = A_CmsFormatterWidget.getWidgetOptionForFormatter(cms, formatter).getOption();