org.araneaframework.framework
Interface ConfirmationContext

All Superinterfaces:
Serializable
All Known Implementing Classes:
StandardConfirmationFilterWidget

public interface ConfirmationContext
extends Serializable

Simple confirmation context - expects immediate user confirmation for going through with some event (expressed as a closure).

Since:
1.1
Author:
Taimo Peelo (taimo@araneaframework.org)

Field Summary
static String CONFIRMATION_RESULT_KEY
          Defines the request param name to be used by this context.
 
Method Summary
 void confirm(org.apache.commons.collections.Closure onConfirmClosure, String message)
          Creates a condition for the user to confirm (only one confirmation can be used per page).
 String getConfirmationMessage()
          Returns the current confirmation message meant for the user.
 

Field Detail

CONFIRMATION_RESULT_KEY

public static final String CONFIRMATION_RESULT_KEY
Defines the request param name to be used by this context.

See Also:
Constant Field Values
Method Detail

confirm

public void confirm(org.apache.commons.collections.Closure onConfirmClosure,
                    String message)
Creates a condition for the user to confirm (only one confirmation can be used per page). The user will be shown the confirmation message (on page load). If the user chooses "Yes" then the business logic inside the closure will be invoked.

Parameters:
onConfirmClosure - A closure that invokes the business logic when the user confirms it.
message - The confirmation message displayed to the user.

getConfirmationMessage

public String getConfirmationMessage()
Returns the current confirmation message meant for the user.

Returns:
the current confirmation message.