Fixes are available
8.0.0.9: WebSphere Application Server V8.0 Fix Pack 9
8.5.5.3: WebSphere Application Server V8.5.5 Fix Pack 3
8.5.5.4: WebSphere Application Server V8.5.5 Fix Pack 4
8.0.0.10: WebSphere Application Server V8.0 Fix Pack 10
8.5.5.5: WebSphere Application Server V8.5.5 Fix Pack 5
8.5.5.6: WebSphere Application Server V8.5.5 Fix Pack 6
8.0.0.11: WebSphere Application Server V8.0 Fix Pack 11
8.5.5.7: WebSphere Application Server V8.5.5 Fix Pack 7
8.5.5.8: WebSphere Application Server V8.5.5 Fix Pack 8
8.0.0.12: WebSphere Application Server V8.0 Fix Pack 12
8.5.5.9: WebSphere Application Server V8.5.5 Fix Pack 9
8.5.5.10: WebSphere Application Server V8.5.5 Fix Pack 10
8.5.5.11: WebSphere Application Server V8.5.5 Fix Pack 11
8.0.0.13: WebSphere Application Server V8.0 Fix Pack 13
8.5.5.12: WebSphere Application Server V8.5.5 Fix Pack 12
8.0.0.14: WebSphere Application Server V8.0 Fix Pack 14
8.5.5.13: WebSphere Application Server V8.5.5 Fix Pack 13
8.0.0.15: WebSphere Application Server V8.0 Fix Pack 15
8.5.5.14: WebSphere Application Server V8.5.5 Fix Pack 14
8.5.5.15: WebSphere Application Server V8.5.5 Fix Pack 15
8.5.5.14: WebSphere Application Server V8.5.5 Fix Pack 14
8.5.5.17: WebSphere Application Server V8.5.5 Fix Pack 17
8.5.5.20: WebSphere Application Server V8.5.5.20
8.5.5.18: WebSphere Application Server V8.5.5 Fix Pack 18
8.5.5.19: WebSphere Application Server V8.5.5 Fix Pack 19
8.5.5.16: WebSphere Application Server V8.5.5 Fix Pack 16
8.5.5.21: WebSphere Application Server V8.5.5.21
APAR status
Closed as program error.
Error description
I am developing a portlet which uses Faces 2.0 on WPS 8. In different cases i want to add FacesMessages to the FacesContext to display in the portlet using the h:messages-Tag. But i have some cases, where i have to add the messages from the processAction and processEvent-Method. In processAction i have tried to add FacesMessage using the getFacesContext(PortletRequestWrapper, PortletResponseWrapper, Lifecycle)-Method which is in class com.ibm.faces20.portlet. FacesPortlet. This does not work and the messages are not displayed. For this case i found a solution which works for me. I am adding the FacesMessages to PortletSession (in example a list) and adding the Messages in Method saveFacesMessage(FacesContext) to the context. public void processAction(ActionRequest request, ActionResponse response) throws PortletException { messages.add(new FacesMessage(FacesMessage.SEVERITY_ERROR, "Fehler Action", "Fehler Action");); super.processAction(request, response); } @Override protected void saveFacesMessages(FacesContext context) { for (FacesMessage facesMessage : messages) { context.addMessage(null, facesMessage); } messages.clear(); super.saveFacesMessages(context); } My problem is the case, when i call the portlet using JSR286 Events. In this case the processEvent-Method is called. I tried it the same way to add FacesMessage like in processAction: @Override public void processEvent(EventRequest eventRequest, EventResponse eventResponse) throws PortletException, IOException { messages.add(fm); super.processEvent(eventRequest, eventResponse); } but this solution does not work, and i get a the following warning in log: There are some unhandled FacesMessages, this means not every FacesMessage had a chance to be rendered. When i try to display the FacesMessages manually (not using h: messages), i noticed, that there are two methods to read the facesmessage from context. Iterator<FacesMessage> getMessages() List<FacesMessage> getMessageList() Adding FacesMessage in processAction or by FacesValidator both methods return the same Message. Everything is ok. Adding FacesMessage in processEvent the method getMessageList() returns the FacesMessage, getMessages() returns a NullIterator.
Local fix
None available
Problem summary
**************************************************************** * USERS AFFECTED: IBM WebSphere Application Server users * * using JSR 286 events in a JSF 2.0 portlet * * on WebSphere Portal Server version 8.0 * **************************************************************** * PROBLEM DESCRIPTION: FacesMessages created in the * * processEvent method are not rendered * * in a JSF 2.0 portlet project. * **************************************************************** * RECOMMENDATION: * **************************************************************** The JSF 2.0 portlet bridge code needs to be updated to invoke super.processEvent method before saving parameters.
Problem conclusion
Faces Messages were not restored in processEvent call. The JSF 2.0 Portlet Bridge was updated to persist the faces messages in render parameters in processEvent. The fix will not be active until the following context-param is added and its value is set as true in the web.xml: <context-param> <param-name>com.ibm.faces.portlet.PROCESSEVENT_RETAIN_RENDERPAR AM</param-name> <param-value>true</param-value> </context-param> The fix for this APAR is currently targeted for inclusion in fix packs 8.0.0.9 and 8.5.5.3. Please refer to the Recommended Updates page for delivery information: http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980
Temporary fix
Comments
APAR Information
APAR number
PM97812
Reported component name
WEBSPHERE APP S
Reported component ID
5724J0800
Reported release
800
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2013-09-25
Closed date
2014-03-28
Last modified date
2014-10-29
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
WEBSPHERE APP S
Fixed component ID
5724J0800
Applicable component levels
R800 PSY
UP
R850 PSY
UP
Document Information
Modified date:
28 April 2022