|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.cc.framework.ui.control.ControlAction
This class encapsulate an action which is triggered by a control
Field Summary | |
static java.lang.String |
ACTION_INPUT_CONTROL
Hidden form field for the control action invocation string |
static java.lang.String |
ACTION_URL_ACTION
URL parameter for the action name |
static java.lang.String |
ACTION_URL_CONTROL
URL parameter for the control name |
static java.lang.String |
ACTION_URL_PARAMETER
URL parameter for the parameter list |
private ControlActionDef |
actiondef
The base parameter definition |
private java.lang.String |
actionName
The action to which should be forwarded |
private boolean |
ajax
Indicates that additional AJAX script handlers should be attached to this command |
private java.lang.String |
controlName
The controls name |
private boolean |
formElement
This flag indicates if this Action should be rendered as a hyperlink or input field |
private int |
insertPos
position used to insert the next parameter into the array. |
private java.lang.Object[] |
parameter
Array with parameters for the action |
private boolean |
transaction
Indicates if the transaction token (if any) should be generated for this hyperlink. |
Constructor Summary | |
ControlAction(ControlActionDef action,
Control control)
Constructor of ControlAction The instance is initialized with the action definition. |
|
ControlAction(ControlActionDef action,
Control control,
java.lang.String actionName)
Constructor of ControlAction The instance is initialized with the action definition. |
Method Summary | |
private void |
addActionParams(Hyperlink link)
Adds the action parameters to the given hyperlink |
void |
addParameter(boolean value)
Adds a parameter |
void |
addParameter(java.lang.Boolean value)
Adds a parameter |
void |
addParameter(int value)
Adds a parameter |
void |
addParameter(java.lang.Integer value)
Adds a parameter |
void |
addParameter(long value)
Adds a parameter |
void |
addParameter(java.lang.Long value)
Adds a parameter |
void |
addParameter(java.lang.Object obj)
Adds a parameter |
void |
addParameter(java.lang.String value)
Adds a parameter |
java.lang.String |
createHref(javax.servlet.jsp.PageContext pageContext)
Creates a hyperlink |
Hyperlink |
createHyperlink(javax.servlet.jsp.PageContext pageContext)
Creates a hyperlink |
java.lang.String |
createSubmitHandler(javax.servlet.jsp.PageContext pageContext)
Creates a JavaScript Submit handler for the enclosing form |
java.lang.String |
createSubmitHandler(javax.servlet.jsp.PageContext pageContext,
java.lang.String userScript)
Creates a JavaScript Submit handler for the enclosing form |
void |
enableAjax(boolean enable)
|
boolean |
equals(java.lang.Object obj)
|
ControlActionDef |
getActionDef()
Returns the action definition (the actions prototype) |
private static java.lang.String |
getActionMappingURL(javax.servlet.jsp.PageContext pageContext,
java.lang.String action)
Method getActionMappingURL |
boolean |
getTransaction()
Checks if the framework should include a transaction token (if any) in all generated hyperlinks for this action. |
boolean |
isAjaxEnabled()
This method checks if the element should send AJAX requests to the server |
boolean |
isFormAction()
Check if the action is a form action. |
void |
setBehavior(ActionBehavior behavior)
Sets some information about how action should behave on the client. |
void |
setTransaction(boolean enable)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String ACTION_INPUT_CONTROL
public static final java.lang.String ACTION_URL_CONTROL
public static final java.lang.String ACTION_URL_ACTION
public static final java.lang.String ACTION_URL_PARAMETER
private java.lang.String controlName
private java.lang.String actionName
private boolean formElement
private boolean transaction
private boolean ajax
private ControlActionDef actiondef
private java.lang.Object[] parameter
private int insertPos
Constructor Detail |
public ControlAction(ControlActionDef action, Control control)
action
- ControlActionDefcontrol
- Controlpublic ControlAction(ControlActionDef action, Control control, java.lang.String actionName)
action
- ControlActionDefcontrol
- ControlactionName
- NameMethod Detail |
public ControlActionDef getActionDef()
public void setBehavior(ActionBehavior behavior)
behavior
- behavior information.private static java.lang.String getActionMappingURL(javax.servlet.jsp.PageContext pageContext, java.lang.String action)
pageContext
- PageContextaction
- Action
public boolean isFormAction()
public void addParameter(java.lang.Object obj)
obj
- Objectpublic void addParameter(java.lang.String value)
value
- Valuepublic void addParameter(java.lang.Integer value)
value
- Valuepublic void addParameter(int value)
value
- Valuepublic void addParameter(java.lang.Long value)
value
- Valuepublic void addParameter(long value)
value
- Valuepublic void addParameter(java.lang.Boolean value)
value
- Valuepublic void addParameter(boolean value)
value
- Valueprivate void addActionParams(Hyperlink link)
link
- Hyperlinkpublic Hyperlink createHyperlink(javax.servlet.jsp.PageContext pageContext)
pageContext
- PageContext
public java.lang.String createHref(javax.servlet.jsp.PageContext pageContext)
pageContext
- PageContext
public java.lang.String createSubmitHandler(javax.servlet.jsp.PageContext pageContext)
pageContext
- PageContext
public java.lang.String createSubmitHandler(javax.servlet.jsp.PageContext pageContext, java.lang.String userScript)
pageContext
- PageContextuserScript
- String an optional user defined JavaScript code that should be
executed first
public boolean equals(java.lang.Object obj)
Object.equals(java.lang.Object)
public java.lang.String toString()
Object.toString()
public boolean getTransaction()
ActionBehavior
getTransaction
in interface ActionBehavior
true
if the transaction token should be generatedActionBehavior.getTransaction()
public boolean isAjaxEnabled()
ActionBehavior
isAjaxEnabled
in interface ActionBehavior
true
when the control should send AJAX
requests.ActionBehavior.isAjaxEnabled()
public void setTransaction(boolean enable)
enable
- set to true
to enable transaction supportpublic void enableAjax(boolean enable)
enable
- set to true
to enable AJAX support
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |