public abstract class FormAction
extends java.lang.Object
Constructor and Description |
---|
FormAction() |
Modifier and Type | Method and Description |
---|---|
abstract FormResult |
action(Form f)
Perform the actual action based on the form parameters.
|
java.lang.String |
getConfirm(Form f)
should this action be confirmed before execute
If this returns null no confirm is required.
|
ConfirmMessage |
getConfirmMessage(Form f) |
java.lang.String |
getHelp()
Return an optional help text for this action that can be presented as a tooltip etc.
|
boolean |
getMustValidate() |
java.lang.String |
getShortcut()
Return an optional shortcut key for this action.
|
java.lang.Object |
getText()
Get optional button content to use instead of the action name.
|
void |
setConfirm(java.lang.String c) |
void |
setConfirmArgs(java.lang.Object[] args) |
void |
setMustValidate(boolean validate) |
void |
setNewWindow(boolean new_window) |
boolean |
wantNewWindow() |
public boolean wantNewWindow()
public void setNewWindow(boolean new_window)
public abstract FormResult action(Form f) throws ActionException
TransitionException
to show an error message to the user.
or a ActionException
to produce a generic error message.f
- FormActionException
public java.lang.String getConfirm(Form f)
The form is passed to allow a sub-class to trigger confirm based on form parameters.
However in this case the implementation must handle an incomplete form.
Note that the message can be set by calling setConfirm(String)
or
this method can be overidden
f
- Form calling action.public final ConfirmMessage getConfirmMessage(Form f)
public void setConfirm(java.lang.String c)
public void setConfirmArgs(java.lang.Object[] args)
public java.lang.String getHelp()
public java.lang.Object getText()
UIProvider
or UIGenerator
but should not include active contentpublic java.lang.String getShortcut()
public boolean getMustValidate()
public void setMustValidate(boolean validate)