FacesPortlet does not check view id if it null before it calls to restoreView
in ActionRequest
----------------------------------------------------------------------------------------------
Key: PB-78
URL: https://issues.apache.org/jira/browse/PB-78
Project: Portals Bridges
Issue Type: Bug
Components: jsf
Affects Versions: 1.0.4
Environment: Sun JSF Reference Implementation version 1.2
(jsf-impl.jar),
Websphere portlet container version 6.1.0
Apache MyFaces JSF portal bridge version 1.0.4 (portals-bridges-jsf-1.0.4.jar)
Reporter: Ali Omar
When redirecting from one portlet page to another, the ActionRequest on the new
page comes before the first RenderRequest. This causes the view root id to be
null during the ActionRequest. Therefore we need to check the value of viewId
is not null before we call restoreView.
// lin line 489 of jsf/FacesPortlet.java
if (actionRequest)
{
String vi = context.getViewRoot().getViewId();
if(vi != null) // THIS LINE INSERTED
context.getApplication().getViewHandler().restoreView(context, vi);
getLifecycle().execute(context);
if (log.isTraceEnabled())
{
log.trace("End Executing phases");
}
// The view should have been restore.
// Pass it to the render request.
request.getPortletSession().setAttribute(
createViewRootKey(context, defaultPage, viewId),
context.getViewRoot());
ActionResponse actionResponse = (ActionResponse) response;
// save FacesMessage objects on session; so they can
// be restored during the render phase
saveFacesMessages(context, request.getPortletSession());
}
call to restoreView(context, null) during the actionRequest results in a
NullPointerException.
This the original one that steve sent:
java.lang.NullPointerException
at
com.sun.faces.application.ViewHandlerImpl.convertViewId(ViewHandlerImpl.java:879)
at
com.sun.faces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:280)
at
org.apache.portals.bridges.jsf.PortletViewHandlerImpl.restoreView(PortletVi
Ali Omar
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]