info.magnolia.ui.framework.action
Class ConfirmationAction

java.lang.Object
  extended by info.magnolia.ui.api.action.AbstractAction<ConfirmationActionDefinition>
      extended by info.magnolia.ui.framework.action.ConfirmationAction
All Implemented Interfaces:
Action

public class ConfirmationAction
extends AbstractAction<ConfirmationActionDefinition>

Configurable confirmation action. Can be used to intercept the actual action with user feedback. Allows configuration of a success action and a cancel action.

See Also:
ConfirmationActionDefinition

Constructor Summary
ConfirmationAction(ConfirmationActionDefinition definition, JcrItemAdapter item, UiContext uiContext, ActionExecutor actionExecutor)
           
ConfirmationAction(ConfirmationActionDefinition definition, List<JcrItemAdapter> items, UiContext uiContext, ActionExecutor actionExecutor)
           
 
Method Summary
 void execute()
          Executes the action.
protected  String getConfirmationHeader()
           
protected  String getConfirmationMessage()
           
protected  com.vaadin.data.Item getItem()
           
protected  String getListOfItemPaths()
           
protected  void onError(Exception e)
          Class that implement CommansActionBase should use this in order to perform tasks or notification in case of error.
 
Methods inherited from class info.magnolia.ui.api.action.AbstractAction
getDefinition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfirmationAction

public ConfirmationAction(ConfirmationActionDefinition definition,
                          JcrItemAdapter item,
                          UiContext uiContext,
                          ActionExecutor actionExecutor)

ConfirmationAction

public ConfirmationAction(ConfirmationActionDefinition definition,
                          List<JcrItemAdapter> items,
                          UiContext uiContext,
                          ActionExecutor actionExecutor)
Method Detail

execute

public void execute()
             throws ActionExecutionException
Description copied from interface: Action
Executes the action.

Throws:
ActionExecutionException - if an error occurs performing the action

getConfirmationHeader

protected String getConfirmationHeader()
                                throws Exception
Throws:
Exception

getConfirmationMessage

protected String getConfirmationMessage()
                                 throws Exception
Throws:
Exception

getListOfItemPaths

protected String getListOfItemPaths()

onError

protected void onError(Exception e)
Class that implement CommansActionBase should use this in order to perform tasks or notification in case of error.


getItem

protected com.vaadin.data.Item getItem()
Returns:
the Item linked to this action. If this action is used for multi Item return null.


Copyright © 2013 Magnolia International Ltd.. All Rights Reserved.