Package org.opencms.widgets
Class CmsSelectWidget
- java.lang.Object
-
- org.opencms.widgets.A_CmsWidget
-
- org.opencms.widgets.A_CmsSelectWidget
-
- org.opencms.widgets.CmsSelectWidget
-
- All Implemented Interfaces:
I_CmsADEWidget
,I_CmsWidget
- Direct Known Subclasses:
A_CmsFormatterWidget
,CmsDependentSelectWidget
,CmsDisplayTypeSelectWidget
,CmsElementViewSelectWidget
,CmsFilterSelectWidget
,CmsSelectGroupWidget
,CmsSelectOnChangeReloadWidget
,CmsUserWidget
public class CmsSelectWidget extends A_CmsSelectWidget
Provides a widget for a standard HTML form select box.Please see the documentation of
for a description about the configuration String syntax for the select options.CmsSelectWidgetOption
The select widget does use the following select options:
for theCmsSelectWidgetOption.getValue()
value
of the HTML select box
for pre-selecting a specific valueCmsSelectWidgetOption.isDefault()
for theCmsSelectWidgetOption.getOption()
option
of the HTML select box
- Since:
- 6.0.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.opencms.widgets.A_CmsWidget
A_CmsWidget.CmsDummyWidgetDialog
-
-
Field Summary
-
Fields inherited from class org.opencms.widgets.A_CmsSelectWidget
CONFIGURATION_HEIGHT
-
Fields inherited from class org.opencms.widgets.A_CmsWidget
HELP_POSTFIX, LABEL_PREFIX
-
-
Constructor Summary
Constructors Constructor Description CmsSelectWidget()
Creates a new select widget.CmsSelectWidget(java.lang.String configuration)
Creates a select widget with the specified select options.CmsSelectWidget(java.util.List<CmsSelectWidgetOption> configuration)
Creates a select widget with the select options specified in the given configuration List.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDialogWidget(CmsObject cms, I_CmsWidgetDialog widgetDialog, I_CmsWidgetParameter param)
Generates the widget HTML for the provided widget parameter.java.lang.String
getWidgetName()
Returns the class name of the widget.java.lang.String
getWidgetStringValue(CmsObject cms, I_CmsWidgetDialog widgetDialog, I_CmsWidgetParameter param)
Returns the
processed according to the output rules of this widget and the given widget dialog.I_CmsWidgetParameter.getStringValue(CmsObject)
I_CmsWidget
newInstance()
Creates a duplicate of this widget instance.-
Methods inherited from class org.opencms.widgets.A_CmsSelectWidget
addSelectOption, getConfiguration, getConfiguration, getCssResourceLinks, getDefaultDisplayType, getHeight, getInitCall, getJavaScriptResourceLinks, getResourcePath, getSelectedValue, getSelectedValues, getSelectOptions, isInternal, parseSelectOptions, setConfiguration, setSelectOptions
-
Methods inherited from class org.opencms.widgets.A_CmsWidget
equals, getDialogHtmlEnd, getDialogIncludes, getDialogInitCall, getDialogInitMethod, getHelpBubble, getHelpKey, getHelpText, getJsHelpMouseHandler, getJSIncludeFile, getLabelKey, hashCode, isCompactViewEnabled, setEditorValue
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opencms.widgets.I_CmsWidget
getDialogHtmlEnd, getDialogIncludes, getDialogInitCall, getDialogInitMethod, getHelpBubble, getHelpText, isCompactViewEnabled, setEditorValue
-
-
-
-
Constructor Detail
-
CmsSelectWidget
public CmsSelectWidget()
Creates a new select widget.
-
CmsSelectWidget
public CmsSelectWidget(java.util.List<CmsSelectWidgetOption> configuration)
Creates a select widget with the select options specified in the given configuration List.The list elements must be of type
.CmsSelectWidgetOption
- Parameters:
configuration
- the configuration (possible options) for the select widget- See Also:
CmsSelectWidgetOption
-
CmsSelectWidget
public CmsSelectWidget(java.lang.String configuration)
Creates a select widget with the specified select options.- Parameters:
configuration
- the configuration (possible options) for the select box
-
-
Method Detail
-
getDialogWidget
public java.lang.String getDialogWidget(CmsObject cms, I_CmsWidgetDialog widgetDialog, I_CmsWidgetParameter param)
Description copied from interface:I_CmsWidget
Generates the widget HTML for the provided widget parameter.- Parameters:
cms
- an initialized instance of a CmsObjectwidgetDialog
- the dialog where the widget is used onparam
- the widget parameter to generate the widget for- Returns:
- the widget HTML for the provided widget parameter
- See Also:
I_CmsWidget.getDialogWidget(org.opencms.file.CmsObject, org.opencms.widgets.I_CmsWidgetDialog, org.opencms.widgets.I_CmsWidgetParameter)
-
getWidgetName
public java.lang.String getWidgetName()
Description copied from interface:I_CmsADEWidget
Returns the class name of the widget.- Specified by:
getWidgetName
in interfaceI_CmsADEWidget
- Overrides:
getWidgetName
in classA_CmsSelectWidget
- Returns:
- the class name
- See Also:
I_CmsADEWidget.getWidgetName()
-
getWidgetStringValue
public java.lang.String getWidgetStringValue(CmsObject cms, I_CmsWidgetDialog widgetDialog, I_CmsWidgetParameter param)
Description copied from interface:I_CmsWidget
Returns the
processed according to the output rules of this widget and the given widget dialog.I_CmsWidgetParameter.getStringValue(CmsObject)
- Specified by:
getWidgetStringValue
in interfaceI_CmsWidget
- Overrides:
getWidgetStringValue
in classA_CmsWidget
- Parameters:
cms
- the current users OpenCms contextwidgetDialog
- the dialog where the widget is used onparam
- the widget parameter to generate the widget for- Returns:
- the
processed according to the output rules of this widgetI_CmsWidgetParameter.getStringValue(CmsObject)
- See Also:
A_CmsWidget.getWidgetStringValue(org.opencms.file.CmsObject, org.opencms.widgets.I_CmsWidgetDialog, org.opencms.widgets.I_CmsWidgetParameter)
-
newInstance
public I_CmsWidget newInstance()
Description copied from interface:I_CmsWidget
Creates a duplicate of this widget instance.- Returns:
- a duplicate of this widget instance
- See Also:
I_CmsWidget.newInstance()
-
-