Package org.opencms.widgets
Interface I_CmsWidget
- All Known Subinterfaces:
I_CmsADEWidget
- All Known Implementing Classes:
A_CmsAdeGalleryWidget
,A_CmsCategorizedSelectWidget
,A_CmsFormatterWidget
,A_CmsGalleryWidget
,A_CmsHtmlWidget
,A_CmsSelectWidget
,A_CmsWidget
,CmsAccessRestrictionWidget
,CmsAddFormatterWidget
,CmsAdeDownloadGalleryWidget
,CmsAdeImageGalleryWidget
,CmsCalendarWidget
,CmsCategoryWidget
,CmsCheckboxWidget
,CmsCodeWidget
,CmsColorpickerWidget
,CmsComboWidget
,CmsDependentSelectWidget
,CmsDisplayTypeSelectWidget
,CmsDisplayWidget
,CmsDownloadGalleryWidget
,CmsElementViewSelectWidget
,CmsFilterSelectWidget
,CmsGroupWidget
,CmsHtmlWidget
,CmsHttpUploadWidget
,CmsImageGalleryWidget
,CmsInputWidget
,CmsInputWidgetPlaintext
,CmsLinkGalleryWidget
,CmsLocalizationWidget
,CmsLocationPickerWidget
,CmsMultiSelectGroupWidget
,CmsMultiSelectWidget
,CmsOrgUnitWidget
,CmsPasswordWidget
,CmsPrincipalWidget
,CmsRadioSelectWidget
,CmsRemoveFormatterWidget
,CmsSelectComboWidget
,CmsSelectGroupWidget
,CmsSelectOnChangeReloadWidget
,CmsSelectWidget
,CmsSerialDateWidget
,CmsTextareaWidget
,CmsTextareaWidgetPlaintext
,CmsTypeComboWidget
,CmsTypeFilterWidget
,CmsUserWidget
,CmsVfsFileWidget
,CmsVfsImageWidget
public interface I_CmsWidget
Describes an editor widget for use in the OpenCms workplace.
- Since:
- 6.0.0
-
Method Summary
Modifier and TypeMethodDescriptionReturns the configuration string.getDialogHtmlEnd
(CmsObject cms, I_CmsWidgetDialog widgetDialog, I_CmsWidgetParameter param) Generates the html to include at the end of the dialog for this widget.getDialogIncludes
(CmsObject cms, I_CmsWidgetDialog widgetDialog) Generates the necessary JavaScript inclusion code for this widget.getDialogInitCall
(CmsObject cms, I_CmsWidgetDialog widgetDialog) Generates the initialisation method JavaScript code for this widget.getDialogInitMethod
(CmsObject cms, I_CmsWidgetDialog widgetDialog) Generates the initialization method JavaScript code for this widget.getDialogWidget
(CmsObject cms, I_CmsWidgetDialog widgetDialog, I_CmsWidgetParameter param) Generates the widget HTML for the provided widget parameter.getHelpBubble
(CmsObject cms, I_CmsWidgetDialog widgetDialog, I_CmsWidgetParameter param) Creates the HTML code for the help bubble for this widget.getHelpText
(I_CmsWidgetDialog widgetDialog, I_CmsWidgetParameter value) Creates a HTML <div> containing the help text for this widget.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)
boolean
Returns if the widget is compact view enabled.Creates a duplicate of this widget instance.void
setConfiguration
(String configuration) Sets the configuration of this widget.void
setEditorValue
(CmsObject cms, Map<String, String[]> formParameters, I_CmsWidgetDialog widgetDialog, I_CmsWidgetParameter param) Sets the value of in the given widget parameter by reading the "right" value from the offered map of parameters.
-
Method Details
-
getConfiguration
Returns the configuration string.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.
- Returns:
- the configuration string
-
getDialogHtmlEnd
Generates the html to include at the end of the dialog for this widget.The "help bubble" text div's are added using this method.
- 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 html to include at the end of the dialog for this widget
-
getDialogIncludes
Generates the necessary JavaScript inclusion code for this widget.- Parameters:
cms
- the current users OpenCms contextwidgetDialog
- the dialog where the widget is used on- Returns:
- the JavaScript inclusion code
-
getDialogInitCall
Generates the initialisation method JavaScript code for this widget.- Parameters:
cms
- the current users OpenCms contextwidgetDialog
- the dialog where the widget is used on- Returns:
- the initialisation method JavaScript code
-
getDialogInitMethod
Generates the initialization method JavaScript code for this widget.- Parameters:
cms
- an initialized instance of a CmsObjectwidgetDialog
- the dialog where the widget is used on- Returns:
- the initialization method JavaScript code
-
getDialogWidget
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
-
getHelpBubble
Creates the HTML code for the help bubble for this widget.- 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 HTML code for the help bubble for this widget
-
getHelpText
Creates a HTML <div> containing the help text for this widget.- Parameters:
widgetDialog
- the dialog where the widget is used onvalue
- the value to create the help bubble for- Returns:
- a HTML <div> containing the help text for this widget
-
getWidgetStringValue
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)
- 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:
-
isCompactViewEnabled
boolean isCompactViewEnabled()Returns if the widget is compact view enabled.- Returns:
true
if the widget is compact view enabled
-
newInstance
Creates a duplicate of this widget instance.- Returns:
- a duplicate of this widget instance
-
setConfiguration
Sets the configuration of this widget.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.
- Parameters:
configuration
- the configuration to set
-
setEditorValue
void setEditorValue(CmsObject cms, Map<String, String[]> formParameters, I_CmsWidgetDialog widgetDialog, I_CmsWidgetParameter param) Sets the value of in the given widget parameter by reading the "right" value from the offered map of parameters.- Parameters:
cms
- the current users OpenCms contextformParameters
- the map of parameters to get the value fromwidgetDialog
- the dialog where the widget is used onparam
- the widget parameter to generate the widget for
-