org.opencms.widgets
Class CmsTypeComboWidget

java.lang.Object
  extended by org.opencms.widgets.A_CmsWidget
      extended by org.opencms.widgets.A_CmsSelectWidget
          extended by org.opencms.widgets.CmsComboWidget
              extended by org.opencms.widgets.CmsTypeComboWidget
All Implemented Interfaces:
I_CmsADEWidget, I_CmsWidget

public class CmsTypeComboWidget
extends CmsComboWidget

A widget for selecting resource types which are direct editable.


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
CmsTypeComboWidget()
          Default constructor.
CmsTypeComboWidget(java.lang.String config)
          Constructor with a configuration parameter.
 
Method Summary
 java.lang.String getConfiguration(CmsObject cms, A_CmsXmlContentValue schemaType, CmsMessages messages, CmsResource resource, java.util.Locale contentLocale)
          Returns the configuration string for the ADE content editor widget.
 java.util.List<java.lang.String> getCssResourceLinks(CmsObject cms)
          Returns a list of CSS resources required by the widget.
 java.lang.String getInitCall()
          Returns the java script initialization call.
 java.util.List<java.lang.String> getJavaScriptResourceLinks(CmsObject cms)
          Returns a list of java script resources required by the widget.
 boolean isInternal()
          Returns if this is an internal widget.
 I_CmsWidget newInstance()
          Creates a duplicate of this widget instance.
 void setConfiguration(java.lang.String config)
          Sets the configuration of this widget.
 
Methods inherited from class org.opencms.widgets.CmsComboWidget
getDialogHtmlEnd, getDialogIncludes, getDialogInitCall, getDialogWidget, getWidgetName
 
Methods inherited from class org.opencms.widgets.A_CmsSelectWidget
addSelectOption, getConfiguration, getHeight, getSelectedValue, getSelectedValues, getSelectOptions, parseSelectOptions, setSelectOptions
 
Methods inherited from class org.opencms.widgets.A_CmsWidget
equals, 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
getDialogInitMethod, getHelpBubble, getHelpText, getWidgetStringValue, setEditorValue
 

Constructor Detail

CmsTypeComboWidget

public CmsTypeComboWidget()
Default constructor.


CmsTypeComboWidget

public CmsTypeComboWidget(java.lang.String config)
Constructor with a configuration parameter.

Parameters:
config - the configuration string
Method Detail

getConfiguration

public java.lang.String getConfiguration(CmsObject cms,
                                         A_CmsXmlContentValue schemaType,
                                         CmsMessages messages,
                                         CmsResource resource,
                                         java.util.Locale contentLocale)
Description copied from interface: I_CmsADEWidget
Returns the configuration string for the ADE content editor widget.

Specified by:
getConfiguration in interface I_CmsADEWidget
Overrides:
getConfiguration in class A_CmsSelectWidget
Parameters:
cms - the OpenCms context
schemaType - the schema type
messages - the messages
resource - the edited resource
contentLocale - the content locale
Returns:
the configuration string
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)
Description copied from class: A_CmsSelectWidget
Returns a list of CSS resources required by the widget.

Specified by:
getCssResourceLinks in interface I_CmsADEWidget
Overrides:
getCssResourceLinks in class A_CmsSelectWidget
Parameters:
cms - the current OpenCms context
Returns:
the required CSS resource links
See Also:
I_CmsADEWidget.getCssResourceLinks(org.opencms.file.CmsObject)

getInitCall

public java.lang.String getInitCall()
Description copied from class: A_CmsSelectWidget
Returns the java script initialization call.

Specified by:
getInitCall in interface I_CmsADEWidget
Overrides:
getInitCall in class A_CmsSelectWidget
Returns:
the java script initialization call
See Also:
I_CmsADEWidget.getInitCall()

getJavaScriptResourceLinks

public java.util.List<java.lang.String> getJavaScriptResourceLinks(CmsObject cms)
Description copied from class: A_CmsSelectWidget
Returns a list of java script resources required by the widget.

Specified by:
getJavaScriptResourceLinks in interface I_CmsADEWidget
Overrides:
getJavaScriptResourceLinks in class A_CmsSelectWidget
Parameters:
cms - the current OpenCms context
Returns:
the required java script resource links
See Also:
I_CmsADEWidget.getJavaScriptResourceLinks(org.opencms.file.CmsObject)

isInternal

public boolean isInternal()
Description copied from class: A_CmsSelectWidget
Returns if this is an internal widget.

Only widgets belonging to the OpenCms core should be marked as internal.

Specified by:
isInternal in interface I_CmsADEWidget
Overrides:
isInternal in class A_CmsSelectWidget
Returns:
true if this is an internal widget
See Also:
I_CmsADEWidget.isInternal()

newInstance

public I_CmsWidget newInstance()
Description copied from interface: I_CmsWidget
Creates a duplicate of this widget instance.

Specified by:
newInstance in interface I_CmsWidget
Overrides:
newInstance in class CmsComboWidget
Returns:
a duplicate of this widget instance
See Also:
I_CmsWidget.newInstance()

setConfiguration

public void setConfiguration(java.lang.String config)
Description copied from interface: I_CmsWidget
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.

Specified by:
setConfiguration in interface I_CmsWidget
Overrides:
setConfiguration in class A_CmsSelectWidget
Parameters:
config - the configuration to set
See Also:
A_CmsWidget.setConfiguration(java.lang.String)