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

java.lang.Object
  extended by javax.faces.webapp.UIComponentTagBase
      extended by javax.faces.webapp.UIComponentClassicTagBase
          extended by javax.faces.webapp.UIComponentTag
              extended by javax.faces.webapp.UIComponentBodyTag
                  extended by com.ibm.bpe.jsf.component.taglib.BaseTag
                      extended by com.ibm.bpe.jsf.component.taglib.MessageFormTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspIdConsumer, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

public class MessageFormTag
extends com.ibm.bpe.jsf.component.taglib.BaseTag

This class is used to configure a Message Component, and corresponds to the bpe:form tag. In addition, it enables you to configure the way in which Custom Java Server Pages are included, based on UISettings. The Message Component is able to display both commonj.sdo.DataObjects and boxed primitives. While a DataObject can be specified as the model object, box primitives must be wrapped in a com.ibm.bpe.client.MessageWrapper. The MessageComponent is not able to display custom data types that are extensions or restrictions of simple types.

In the case of a Business Object, the Message Component applies heuristics to display the business load of the message, rather than the infrastructure of the Business Object (such as the ChangeSummary, for example). If the 'simplification' mode is switched on, properties with cardinality 0 or 1 are displayed by default. Otherwise, only a button is rendered which allows a new element to be added.

The way a client application interfaces with Custom Java Server Pages can be tailored using the messageKey, prefixKey and faultKey attributes. Basically, faultKey enables a Custom Java Server Page to declare that the input is intended as the input for a fault, while prefixKey enables the MessageComponent to process the correct request parameter.

Table of tag attributes:

Tag attributeMandatory?Description
buttonStyleClass false For internal use only.
faultKey false The name of the request attribute whose value is the name of the parameter that specifies the fault being provided, if set. The default value is "fault".
id false The JavaServer Faces ID of the component.
messageKey false The name of the request attribute whose value is the message to be rendered. The default value is "message". A map representation of the message will be provided under the key $messageKey+"Map".
model true The model that is displayed. The value must be a Value Binding Expression that evaluates to either a commonj.sdo.DataObject or com.ibm.bpe.client.MessageWrapper.
prefixKey false The name of the request attribute whose value is to be used as the prefix of all parameters in the input form for a message. The default value is "prefix".
readOnly false If true, a read-only table is rendered. By default, this attribute is turned off.
simplification false If switched on, properties with cardinality 0 or 1 are displayed by default. By the default, it is switched on.
sourceView false For interal use only.
style4invalidinput false The CSS style used to render invalid input.
style4validinput false The CSS style used to render valid input.
styleClass4invalidInput false The CSS style class name used to render invalid input.
styleClass4validInput false The CSS style class name used to render valid input.
styleClass4output false The CSS style class name used to render the output elements.
styleClass4table false The CSS table style class name used to render the tables generated by the Message Component


Example:

        <bpe:form model="#{ProcessInstanceDetailsBean.outputMessageWrapper}" 
                  simplification="true" 
                  readOnly="true" 
                  styleClass4output="outputStyleClass" 
                  styleClass4table="tableStyleClass">
        </bpe:form>

 


Field Summary
static java.lang.String COPYRIGHT
           
 
Fields inherited from class javax.faces.webapp.UIComponentClassicTagBase
bodyContent, pageContext, UNIQUE_ID_PREFIX
 
Fields inherited from class javax.faces.webapp.UIComponentTagBase
log
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Constructor Summary
MessageFormTag()
           
 
Method Summary
 java.lang.String getButtonStyleClass()
          Returns the CSS button style class name used to render the tables.
 java.lang.String getComponentType()
          Returns the name of the component type that is created for this tag.
 java.lang.String getFaultKey()
          Returns the fault key.
 java.lang.String getMessageKey()
          Returns the message key.
 java.lang.String getModel()
          Returns the Value Binding Expression used to retrieve the model.
 java.lang.String getPrefixKey()
          Returns the prefix key.
 java.lang.String getReadOnly()
          Returns whether read-only mode is switched on.
 java.lang.String getRendererType()
          Returns the name of the renderer type.
 java.lang.String getSimplification()
          Returns whether 'simplification' mode is switched on.
 java.lang.String getSourceView()
          Decides with the source view is shown or not.
 java.lang.String getStyle4invalidInput()
          Returns the CSS style used to render invalid input.
 java.lang.String getStyle4validInput()
          Returns the CSS style used to render valid input.
 java.lang.String getStyleClass4invalidInput()
          Returns the CSS style class name used to render invalid input.
 java.lang.String getStyleClass4output()
          Returns the CSS style class name used to render the output elements.
 java.lang.String getStyleClass4table()
          Returns the CSS style class name used to render the tables.
 java.lang.String getStyleClass4validInput()
          Returns the CSS style class name used to render valid input.
 void release()
           
 void setButtonStyleClass(java.lang.String cssStyle)
          Sets the CSS button style class name used to render the tables.
 void setFaultKey(java.lang.String attributeName)
          Sets the fault key.
 void setMessageKey(java.lang.String attributeName)
          Sets the message key.
 void setModel(java.lang.String data)
          Sets the message that is displayed.
 void setPrefixKey(java.lang.String attributeName)
          Sets the prefix key.
 void setReadOnly(java.lang.String readOnlyMode)
          Sets the display mode.
 void setSimplification(java.lang.String simplificationMode)
          Activates simplification mode.
 void setSourceView(java.lang.String sourceView)
          Determines whether the source view will be shown.
 void setStyle4invalidInput(java.lang.String cssStyle)
          Sets the CSS style to use for rendering invalid input.
 void setStyle4validInput(java.lang.String cssStyle)
          Sets the CSS style to use for rendering valid input.
 void setStyleClass4invalidInput(java.lang.String cssStyle)
          Sets the CSS style class name used to render invalid input.
 void setStyleClass4output(java.lang.String cssStyle)
          Sets the CSS style class name used for rendering the output elements.
 void setStyleClass4table(java.lang.String cssStyle)
          Sets the CSS style class name used to render the tables.
 void setStyleClass4validInput(java.lang.String cssStyle)
          Sets the CSS style class name used to render valid input.
 
Methods inherited from class com.ibm.bpe.jsf.component.taglib.BaseTag
add, addBooleanValue, doEndTag, doStartTag, setProperties
 
Methods inherited from class javax.faces.webapp.UIComponentTag
createComponent, getParentUIComponentTag, hasBinding, isSuppressed, isValueReference, setBinding, setRendered
 
Methods inherited from class javax.faces.webapp.UIComponentClassicTagBase
addChild, addFacet, addVerbatimAfterComponent, addVerbatimBeforeComponent, createVerbatimComponent, createVerbatimComponentFromBodyContent, doAfterBody, doInitBody, encodeBegin, encodeChildren, encodeEnd, findComponent, getBodyContent, getComponentInstance, getCreated, getCreatedComponents, getDoAfterBodyValue, getDoEndValue, getDoStartValue, getFacesContext, getFacesJspId, getFacetName, getId, getIndexOfNextChildTag, getJspId, getParent, getParentUIComponentClassicTagBase, getPreviousOut, setBodyContent, setId, setJspId, setPageContext, setParent, setupResponseWriter
 
Methods inherited from class javax.faces.webapp.UIComponentTagBase
getELContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setPageContext, setParent
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
See Also:
Constant Field Values
Constructor Detail

MessageFormTag

public MessageFormTag()
Method Detail

getComponentType

public java.lang.String getComponentType()
Returns the name of the component type that is created for this tag.

Specified by:
getComponentType in class javax.faces.webapp.UIComponentTagBase
Returns:
The Faces component type

getRendererType

public java.lang.String getRendererType()
Returns the name of the renderer type. The List Component uses the default HTML renderer irrespective of this value.

Specified by:
getRendererType in class javax.faces.webapp.UIComponentTagBase
Returns:
The Faces renderer type

getModel

public java.lang.String getModel()
Returns the Value Binding Expression used to retrieve the model. The Value Binding Expression points to either a MessageWrapper or a DataObject.

Returns:
The Value Binding Expression for the model

getReadOnly

public java.lang.String getReadOnly()
Returns whether read-only mode is switched on. In the case of a Value Binding Expression, this must evaluate to a Boolean value.

Returns:
'true', 'false', or a Value Binding Expression

getSimplification

public java.lang.String getSimplification()
Returns whether 'simplification' mode is switched on. In the case of a Value Binding Expression, this must evaluate to a Boolean value.

Returns:
'true', 'false', or a Value Binding Expression

getStyle4invalidInput

public java.lang.String getStyle4invalidInput()
Returns the CSS style used to render invalid input.

Returns:
A CSS style, or null

getStyle4validInput

public java.lang.String getStyle4validInput()
Returns the CSS style used to render valid input.

Returns:
A CSS style, or null

getStyleClass4invalidInput

public java.lang.String getStyleClass4invalidInput()
Returns the CSS style class name used to render invalid input.

Returns:
A CSS style class name, or null

getStyleClass4validInput

public java.lang.String getStyleClass4validInput()
Returns the CSS style class name used to render valid input.

Returns:
A CSS style class name, or null

setModel

public void setModel(java.lang.String data)
Sets the message that is displayed. The value must be a Value Binding Expression that evaluates to either commonj.sdo.DataObject or com.ibm.bpe.client.MessageWrapper.

Parameters:
data - Value Binding Expression

setReadOnly

public void setReadOnly(java.lang.String readOnlyMode)
Sets the display mode. If true, no input fields are rendered. In the case of a Value Binding Expression, this must evaluate to a Boolean value.

Parameters:
readOnlyMode - 'true', 'false', or a Value Binding Expression

setSimplification

public void setSimplification(java.lang.String simplificationMode)
Activates simplification mode. If true, properties with cardinality 0 or 1 are displayed by default.

Parameters:
simplificationMode - 'true', 'false', or a ValueBinding Expression

setStyle4invalidInput

public void setStyle4invalidInput(java.lang.String cssStyle)
Sets the CSS style to use for rendering invalid input.

Parameters:
cssStyle - A CSS style or null

setStyle4validInput

public void setStyle4validInput(java.lang.String cssStyle)
Sets the CSS style to use for rendering valid input.

Parameters:
cssStyle - A CSS style or null

setStyleClass4invalidInput

public void setStyleClass4invalidInput(java.lang.String cssStyle)
Sets the CSS style class name used to render invalid input.

Parameters:
cssStyle - A CSS style class name or null

setStyleClass4validInput

public void setStyleClass4validInput(java.lang.String cssStyle)
Sets the CSS style class name used to render valid input.

Parameters:
cssStyle - A CSS style class name or

getMessageKey

public java.lang.String getMessageKey()
Returns the message key. The message key is the name of the request attribute whose value is the message to be rendered.

Returns:
The Request Attribute name whose value is to be used as the message key.

setMessageKey

public void setMessageKey(java.lang.String attributeName)
Sets the message key. The messageKey is the name of the request attribute whose value is the message to be rendered.

Parameters:
attributeName - The request attribute name whose value is used as the message key.

getPrefixKey

public java.lang.String getPrefixKey()
Returns the prefix key. The prefixKey is the name of the request attribute whose value is to be used as the prefix of all parameters in the input form for a message.

Returns:
The request attribute name whose value is used as the message key.

setPrefixKey

public void setPrefixKey(java.lang.String attributeName)
Sets the prefix key. The prefixKey is the name of the request attribute whose value is to be used as the prefix of all parameters in the input form for a message.

Parameters:
attributeName - The request attribute name whose value is to be used as the message key.

getFaultKey

public java.lang.String getFaultKey()
Returns the fault key. The faultKey is the name of the request attribute whose value is to be used as the name of the parameter the value of which is the fault being provided, if set.

Returns:
The request attribute name whose value is to be used as the fault key.

setFaultKey

public void setFaultKey(java.lang.String attributeName)
Sets the fault key. The faultKey is the name of the request attribute whose value is to be used as the name of the parameter the value of which is the fault being provided, if set.

Parameters:
attributeName - The Request Attribute name whose value is used as fault key.

getStyleClass4output

public java.lang.String getStyleClass4output()
Returns the CSS style class name used to render the output elements.

Returns:
The CSS style class name

setStyleClass4output

public void setStyleClass4output(java.lang.String cssStyle)
Sets the CSS style class name used for rendering the output elements.

Parameters:
cssStyle - The CSS style class name used to render the output elements.

getStyleClass4table

public java.lang.String getStyleClass4table()
Returns the CSS style class name used to render the tables.

Returns:
The CSS table style class name

setStyleClass4table

public void setStyleClass4table(java.lang.String cssStyle)
Sets the CSS style class name used to render the tables.

Parameters:
cssStyle - The CSS table style class name

getButtonStyleClass

public java.lang.String getButtonStyleClass()
Returns the CSS button style class name used to render the tables.

Returns:
The CSS button style class name

setButtonStyleClass

public void setButtonStyleClass(java.lang.String cssStyle)
Sets the CSS button style class name used to render the tables.

Parameters:
cssStyle - The CSS button style class name

getSourceView

public java.lang.String getSourceView()
Decides with the source view is shown or not. By default, the source view will not be shown.

Returns:
whether the source view will be shown

setSourceView

public void setSourceView(java.lang.String sourceView)
Determines whether the source view will be shown. By default, the source view will not be shown.

Parameters:
sourceView - Whether the source view w ill be shown

release

public void release()
Specified by:
release in interface javax.servlet.jsp.tagext.Tag
Overrides:
release in class com.ibm.bpe.jsf.component.taglib.BaseTag