org.opencms.workplace.list
Class CmsListDropdownAction

java.lang.Object
  extended by org.opencms.workplace.tools.A_CmsHtmlIconButton
      extended by org.opencms.workplace.list.A_CmsListAction
          extended by org.opencms.workplace.list.CmsListIndependentAction
              extended by org.opencms.workplace.list.CmsListDropdownAction
All Implemented Interfaces:
I_CmsListAction, 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
Version:
$Revision: 1.2 $
Author:
Michael Moossen

Field Summary
static java.lang.String SUFFIX_PARAM
          parameter name suffix.
 
Fields inherited from class org.opencms.workplace.list.CmsListIndependentAction
ACTION_EXPLORER_SWITCH_ID
 
Fields inherited from class org.opencms.workplace.tools.A_CmsHtmlIconButton
EMPTY_MESSAGE, m_id
 
Constructor Summary
CmsListDropdownAction(java.lang.String id)
          Default Constructor.
 
Method Summary
 void addItem(java.lang.String id, CmsMessageContainer name)
          Adds an item to be displayed in the drop-down list.
 java.lang.String buttonHtml(CmsWorkplace wp)
          Returns the necessary html code.
 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.list.CmsListIndependentAction
getDefaultExplorerSwitchAction, resolveOnClic
 
Methods inherited from class org.opencms.workplace.list.A_CmsListAction
buttonHtml, defaultConfirmationHtml, getConfirmationMessage, getListId, getWp, setConfirmationMessage, setListId, setWp
 
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
 

Field Detail

SUFFIX_PARAM

public static final java.lang.String SUFFIX_PARAM
parameter name suffix.

See Also:
Constant Field Values
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,
                    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(CmsWorkplace wp)
Description copied from interface: I_CmsHtmlIconButton
Returns the necessary html code.

Specified by:
buttonHtml in interface I_CmsHtmlIconButton
Overrides:
buttonHtml in class CmsListIndependentAction
Parameters:
wp - the jsp page to write the code to
Returns:
html code
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