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

java.lang.Object
  extended byjavax.faces.webapp.UIComponentTag
      extended byjavax.faces.webapp.UIComponentBodyTag
          extended bycom.ibm.bpe.jsf.component.taglib.BaseTag
              extended bycom.ibm.bpe.jsf.component.taglib.MessageFormTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, 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 to that one can configure the way in which Custom Java Server Pages are included based on UISettings. The Message Component is able to show both commonj.sdo.DataObjects as well as boxed primitives. While DataObject can be specified as model object, box primitives need to be wrapped into a com.ibm.bpe.client.MessageWrapper. The MessageComponent is not able to show custom data types that constrain simple types.

In case of a Business Object, the MessageComponnent applies an heuristic to only show the business load of the message and not to show the infrastructure of the Business Object like the ChangeSummary for example. If the simplification mode is turned on, properties with cardinality 0 or 1 are shown be default. Otherwise only a button is rendered that allows to add a new element.

The way a client interfaces with Custom Java Server Pages can be tailored using the messageKey, prefixKey and faultKey. In a nutshell, faultKey enables a Custom JSP to declare that the input is meant as an input for a fault, while the prefixKey enables the MessageComponent to process the right request parameter.

Table of tag attributes:

tag attributedescriptionmandatory
model The model which is displayed. The value must be a Value Binding Expression that evaluates to either a commonj.sdo.DataObject or com.ibm.bpe.client.MessageWrapper. true
simplification Properties with cardinality 0 or 1 are shown be default if the simplification mode is turned on. By the default, it is turned on. false
readOnly If true, a read only table will be rendered. By default, it is turned off. false
style4validinput The CSS style used for rendering valid input. false
style4invalidinput The CSS style used for rendering invalid input. false
styleClass4validInput The CSS style class name used for rendering valid input. false
styleClass4invalidInput The CSS style class name used for rendering invalid input. false
prefixKey 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. The default value is "prefix". false
messageKey The messageKey is the name of the request attribute whose value is the message to be rendered. The default value is "message". false
faultKey The faultKey is the name of the request attribute whose value is to be used as the name of the parameter whose value is the fault being provided if set. The default value is "fault". false
styleClass4output The CSS style class name used for rendering the output elements. false
styleClass4table The CSS table style class name used for rendering the tables rendered by the Message Component false


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.UIComponentBodyTag
bodyContent
 
Fields inherited from class javax.faces.webapp.UIComponentTag
pageContext
 
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
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
MessageFormTag()
           
 
Method Summary
 java.lang.String getButtonStyleClass()
          Returns the CSS button style class name used for rendering 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 for retrieving the model.
 java.lang.String getPrefixKey()
          Returns the prefix key.
 java.lang.String getReadOnly()
          Returns whether the read only mode is switched on.
 java.lang.String getRendererType()
          Returns the name of the renderer type.
 java.lang.String getSimplification()
          Returns whether the simplification mode is switched on.
 java.lang.String getStyle4invalidInput()
          Returns the CSS style used for rendering invalid input.
 java.lang.String getStyle4validInput()
          Returns the CSS style used for rendering valid input.
 java.lang.String getStyleClass4invalidInput()
          Returns the CSS style class name for rendering invalid input.
 java.lang.String getStyleClass4output()
          Returns the CSS style class name used for rendering the output elements.
 java.lang.String getStyleClass4table()
          Returns the CSS style class name used for rendering the tables.
 java.lang.String getStyleClass4validInput()
          Returns the CSS style class name for rendering valid input.
 void release()
           
 void setButtonStyleClass(java.lang.String cssStyle)
          Sets the CSS button style class name used for rendering 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 which 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)
          Sets the simplification mode.
 void setStyle4invalidInput(java.lang.String cssStyle)
          Sets the CSS style used for rendering invalid input.
 void setStyle4validInput(java.lang.String cssStyle)
          Sets the CSS style used for rendering valid input.
 void setStyleClass4invalidInput(java.lang.String cssStyle)
          Sets the CSS style class name used for rendering 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 for rendering the tables.
 void setStyleClass4validInput(java.lang.String cssStyle)
          Sets the CSS style class name used for rendering 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.UIComponentBodyTag
doAfterBody, doInitBody, getBodyContent, getDoAfterBodyValue, getDoStartValue, getPreviousOut, setBodyContent
 
Methods inherited from class javax.faces.webapp.UIComponentTag
encodeBegin, encodeChildren, encodeEnd, findComponent, getComponentInstance, getCreated, getDoEndValue, getFacesContext, getFacetName, getId, getParent, getParentUIComponentTag, isSuppressed, isValueReference, setBinding, setId, setPageContext, setParent, setRendered, setupResponseWriter
 
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.

Returns:
The Faces component type

getRendererType

public java.lang.String getRendererType()
Returns the name of the renderer type. Also the List Component uses the default html renderer despite this value.

Returns:
The Faces renderer type

getModel

public java.lang.String getModel()
Returns the Value Binding Expression used for retrieving 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 the read only mode is switched on. In case of a Value Binding Expression, the Value Binding Expression must evaluate to a Boolean value.

Returns:
Either 'true' or 'false' or Value Binding Expression

getSimplification

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

Returns:
Either 'true' or 'false' or Value Binding Expression

getStyle4invalidInput

public java.lang.String getStyle4invalidInput()
Returns the CSS style used for rendering invalid input.

Returns:
A CSS style or null

getStyle4validInput

public java.lang.String getStyle4validInput()
Returns the CSS style used for rendering valid input.

Returns:
A CSS style or null

getStyleClass4invalidInput

public java.lang.String getStyleClass4invalidInput()
Returns the CSS style class name for rendering invalid input.

Returns:
A CSS style class name or null

getStyleClass4validInput

public java.lang.String getStyleClass4validInput()
Returns the CSS style class name for rendering valid input.

Returns:
A CSS style class name or null

setModel

public void setModel(java.lang.String data)
Sets the message which is displayed. The value must be a Value Binding Expression that evaluates to either a 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 will be rendered. In case of a Value Binding Expression, the Value Binding Expression must evaluate to a Boolean value.

Parameters:
readOnlyMode - 'true' or 'false' or ValueBinding Expression

setSimplification

public void setSimplification(java.lang.String simplificationMode)
Sets the simplification mode. If true, properties with cardinality 0 or 1 are shown be default. Properties with cardinality 0 or 1 are shown be default if the simplification mode is turned on.

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

setStyle4invalidInput

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

Parameters:
cssStyle - A CSS style or null

setStyle4validInput

public void setStyle4validInput(java.lang.String cssStyle)
Sets the CSS style used 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 for rendering 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 for rendering valid input.

Parameters:
cssStyle - A CSS style class name or

getMessageKey

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

Returns:
The Request Attribute name whose value is used as 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 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 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 used as 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 whose value is the fault being provided if set.

Returns:
The Request Attribute name whose value is used as 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 whose value 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 for rendering 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 for rendering the output elements

getStyleClass4table

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

Returns:
The CSS table style class name

setStyleClass4table

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

Parameters:
cssStyle - The CSS table style class name

getButtonStyleClass

public java.lang.String getButtonStyleClass()
Returns the CSS button style class name used for rendering 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 for rendering the tables.

Parameters:
cssStyle - The CSS button style class name

release

public void release()