Package org.opencms.widgets
Class A_CmsCategorizedSelectWidget
- java.lang.Object
-
- org.opencms.widgets.A_CmsWidget
-
- org.opencms.widgets.A_CmsCategorizedSelectWidget
-
- All Implemented Interfaces:
I_CmsADEWidget
,I_CmsWidget
public abstract class A_CmsCategorizedSelectWidget extends A_CmsWidget implements I_CmsADEWidget
Abstract base class for categorized select widgets.A categorized select widget consists of two select boxes, one for selecting the actual value and one for filtering the choices available in the first select box. All data for the choices is loaded initially, when the widget is initialized.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.opencms.widgets.A_CmsWidget
A_CmsWidget.CmsDummyWidgetDialog
-
-
Field Summary
Fields Modifier and Type Field Description static I_CmsCategorizedSelectDataFactory
DATA_FACTORY
Factory for creating the data for the client-side widget.-
Fields inherited from class org.opencms.widgets.A_CmsWidget
HELP_POSTFIX, LABEL_PREFIX
-
-
Constructor Summary
Constructors Constructor Description A_CmsCategorizedSelectWidget()
Instantiates a new a cms categorized select widget.A_CmsCategorizedSelectWidget(java.lang.String config)
Instantiates a new a cms categorized select widget.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.String
getConfiguration(CmsObject cms, A_CmsXmlContentValue contentValue, CmsMessages messages, CmsResource resource, java.util.Locale contentLocale)
Gets the configuration.java.util.List<java.lang.String>
getCssResourceLinks(CmsObject cms)
Gets the css resource links.protected abstract com.google.web.bindery.autobean.shared.AutoBean<I_CmsCategorizedSelectData>
getData(CmsObject cms, A_CmsXmlContentValue contentValue, CmsMessages messages, CmsResource resource, java.util.Locale contentLocale)
Gets the select option data for the widget.I_CmsXmlContentHandler.DisplayType
getDefaultDisplayType()
Gets the default display type.java.lang.String
getDialogWidget(CmsObject cms, I_CmsWidgetDialog widgetDialog, I_CmsWidgetParameter param)
Generates the widget HTML for the provided widget parameter.java.lang.String
getInitCall()
Returns the java script initialization call.java.util.List<java.lang.String>
getJavaScriptResourceLinks(CmsObject cms)
Gets the java script resource links.java.lang.String
getWidgetName()
Gets the widget name.boolean
isInternal()
Checks if is internal.-
Methods inherited from class org.opencms.widgets.A_CmsWidget
equals, getConfiguration, getDialogHtmlEnd, getDialogIncludes, getDialogInitCall, getDialogInitMethod, getHelpBubble, getHelpKey, getHelpText, getJsHelpMouseHandler, getJSIncludeFile, getLabelKey, getWidgetStringValue, hashCode, isCompactViewEnabled, setConfiguration, 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
getConfiguration, getDialogHtmlEnd, getDialogIncludes, getDialogInitCall, getDialogInitMethod, getHelpBubble, getHelpText, getWidgetStringValue, isCompactViewEnabled, newInstance, setConfiguration, setEditorValue
-
-
-
-
Field Detail
-
DATA_FACTORY
public static final I_CmsCategorizedSelectDataFactory DATA_FACTORY
Factory for creating the data for the client-side widget.
-
-
Constructor Detail
-
A_CmsCategorizedSelectWidget
public A_CmsCategorizedSelectWidget()
Instantiates a new a cms categorized select widget.
-
A_CmsCategorizedSelectWidget
public A_CmsCategorizedSelectWidget(java.lang.String config)
Instantiates a new a cms categorized select widget.- Parameters:
config
- the config
-
-
Method Detail
-
getConfiguration
public java.lang.String getConfiguration(CmsObject cms, A_CmsXmlContentValue contentValue, CmsMessages messages, CmsResource resource, java.util.Locale contentLocale)
Gets the configuration.- Specified by:
getConfiguration
in interfaceI_CmsADEWidget
- Parameters:
cms
- the cmscontentValue
- the content valuemessages
- the messagesresource
- the resourcecontentLocale
- the content locale- Returns:
- the configuration
- See Also:
I_CmsADEWidget.getConfiguration(org.opencms.file.CmsObject, org.opencms.xml.types.A_CmsXmlContentValue, org.opencms.i18n.CmsMessages, org.opencms.file.CmsResource, java.util.Locale)
-
getCssResourceLinks
public java.util.List<java.lang.String> getCssResourceLinks(CmsObject cms)
Gets the css resource links.- Specified by:
getCssResourceLinks
in interfaceI_CmsADEWidget
- Parameters:
cms
- the cms- Returns:
- the css resource links
- See Also:
I_CmsADEWidget.getCssResourceLinks(org.opencms.file.CmsObject)
-
getDefaultDisplayType
public I_CmsXmlContentHandler.DisplayType getDefaultDisplayType()
Gets the default display type.- Specified by:
getDefaultDisplayType
in interfaceI_CmsADEWidget
- Returns:
- the default display type
- See Also:
I_CmsADEWidget.getDefaultDisplayType()
-
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.- Specified by:
getDialogWidget
in interfaceI_CmsWidget
- 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)
-
getInitCall
public java.lang.String getInitCall()
Description copied from interface:I_CmsADEWidget
Returns the java script initialization call.- Specified by:
getInitCall
in interfaceI_CmsADEWidget
- Returns:
- the java script initialization call
- See Also:
I_CmsADEWidget.getInitCall()
-
getJavaScriptResourceLinks
public java.util.List<java.lang.String> getJavaScriptResourceLinks(CmsObject cms)
Gets the java script resource links.- Specified by:
getJavaScriptResourceLinks
in interfaceI_CmsADEWidget
- Parameters:
cms
- the cms- Returns:
- the java script resource links
- See Also:
I_CmsADEWidget.getJavaScriptResourceLinks(org.opencms.file.CmsObject)
-
getWidgetName
public java.lang.String getWidgetName()
Gets the widget name.- Specified by:
getWidgetName
in interfaceI_CmsADEWidget
- Returns:
- the widget name
- See Also:
I_CmsADEWidget.getWidgetName()
-
isInternal
public boolean isInternal()
Checks if is internal.- Specified by:
isInternal
in interfaceI_CmsADEWidget
- Returns:
- true, if is internal
- See Also:
I_CmsADEWidget.isInternal()
-
getData
protected abstract com.google.web.bindery.autobean.shared.AutoBean<I_CmsCategorizedSelectData> getData(CmsObject cms, A_CmsXmlContentValue contentValue, CmsMessages messages, CmsResource resource, java.util.Locale contentLocale)
Gets the select option data for the widget.This uses the GWT AutoBean mechanism for serialization. Use the DATA_FACTORY member for creating the relevant AutoBeans.
- Parameters:
cms
- the cmscontentValue
- the content valuemessages
- the messagesresource
- the resourcecontentLocale
- the content locale- Returns:
- the data
-
-