Class CmsSelectComboBox

  • All Implemented Interfaces:,<java.lang.String>,,,,,, I_CmsHasInit, I_CmsFormWidget, I_CmsHasGhostValue

    public class CmsSelectComboBox
    implements I_CmsFormWidget, I_CmsHasInit,<java.lang.String>, I_CmsHasGhostValue
    Hybrid select / combo box widget.

    This widget behaves like a select box, until a button on it is pressed, after which the select box is transformed into a combo box. The reason for this is that the combo box always displays the currently selected value itself, rather than the label from the widget configuration, which may be confusing to nontechnical users in some cases.

    • Nested Class Summary

      • Nested classes/interfaces inherited from class,
    • Field Summary

      Modifier and Type Field Description
      static java.lang.String WIDGET_TYPE
      Widget type identifier for the configuration.
      • Fields inherited from class

    • Constructor Summary

      Constructor Description
      CmsSelectComboBox​(java.util.Map<java.lang.String,​java.lang.String> options, boolean forProperties, boolean nullOption)
      Creates a new widget instance.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description addValueChangeHandler​(<java.lang.String> handler)  
      boolean displayingAbove()
      Returns whether the select options are being displayed below or above the widget.
      protected void enableComboMode()
      Switches to combo box mode.
      java.lang.String getApparentValue()
      Returns the "apparent value", i.e.
      CmsComboBox getComboBox()
      Gets the combo box instance.
      I_CmsFormWidget.FieldType getFieldType()
      Returns the type of data this widget produces.
      java.lang.Object getFormValue()
      Gets the selected/entered value from the widget.
      java.lang.String getFormValueAsString()
      Gets the current value of the widget as a string.
      CmsSelectBox getSelectBox()
      Gets the select box instance.
      static void initClass()
      Initializes this class.
      boolean isEnabled()
      Returns true if this widget is enabled.
      void reset()
      Resets the widget to its default state.
      void setAutoHideParent​(I_CmsAutoHider autoHideParent)
      Call this when auto hiding parents are shown.
      void setEnabled​(boolean enabled)
      Enables or disables the widget.
      void setErrorMessage​(java.lang.String errorMessage)
      Sets the error message for this widget.
      void setFormValueAsString​(java.lang.String value)
      Sets the current value of the widget as a string.
      void setGhostMode​(boolean enable)
      Enables or disables ghost mode, if possible.
      void setGhostValue​(java.lang.String value, boolean isGhostMode)
      Sets the "ghost value" of the widget and optionally sets it to "ghost mode".
      • Methods inherited from class

        claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidget
      • Methods inherited from class

        addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
      • Methods inherited from class

        addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface