com.ibm.bpe.jsf.component.taglib

Class CommandTag

  1. java.lang.Object
  2. extended byjavax.servlet.jsp.tagext.TagSupport
  3. extended bycom.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

  1. public class CommandTag
  2. extends javax.servlet.jsp.tagext.TagSupport
This class is used to configure the commands displayed by the Command Bar component. The Command Bar itself is specified by the 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 attributeDescriptionMandatory?
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:
Serialized Form

Field Summary

Modifier and Type Field and Description
  1. static
  2. java.lang.String
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
  1. int
doStartTag()
  1. java.lang.String
getAction()
Returns the Action being specified.
  1. java.lang.String
getActionListener()
Returns the Action Listener being specified.
  1. java.lang.String
getCommandClass()
Returns the class name of the command.
  1. java.lang.String
getCommandID()
Returns the command ID that has been specified.
  1. java.lang.String
getContext()
Returns the Value Binding pointing to a Context Object, if specified.
  1. java.lang.String
getErrorTarget()
Returns the navigation target that is used for error conditions.
  1. 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.
  1. java.lang.String
getLabel()
Returns the button's label.
  1. java.lang.String
getRendered()
Returns a boolean value or value expression that defines whether or not the command button is to be rendered.
  1. java.lang.String
getStyleClass()
Returns the CSS style used to render the h:commandButton tag.
  1. void
release()
  1. void
setAction(java.lang.String facesAction)
Sets a Faces Action for the command button.
  1. void
setActionListener(java.lang.String facesActionListener)
Sets a Faces Action Listener for the command button.
  1. void
setCommandClass(java.lang.String commandClassName)
Sets the class name of the command that is triggered by the rendered button.
  1. void
setCommandID(java.lang.String commandID)
Sets the command ID of the command.
  1. void
setContext(java.lang.String contextObject)
Sets the Value Binding Expression that points to a Context object.
  1. void
setErrorTarget(java.lang.String errorTarget)
Sets the navigation target that is used for error conditions.
  1. 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.
  1. void
setLabel(java.lang.String label)
Sets the label of the command button.
  1. 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.
  1. void
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

  1. public static final java.lang.String COPYRIGHT
See Also:

Constructor Detail

CommandTag

  1. public CommandTag()

Method Detail

getCommandClass

  1. public java.lang.String getCommandClass( )
Returns the class name of the command.
Returns:
The class name of the command

setCommandClass

  1. 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

  1. public java.lang.String getCommandID( )
Returns the command ID that has been specified.
Returns:
The command ID.

getLabel

  1. public java.lang.String getLabel( )
Returns the button's label.
Returns:
A Value Binding Expression or a literal

getStyleClass

  1. public java.lang.String getStyleClass( )
Returns the CSS style used to render the h:commandButton tag.
Returns:
The CSS command button style name

setCommandID

  1. public void setCommandID(java.lang.String commandID)
Sets the command ID of the command.
Parameters:
commandID - The command ID

setLabel

  1. 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

  1. 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

  1. public java.lang.String getAction( )
Returns the Action being specified.
Returns:
Either a navigation target literal or a Faces Action Method Binding

getActionListener

  1. public java.lang.String getActionListener( )
Returns the Action Listener being specified.
Returns:
a Faces Action Method Binding

getContext

  1. public java.lang.String getContext( )
Returns the Value Binding pointing to a Context Object, if specified.
Returns:
A Value Binding Expression.

setAction

  1. 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

  1. public void setActionListener(java.lang.String facesActionListener)
Sets a Faces Action Listener for the command button.
Parameters:
facesActionListener - a Faces Action Method Binding

setContext

  1. public void setContext(java.lang.String contextObject)
Sets the Value Binding Expression that points to a Context object.
Parameters:
contextObject - A Context Object

getRendered

  1. 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

  1. 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

  1. 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

  1. 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

  1. public java.lang.String getErrorTarget( )
Returns the navigation target that is used for error conditions.
Returns:
The error navigation target

setErrorTarget

  1. public void setErrorTarget(java.lang.String errorTarget)
Sets the navigation target that is used for error conditions.
Parameters:
errorTarget - The error navigation target

doStartTag

  1. public int doStartTag()
  2. 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

  1. public void release()
Specified by:
release in interface javax.servlet.jsp.tagext.Tag
Overrides:
release in class javax.servlet.jsp.tagext.TagSupport