org.opencms.workplace.list
Class CmsListDirectAction

java.lang.Object
  extended byorg.opencms.workplace.tools.A_CmsHtmlIconButton
      extended byorg.opencms.workplace.list.A_CmsListAction
          extended byorg.opencms.workplace.list.CmsListDirectAction
All Implemented Interfaces:
I_CmsHtmlIconButton, I_CmsListAction, I_CmsListDirectAction
Direct Known Subclasses:
A_CmsListToggleAction, CmsListDefaultAction

public class CmsListDirectAction
extends A_CmsListAction
implements I_CmsListDirectAction

Default implementation of a direct action for a html list column.

Since:
6.0.0
Version:
$Revision: 1.16 $
Author:
Michael Moossen

Field Summary
 
Fields inherited from class org.opencms.workplace.tools.A_CmsHtmlIconButton
EMPTY_MESSAGE, m_id
 
Constructor Summary
CmsListDirectAction(String id)
          Default Constructor.
 
Method Summary
 String buttonHtml(CmsWorkplace wp)
          Returns the necessary html code.
 String confirmationTextHtml(CmsWorkplace wp)
          Generates a confirmation text div tag, to use in lists where all items use the same confirmation text.
 String getColumn()
          Returns the id of the column to use as parameter for the helptext and confirmation message.
 CmsListItem getItem()
          Returns the current item.
 String helpTextHtml(CmsWorkplace wp)
          Generates a help text div tag, to use in lists where all items use the same help text.
 void setColumn(String columnId)
          Sets the id of the column to use as parameter for the helptext and confirmation message.
 void setItem(CmsListItem item)
          Sets the current item, should be called before the buttonHtml(org.opencms.workplace.CmsWorkplace) method.
 
Methods inherited from class org.opencms.workplace.list.A_CmsListAction
defaultConfirmationHtml, getConfirmationMessage, getListId, setConfirmationMessage, setListId
 
Methods inherited from class org.opencms.workplace.tools.A_CmsHtmlIconButton
defaultButtonHtml, defaultButtonHtml, defaultHelpHtml, getHelpText, getIconPath, getId, getName, isEnabled, setEnabled, setHelpText, setIconPath, setName
 
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.list.I_CmsListAction
getConfirmationMessage, getListId, setConfirmationMessage, setListId
 
Methods inherited from interface org.opencms.workplace.tools.I_CmsHtmlIconButton
getHelpText, getIconPath, getId, getName, isEnabled, setEnabled, setHelpText, setIconPath, setName
 

Constructor Detail

CmsListDirectAction

public CmsListDirectAction(String id)
Default Constructor.

Parameters:
id - unique id
Method Detail

buttonHtml

public String buttonHtml(CmsWorkplace wp)
Description copied from interface: I_CmsHtmlIconButton
Returns the necessary html code.

Specified by:
buttonHtml in interface I_CmsHtmlIconButton
Parameters:
wp - the jsp page to write the code to
Returns:
html code
See Also:
I_CmsHtmlIconButton.buttonHtml(CmsWorkplace)

confirmationTextHtml

public String confirmationTextHtml(CmsWorkplace wp)
Description copied from interface: I_CmsListDirectAction
Generates a confirmation text div tag, to use in lists where all items use the same confirmation text.

Specified by:
confirmationTextHtml in interface I_CmsListDirectAction
Parameters:
wp - the workplace instance
Returns:
html code
See Also:
I_CmsListDirectAction.confirmationTextHtml(org.opencms.workplace.CmsWorkplace)

getColumn

public String getColumn()
Description copied from interface: I_CmsListDirectAction
Returns the id of the column to use as parameter for the helptext and confirmation message.

Specified by:
getColumn in interface I_CmsListDirectAction
Returns:
the id of the column to use
See Also:
I_CmsListDirectAction.getColumn()

getItem

public CmsListItem getItem()
Description copied from interface: I_CmsListDirectAction
Returns the current item.

Specified by:
getItem in interface I_CmsListDirectAction
Returns:
the current item
See Also:
I_CmsListDirectAction.getItem()

helpTextHtml

public String helpTextHtml(CmsWorkplace wp)
Description copied from interface: I_CmsListDirectAction
Generates a help text div tag, to use in lists where all items use the same help text.

Specified by:
helpTextHtml in interface I_CmsListDirectAction
Parameters:
wp - the workplace instance
Returns:
html code
See Also:
I_CmsListDirectAction.helpTextHtml(org.opencms.workplace.CmsWorkplace)

setColumn

public void setColumn(String columnId)
Description copied from interface: I_CmsListDirectAction
Sets the id of the column to use as parameter for the helptext and confirmation message.

Specified by:
setColumn in interface I_CmsListDirectAction
Parameters:
columnId - the id of the column to use
See Also:
I_CmsListDirectAction.setColumn(java.lang.String)

setItem

public void setItem(CmsListItem item)
Description copied from interface: I_CmsListDirectAction
Sets the current item, should be called before the I_CmsHtmlIconButton.buttonHtml(org.opencms.workplace.CmsWorkplace) method.

Specified by:
setItem in interface I_CmsListDirectAction
Parameters:
item - the item
See Also:
I_CmsListDirectAction.setItem(org.opencms.workplace.list.CmsListItem)