Class CmsListDropdownAction

  • All Implemented Interfaces:
    I_CmsListAction, org.opencms.workplace.tools.I_CmsHtmlIconButton

    public class CmsListDropdownAction
    extends CmsListIndependentAction
    Independent action to switch the resource state filter.

    Do not forget to add parameter evaluation code overwritting the A_CmsListDialog#getList() method, like in CmsProjectFilesDialog.

    Since:
    6.0.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String SUFFIX_PARAM
      parameter name suffix.
      • Fields inherited from class org.opencms.workplace.tools.A_CmsHtmlIconButton

        EMPTY_MESSAGE, m_id
    • Constructor Summary

      Constructors 
      Constructor Description
      CmsListDropdownAction​(java.lang.String id)
      Default Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addItem​(java.lang.String id, org.opencms.i18n.CmsMessageContainer name)
      Adds an item to be displayed in the drop-down list.
      java.lang.String buttonHtml​(org.opencms.workplace.CmsWorkplace wp)  
      java.lang.String getSelection()
      Returns the selected item.
      void setSelection​(java.lang.String selection)
      Sets the selected item.
      • Methods inherited from class org.opencms.workplace.tools.A_CmsHtmlIconButton

        defaultButtonHtml, defaultButtonHtml, defaultHelpHtml, getHelpText, getIconPath, getId, getName, isEnabled, isVisible, setEnabled, setHelpText, setIconPath, setName, setVisible
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.opencms.workplace.tools.I_CmsHtmlIconButton

        getHelpText, getIconPath, getId, getName, isEnabled, isVisible, setEnabled, setHelpText, setIconPath, setName, setVisible
    • Constructor Detail

      • CmsListDropdownAction

        public CmsListDropdownAction​(java.lang.String id)
        Default Constructor.

        Parameters:
        id - unique id
    • Method Detail

      • addItem

        public void addItem​(java.lang.String id,
                            org.opencms.i18n.CmsMessageContainer name)
        Adds an item to be displayed in the drop-down list.

        Parameters:
        id - the id of the item
        name - the display name
      • buttonHtml

        public java.lang.String buttonHtml​(org.opencms.workplace.CmsWorkplace wp)
        Specified by:
        buttonHtml in interface org.opencms.workplace.tools.I_CmsHtmlIconButton
        Overrides:
        buttonHtml in class CmsListIndependentAction
        See Also:
        I_CmsHtmlIconButton.buttonHtml(org.opencms.workplace.CmsWorkplace)
      • getSelection

        public java.lang.String getSelection()
        Returns the selected item.

        Returns:
        the selected item
      • setSelection

        public void setSelection​(java.lang.String selection)
        Sets the selected item.

        Parameters:
        selection - the selected item to set