com.ibm.bpe.jsf.component.taglib
Class CommandTag

java.lang.Object
  extended byjavax.servlet.jsp.tagext.TagSupport
      extended bycom.ibm.bpe.jsf.component.taglib.CommandTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag

public class CommandTag
extends javax.servlet.jsp.tagext.TagSupport

This class is used to configure the commands shown by the Command Bar Component. The Command Bar itself is specified by the bpe:commandbar CommandBarTag tag. A bpe:command tag must be surrounded by a bpe:commandbar tag. A command will be represented as button on the view.

Table of tag attributes:

tag attributedescriptionmandatory
commandID A unique id for the command used. true
label The label shown on the button. true
action A Java Server Faces Action Method or the Faces Navigation target that will be triggered by the command button. The navigation target returned by the Action will overwrite all navigation rules that are specified by other means. The action will only be called if no exception other than an ErrorsInCommandException has been thrown in the command before. false
commandClass An instance of the command class is triggered by the command button. Navigation targets returned by the command instance might be overwritten through an action method. false
context An arbitrary context object that is provided as context for commands that are specified using the commandClass attribute. The context object is retrieved at the time when the command bar is first accessed. false
styleClass The CSS style used as styleClass attribute on the h:commandButton. 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
static 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
CommandTag()
           
 
Method Summary
 int doStartTag()
           
 java.lang.String getAction()
          Returns the Action being specified.
 java.lang.String getCommandClass()
          Returns the class name of the command.
 java.lang.String getCommandID()
          Returns the command ID that has been specified.
 java.lang.String getContext()
          Returns the Value Binding pointing to a Context Object if specified.
 java.lang.String getLabel()
          Returns the label of the button.
 java.lang.String getStyleClass()
          Returns the CSS style used for rendering the h:commandButton.
 void release()
           
 void setAction(java.lang.String facesAction)
          Sets a Faces Action for the command button.
 void setCommandClass(java.lang.String commandClassName)
          Sets the class name of the command that will be triggered by the rendered button.
 void setCommandID(java.lang.String commandID)
          Sets the command ID of the command
 void setContext(java.lang.String contextObject)
          Sets the Value Binding Expression pointing to a Context object.
 void setLabel(java.lang.String label)
          Sets the label of the command button.
 void setStyleClass(java.lang.String cssStyle)
          Sets the CSS style used for rendering the h:commandButton
 
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:
Constant Field Values
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 will be triggered by the rendered button.

Parameters:
commandClassName - The clazzName 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 label of the button.

Returns:
A Value Binding Expression or a literal

getStyleClass

public java.lang.String getStyleClass()
Returns the CSS style used for rendering the h:commandButton.

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 - A Value Binding Expression or a literal

setStyleClass

public void setStyleClass(java.lang.String cssStyle)
Sets the CSS style used for rendering the h:commandButton

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

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 - A Faces Action Method Binding or a Navigation Target literal

setContext

public void setContext(java.lang.String contextObject)
Sets the Value Binding Expression pointing to a Context object.

Parameters:
contextObject - A Context Object

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Throws:
javax.servlet.jsp.JspException

release

public void release()