You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bridges-dev@portals.apache.org by "David Sean Taylor (JIRA)" <br...@portals.apache.org> on 2008/07/04 18:57:31 UTC

[jira] Work started: (PB-78) FacesPortlet does not check view id if it is null before it calls to restoreView in ActionRequest

     [ https://issues.apache.org/jira/browse/PB-78?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on PB-78 started by David Sean Taylor.

> FacesPortlet does not check view id if it is 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
>            Assignee: David Sean Taylor
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> 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: bridges-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: bridges-dev-help@portals.apache.org