IBM Support

Multiple validation messages do not display in a JSF 2.0 portlet on WebSphere Portal 8.0 or later

Troubleshooting


Problem

Multiple validation messages do not display in a JavaServer Faces (JSF) 2.0 portlet deployed on IBM WebSphere Portal 8.0 or later, with javax.faces.PROJECT_STAGE set as Development in the web.xml file.

Symptom

In the portlet facelet of a JSF 2.0 portlet published on WebSphere Portal v8.0, or later, when multiple validation messages are added on one component with <h:message> tag.

For example:


<h:form id="form1" styleClass="form">
<h:inputText id="text1" styleClass="inputText">
<f:validateRequired></f:validateRequired>
<f:validateLength minimum="5" maximum="10"></f:validateLength>
</h:inputText>
<h:message for="text1"></h:message>

<h:commandButton type="submit" value="Submit" id="button1"
styleClass="commandButton" action="/<portletname>View.xhtml"></h:commandButton>
</h:form>


For validateRequired, the following message displays in the UI:

viewns_Z7_1AE81A41JOMKC0AGQ8DP931083_:form1:text1: Validation Error: Value is required.

For validateLength, the following message displays in the console:

0000006c RenderRespons W   There are some unhandled FacesMessages, which means not every FacesMessage had a chance to be rendered.
These unhandled FacesMessages are:
- viewns_Z7_1AE81A41JOMKC0AGQ8DP931083_:form1:text1: Validation Error: Value is less than allowable minimum of '5'

[{"Product":{"code":"SSRTLW","label":"Rational Application Developer for WebSphere Software"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"Portal \/ Portlet Development","Platform":[{"code":"PF033","label":"Windows"}],"Version":"9.0;9.0.1;9.1;9.1.0.1","Edition":"","Line of Business":{"code":"LOB77","label":"Automation Platform"}}]

Log InLog in to view more of this document

This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use Log in button above to access the full document. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.

Document Information

Modified date:
16 June 2018

UID

swg21649550