com.ibm.bpe.jsf.component.taglib
Class MessageFormTag
- java.lang.Object
javax.faces.webapp.UIComponentTagBase
javax.faces.webapp.UIComponentClassicTagBase
javax.faces.webapp.UIComponentTag
javax.faces.webapp.UIComponentBodyTag
com.ibm.bpe.jsf.component.taglib.BaseTag
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
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 attribute | Mandatory? | 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
Modifier and Type | Field and Description |
---|---|
|
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.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
Constructor and Description |
---|
MessageFormTag()
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
getButtonStyleClass()
Returns the CSS button style class name used to render the tables.
|
|
getComponentType()
Returns the name of the component type that is created for this tag.
|
|
getFaultKey()
Returns the fault key.
|
|
getMessageKey()
Returns the message key.
|
|
getModel()
Returns the Value Binding Expression used to retrieve the model.
|
|
getPrefixKey()
Returns the prefix key.
|
|
getReadOnly()
Returns whether read-only mode is switched on.
|
|
getRendererType()
Returns the name of the renderer type.
|
|
getSimplification()
Returns whether 'simplification' mode is switched on.
|
|
getSourceView()
Decides with the source view is shown or not.
|
|
getStyle4invalidInput()
Returns the CSS style used to render invalid input.
|
|
getStyle4validInput()
Returns the CSS style used to render valid input.
|
|
getStyleClass4invalidInput()
Returns the CSS style class name used to render invalid input.
|
|
getStyleClass4output()
Returns the CSS style class name used to render the output elements.
|
|
getStyleClass4table()
Returns the CSS style class name used to render the tables.
|
|
getStyleClass4validInput()
Returns the CSS style class name used to render valid input.
|
|
release()
|
|
setButtonStyleClass(java.lang.String cssStyle)
Sets the CSS button style class name used to render the tables.
|
|
setFaultKey(java.lang.String attributeName)
Sets the fault key.
|
|
setMessageKey(java.lang.String attributeName)
Sets the message key.
|
|
setModel(java.lang.String data)
Sets the message that is displayed.
|
|
setPrefixKey(java.lang.String attributeName)
Sets the prefix key.
|
|
setReadOnly(java.lang.String readOnlyMode)
Sets the display mode.
|
|
setSimplification(java.lang.String simplificationMode)
Activates simplification mode.
|
|
setSourceView(java.lang.String sourceView)
Determines whether the source view will be shown.
|
|
setStyle4invalidInput(java.lang.String cssStyle)
Sets the CSS style to use for rendering invalid input.
|
|
setStyle4validInput(java.lang.String cssStyle)
Sets the CSS style to use for rendering valid input.
|
|
setStyleClass4invalidInput(java.lang.String cssStyle)
Sets the CSS style class name used to render invalid input.
|
|
setStyleClass4output(java.lang.String cssStyle)
Sets the CSS style class name used for rendering the output elements.
|
|
setStyleClass4table(java.lang.String cssStyle)
Sets the CSS style class name used to render the tables.
|
|
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 |
Field Detail
COPYRIGHT
- public static final java.lang.String COPYRIGHT
See Also:
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