|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.widgets.A_CmsWidget
org.opencms.widgets.A_CmsSelectWidget
public abstract class A_CmsSelectWidget
Base class for select widgets.
CmsSelectWidgetOption
Field Summary | |
---|---|
static java.lang.String |
CONFIGURATION_HEIGHT
Configuration parameter to set the height from the select widget in pixel. |
Fields inherited from class org.opencms.widgets.A_CmsWidget |
---|
HELP_POSTFIX, LABEL_PREFIX |
Constructor Summary | |
---|---|
A_CmsSelectWidget()
Creates a new select widget. |
|
A_CmsSelectWidget(java.util.List<CmsSelectWidgetOption> configuration)
Creates a select widget with the select options specified in the given configuration List. |
|
A_CmsSelectWidget(java.lang.String configuration)
Creates a select widget with the select options specified in the given configuration String. |
Method Summary | |
---|---|
void |
addSelectOption(CmsSelectWidgetOption option)
Adds a new select option to this widget. |
java.lang.String |
getConfiguration()
Returns the configuration string. |
protected java.lang.String |
getHeight()
Gets the configured select widget height. |
protected java.lang.String |
getSelectedValue(CmsObject cms,
I_CmsWidgetParameter param)
Returns the currently selected value of the select widget. |
protected java.util.List<java.lang.String> |
getSelectedValues(CmsObject cms,
I_CmsWidgetParameter param)
Returns the currently selected values of the select widget. |
protected java.util.List<CmsSelectWidgetOption> |
getSelectOptions()
Returns the list of configured select options. |
protected java.util.List<CmsSelectWidgetOption> |
parseSelectOptions(CmsObject cms,
I_CmsWidgetDialog widgetDialog,
I_CmsWidgetParameter param)
Returns the list of configured select options, parsing the configuration String if required. |
void |
setConfiguration(java.lang.String configuration)
Sets the configuration of this widget. |
protected void |
setSelectOptions(java.util.List<CmsSelectWidgetOption> selectOptions)
Sets the list of configured select options. |
Methods inherited from class org.opencms.widgets.A_CmsWidget |
---|
equals, getDialogHtmlEnd, getDialogIncludes, getDialogInitCall, getDialogInitMethod, getHelpBubble, getHelpKey, getHelpText, getJsHelpMouseHandler, getJSIncludeFile, getLabelKey, getWidgetStringValue, hashCode, 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 |
---|
getDialogWidget, newInstance |
Field Detail |
---|
public static final java.lang.String CONFIGURATION_HEIGHT
Constructor Detail |
---|
public A_CmsSelectWidget()
public A_CmsSelectWidget(java.util.List<CmsSelectWidgetOption> configuration)
The list elements must be of type
.CmsSelectWidgetOption
configuration
- the configuration (possible options) for the select widgetCmsSelectWidgetOption
public A_CmsSelectWidget(java.lang.String configuration)
Please see
for a description of the syntax
of the configuration String.CmsSelectWidgetOption
configuration
- the configuration (possible options) for the select widgetCmsSelectWidgetOption
Method Detail |
---|
public void addSelectOption(CmsSelectWidgetOption option)
option
- the select option to addpublic java.lang.String getConfiguration()
A_CmsWidget
getConfiguration
in interface I_CmsWidget
getConfiguration
in class A_CmsWidget
A_CmsWidget.getConfiguration()
public void setConfiguration(java.lang.String configuration)
I_CmsWidget
This can be used to enable / disable certain widget features that should not always be available, or to pass specific initialization information to the widget. It depends on the widget implementation on how this information is used.
setConfiguration
in interface I_CmsWidget
setConfiguration
in class A_CmsWidget
configuration
- the configuration to setA_CmsWidget.setConfiguration(java.lang.String)
protected java.lang.String getHeight()
protected java.lang.String getSelectedValue(CmsObject cms, I_CmsWidgetParameter param)
If a value is found in the given parameter, this is used. Otherwise
the default value of the select options are used. If there is neither a parameter value
nor a default value, null
is returned.
cms
- the current users OpenCms contextparam
- the widget parameter of this dialog
protected java.util.List<java.lang.String> getSelectedValues(CmsObject cms, I_CmsWidgetParameter param)
If a value is found in the given parameter, this is used. Otherwise
the default value of the select options are used. If there is neither a parameter value
nor a default value, null
is used.
cms
- the current users OpenCms contextparam
- the widget parameter of this dialog
protected java.util.List<CmsSelectWidgetOption> getSelectOptions()
The list elements are of type
.CmsSelectWidgetOption
protected java.util.List<CmsSelectWidgetOption> parseSelectOptions(CmsObject cms, I_CmsWidgetDialog widgetDialog, I_CmsWidgetParameter param)
The list elements are of type
.
The configuration String is parsed only once and then stored internally.CmsSelectWidgetOption
cms
- the current users OpenCms contextwidgetDialog
- the dialog of this widgetparam
- the widget parameter of this dialog
CmsSelectWidgetOption
protected void setSelectOptions(java.util.List<CmsSelectWidgetOption> selectOptions)
The list elements must be of type
.CmsSelectWidgetOption
selectOptions
- the list of select options to set
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |