org.benow.web.action
Interface Action
- All Known Implementing Classes:
- ActionImpl, JavaBasedAction, XSLAction
public interface Action
Interface actions which apply to a specific type of object. For example, a file
object may have save, properties, view, etc actions. Action classes must declare
an ActionAppliesTo annotation, which indicates the action class to which they apply.
By implementing this interface, the action can be fine grained tuned, but the action
must be coded in java, registered during packaging and (might) dump html from
a java class (which is ugly). Direct action implementation is perhaps not the
first choice, but offers the most flexibility.
There is an easy way of declaring simple actions, which is to create an appropriate
XSL file in the var/site/actions/[action_object]/[action].xsl file. See XSLAction
for details.
- Author:
- andy
|
Nested Class Summary |
static interface |
Action.ActionAppliesTo
An annotation which indicates which object type this action applies to. |
static class |
Action.ActionType
Possible types of actions
Icon: the default. |
isActive
boolean isActive(java.lang.Object forObject)
- Parameters:
forObject -
- Returns:
- true if this action applies for the given object
getType
Action.ActionType getType(java.lang.Object forObject)
- Parameters:
forObject -
- Returns:
- type of the action for the given object
getLabelHTML
java.lang.String getLabelHTML(java.lang.Object forObject)
- Parameters:
forObject -
- Returns:
- text html label for the action as appropriate for the given object
getIconHTML
java.lang.String getIconHTML(java.lang.Object forObject)
- Parameters:
forObject -
- Returns:
- html for the action as appropriate for the given object
getSupportHTML
java.lang.String getSupportHTML(java.lang.Object forObject)
- Parameters:
forObject -
- Returns:
- prefix support html (javascript, hidden objects, etc) for the action as
appropriate for the given object