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_CmsListDirectJsAction, CmsListDefaultAction, CmsListEditResourceAction, CmsListExplorerDirectAction, CmsListItemSelectionAction, CmsListResourceIconAction

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.21 $
Author:
Michael Moossen

Field Summary
 
Fields inherited from class org.opencms.workplace.tools.A_CmsHtmlIconButton
EMPTY_MESSAGE, m_id
 
Constructor Summary
CmsListDirectAction(java.lang.String id)
          Default Constructor.
 
Method Summary
 java.lang.String buttonHtml(CmsWorkplace wp)
          Returns the necessary html code.
 java.lang.String confirmationTextHtml()
          Generates a confirmation text div tag, to use in lists where all items use the same confirmation text.
 java.lang.String getColumnForTexts()
          Returns the id of the column to use as parameter for the helptext and confirmation message.
 CmsListItem getItem()
          Returns the current item.
 java.lang.String helpTextHtml()
          Generates a help text div tag, to use in lists where all items use the same help text.
protected  CmsHtmlIconButtonStyleEnum resolveButtonStyle()
          Help method to resolve the style of the button.
protected  java.lang.String resolveHelpText(java.util.Locale locale)
          Help method to resolve the help text to use.
protected  java.lang.String resolveName(java.util.Locale locale)
          Help method to resolve the name to use.
protected  java.lang.String resolveOnClic(java.util.Locale locale)
          Help method to resolve the on clic text to use.
 void setColumnForTexts(java.lang.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
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.list.I_CmsListAction
buttonHtml, getConfirmationMessage, getListId, getWp, setConfirmationMessage, setListId, setWp
 
Methods inherited from interface org.opencms.workplace.tools.I_CmsHtmlIconButton
getHelpText, getIconPath, getId, getName, isEnabled, isVisible, setEnabled, setHelpText, setIconPath, setName, setVisible
 

Constructor Detail

CmsListDirectAction

public CmsListDirectAction(java.lang.String id)
Default Constructor.

Parameters:
id - unique id
Method Detail

resolveHelpText

protected java.lang.String resolveHelpText(java.util.Locale locale)
Help method to resolve the help text to use.

Parameters:
locale - the used locale
Returns:
the help text

resolveOnClic

protected java.lang.String resolveOnClic(java.util.Locale locale)
Help method to resolve the on clic text to use.

Parameters:
locale - the used locale
Returns:
the on clic text

resolveName

protected java.lang.String resolveName(java.util.Locale locale)
Help method to resolve the name to use.

Parameters:
locale - the used locale
Returns:
the name

resolveButtonStyle

protected CmsHtmlIconButtonStyleEnum resolveButtonStyle()
Help method to resolve the style of the button.

Returns:
the style of the button

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
Parameters:
wp - the jsp page to write the code to
Returns:
html code
See Also:
I_CmsHtmlIconButton.buttonHtml(CmsWorkplace)

confirmationTextHtml

public java.lang.String confirmationTextHtml()
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
Returns:
html code
See Also:
I_CmsListDirectAction.confirmationTextHtml()

getColumnForTexts

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

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

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 java.lang.String helpTextHtml()
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
Returns:
html code
See Also:
I_CmsListDirectAction.helpTextHtml()

setColumnForTexts

public void setColumnForTexts(java.lang.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:
setColumnForTexts in interface I_CmsListDirectAction
Parameters:
columnId - the id of the column to use
See Also:
I_CmsListDirectAction.setColumnForTexts(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)