com.ibm.bpe.jsf.component.taglib
Class CommandTag
- java.lang.Object
javax.servlet.jsp.tagext.TagSupport
com.ibm.bpe.jsf.component.taglib.CommandTag
All implemented interfaces:
java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag
- public class CommandTag
- extends javax.servlet.jsp.tagext.TagSupport
bpe:commandbar
CommandBarTag
tag. A bpe:command
tag must be
enclosed within a bpe:commandbar
tag. Each command is represented as a button on the view.
Table of tag attributes:
Tag attribute | Description | Mandatory? |
---|---|---|
action | A Java Server Faces Action Method or the Faces Navigation target that is to be triggered by the command button.
The navigation target returned by the action overwrites all navigation rules specified by any other means.
The action is only called if no exception other than ErrorsInCommandException has been thrown by the command. |
false |
actionListener | A Java Server Faces Action Listener Method that will be notified when this component is activated by the user. The expression must evaluate to a public method that takes an ActionEvent parameter, with a return type of void. | false |
commandClass | The name of the command class. An instance of the class will be created by the command bar and run if the command button is selected. | false |
commandID | A unique ID for the command used. The attribute value must start with a letter or underscore. Subsequent characters may be letters, digits, dashes, and underscores. All whitespaces will be replaced by underscores. | true |
context | An arbitrary context object that is provided as a context for commands that are specified using the commandClass attribute.
The context object is retrieved when the command bar is first accessed. |
false |
immediate | If set to true, the command will be triggered before the input of the page has been processed. The default is false. | false |
label | The label displayed on the button. | true |
rendered | Determines whether the button for the command will be rendered. The default is true. | false |
styleClass | The CSS style class used as the styleClass attribute on the command button. | false |
Example:
<bpe:commandbar model="#{TaskInstanceDetails}"> <bpe:command commandID="Work on" label="#{bundle['ACTION.WORK.ON']}" commandClass="com.ibm.bpe.client.model.command.WorkOnTaskCommand" context="#{TaskInstanceDetailsBean}" action="taskMessage" /> <bpe:command commandID="Complete" label="#{bundle['ACTION.COMPLETE']}" commandClass="com.ibm.bpe.client.model.command.CompleteTaskCommand" context="#{TaskInstanceDetailsBean}" action="taskInstanceList" /> <bpe:command commandID="Release" label="#{bundle['ACTION.RELEASE']}" commandClass="com.ibm.bpe.client.model.command.CancelClaimTaskCommand" context="#{TaskInstanceList}" action="taskInstanceList" /> </bpe:commandbar>
See Also:
Field Summary
Modifier and Type | Field and Description |
---|---|
|
COPYRIGHT
|
Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
---|
id, pageContext |
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag |
---|
EVAL_BODY_AGAIN |
Fields inherited from interface javax.servlet.jsp.tagext.Tag |
---|
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
Constructor Summary
Constructor and Description |
---|
CommandTag()
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
doStartTag()
|
|
getAction()
Returns the Action being specified.
|
|
getActionListener()
Returns the Action Listener being specified.
|
|
getCommandClass()
Returns the class name of the command.
|
|
getCommandID()
Returns the command ID that has been specified.
|
|
getContext()
Returns the Value Binding pointing to a Context Object, if specified.
|
|
getErrorTarget()
Returns the navigation target that is used for error conditions.
|
|
getImmediate()
Returns a boolean value that defines
if this component is activated by the user,
notifications should be delivered to interested listeners
and actions immediately (that is, during Apply Request Values phase)
rather than waiting until Invoke Application phase.
|
|
getLabel()
Returns the button's label.
|
|
getRendered()
Returns a boolean value or value expression that defines whether or not the
command button is to be rendered.
|
|
getStyleClass()
Returns the CSS style used to render the
h:commandButton tag.
|
|
release()
|
|
setAction(java.lang.String facesAction)
Sets a Faces Action for the command button.
|
|
setActionListener(java.lang.String facesActionListener)
Sets a Faces Action Listener for the command button.
|
|
setCommandClass(java.lang.String commandClassName)
Sets the class name of the command that is triggered by the rendered button.
|
|
setCommandID(java.lang.String commandID)
Sets the command ID of the command.
|
|
setContext(java.lang.String contextObject)
Sets the Value Binding Expression that points to a Context object.
|
|
setErrorTarget(java.lang.String errorTarget)
Sets the navigation target that is used for error conditions.
|
|
setImmediate(java.lang.String immediate)
Specifies a boolean value that defines
if this component is activated by the user,
notifications should be delivered to interested listeners
and actions immediately (that is, during Apply Request Values phase)
rather than waiting until Invoke Application phase.
|
|
setLabel(java.lang.String label)
Sets the label of the command button.
|
|
setRendered(java.lang.String rendered)
Specifies a boolean value or value expression that defines whether or not the
command button is to be rendered.
|
|
setStyleClass(java.lang.String cssStyle)
Sets the CSS style used to render the
h:commandButton tag.
|
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
---|
doAfterBody, doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail
COPYRIGHT
- public static final java.lang.String COPYRIGHT
See Also:
Constructor Detail
CommandTag
- public CommandTag()
Method Detail
getCommandClass
- public java.lang.String getCommandClass( )
Returns the class name of the command.
Returns:
The class name of the command
setCommandClass
- public void setCommandClass(java.lang.String commandClassName)
Sets the class name of the command that is triggered by the rendered button.
Parameters:
commandClassName
- The class name of the command getCommandID
- public java.lang.String getCommandID( )
Returns the command ID that has been specified.
Returns:
The command ID.
getLabel
- public java.lang.String getLabel( )
Returns the button's label.
Returns:
A Value Binding Expression or a literal
getStyleClass
- public java.lang.String getStyleClass( )
Returns the CSS style used to render the
h:commandButton
tag.
Returns:
The CSS command button style name
setCommandID
- public void setCommandID(java.lang.String commandID)
Sets the command ID of the command.
Parameters:
commandID
- The command ID setLabel
- public void setLabel(java.lang.String label)
Sets the label of the command button.
Parameters:
label
- Either a Value Binding Expression or a literal setStyleClass
- public void setStyleClass(java.lang.String cssStyle)
Sets the CSS style used to render the
h:commandButton
tag.
Parameters:
cssStyle
- The CSS command button style name getAction
- public java.lang.String getAction( )
Returns the Action being specified.
Returns:
Either a navigation target literal or a Faces Action Method Binding
getActionListener
- public java.lang.String getActionListener( )
Returns the Action Listener being specified.
Returns:
a Faces Action Method Binding
getContext
- public java.lang.String getContext( )
Returns the Value Binding pointing to a Context Object, if specified.
Returns:
A Value Binding Expression.
setAction
- public void setAction(java.lang.String facesAction)
Sets a Faces Action for the command button.
Parameters:
facesAction
- Either a Faces Action Method Binding or a Navigation Target literal setActionListener
- public void setActionListener(java.lang.String facesActionListener)
Sets a Faces Action Listener for the command button.
Parameters:
facesActionListener
- a Faces Action Method Binding setContext
- public void setContext(java.lang.String contextObject)
Sets the Value Binding Expression that points to a Context object.
Parameters:
contextObject
- A Context Object getRendered
- public java.lang.String getRendered( )
Returns a boolean value or value expression that defines whether or not the
command button is to be rendered.
Returns:
Either a boolean value or a value expression for rendering
setRendered
- public void setRendered(java.lang.String rendered)
Specifies a boolean value or value expression that defines whether or not the
command button is to be rendered.
See Also:
UIComponentTag.setRendered(java.lang.String)
getImmediate
- public java.lang.String getImmediate( )
Returns a boolean value that defines
if this component is activated by the user,
notifications should be delivered to interested listeners
and actions immediately (that is, during Apply Request Values phase)
rather than waiting until Invoke Application phase.
Returns:
a boolean value
setImmediate
- public void setImmediate(java.lang.String immediate)
Specifies a boolean value that defines
if this component is activated by the user,
notifications should be delivered to interested listeners
and actions immediately (that is, during Apply Request Values phase)
rather than waiting until Invoke Application phase.
getErrorTarget
- public java.lang.String getErrorTarget( )
Returns the navigation target that is used for error conditions.
Returns:
The error navigation target
setErrorTarget
- public void setErrorTarget(java.lang.String errorTarget)
Sets the navigation target that is used for error conditions.
Parameters:
errorTarget
- The error navigation target doStartTag
- public int doStartTag()
- throws javax.servlet.jsp.JspException
Specified by:
doStartTag
in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag
in class javax.servlet.jsp.tagext.TagSupport
Throws:
javax.servlet.jsp.JspException
release
- public void release()
Specified by:
release
in interface javax.servlet.jsp.tagext.Tag
Overrides:
release
in class javax.servlet.jsp.tagext.TagSupport