|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Command
Interface to be implemented by classes that perform operations on lists or list items. NOTE: Implementations must be thread-safe.
Method Summary | |
---|---|
CommandResult |
execute(CommandContext context)
Executes the command. |
String |
getAction()
|
String |
getConfirmationMessage(CommandContext context)
Returns a localized message that is displayed to the user asking for a confirmation. |
String |
getId()
Returns a unique identifier used to reference the command. |
String |
getItemStyleClass(CommandContext context)
Returns a CSS class that is added to the list of class names of the whole item/row. |
String |
getLabel(MessageResolver messageResolver)
|
String |
getStyleClass()
Returns the CSS class that is assigned to command's HTML element and therefore defines which icon is displayed. |
boolean |
isEnabled(CommandContext context)
Implementors may inspect the given context to decide whether the command should be enabled. |
boolean |
isShowOnForm()
Returns whether the command should be shown beside the form. |
void |
setId(String id)
Sets a unique identifier used to reference the command. |
Method Detail |
---|
String getId()
void setId(String id)
String getAction()
CommandResult execute(CommandContext context)
String getConfirmationMessage(CommandContext context)
null
if no
confirmation is needed. Otherwise a dialog containing an Ok and a
Cancel button is displayed. If the user clicks Ok
the command is executed otherwise no action takes place.
boolean isEnabled(CommandContext context)
policy
since
commands will be automatically disabled if the action returned by
getAction()
is denied.
boolean isShowOnForm()
String getLabel(MessageResolver messageResolver)
String getStyleClass()
String getItemStyleClass(CommandContext context)
null
. Subclasses may override this method to highlight
a list item depending on the context.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |