taylor 2004/10/29 18:09:01
Modified: portals-bridges/myfaces/src/java/org/apache/portals/bridges/myfaces
PortletViewHandlerImpl.java FacesPortlet.java
Log:
rolled back the changes to handle class cast exceptions on redeploy
im going to have revisit this one
this fixes the state of tree view, tab view etc
Revision Changes Path
1.6 +3 -11
jakarta-jetspeed-2/portals-bridges/myfaces/src/java/org/apache/portals/bridges/myfaces/PortletViewHandlerImpl.java
Index: PortletViewHandlerImpl.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/portals-bridges/myfaces/src/java/org/apache/portals/bridges/myfaces/PortletViewHandlerImpl.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- PortletViewHandlerImpl.java 28 Oct 2004 05:57:53 -0000 1.5
+++ PortletViewHandlerImpl.java 30 Oct 2004 01:09:01 -0000 1.6
@@ -131,18 +131,10 @@
*/
public UIViewRoot restoreView(FacesContext facesContext, String viewId)
{
- UIViewRoot root = null;
- try
+ UIViewRoot root = handler.restoreView(facesContext, viewId);
+ if (root != null)
{
- root = handler.restoreView(facesContext, viewId);
- if (root != null)
- {
- facesContext.setViewRoot(root);
- }
- }
- catch (Exception e)
- {
- log.error("Exception restoring view: " + e);
+ facesContext.setViewRoot(root);
}
return root;
}
1.11 +4 -22
jakarta-jetspeed-2/portals-bridges/myfaces/src/java/org/apache/portals/bridges/myfaces/FacesPortlet.java
Index: FacesPortlet.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/portals-bridges/myfaces/src/java/org/apache/portals/bridges/myfaces/FacesPortlet.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- FacesPortlet.java 28 Oct 2004 05:57:53 -0000 1.10
+++ FacesPortlet.java 30 Oct 2004 01:09:01 -0000 1.11
@@ -451,13 +451,8 @@
{
// getLifecycle().execute(context);
String vi = context.getViewRoot().getViewId();
- if (null ==
context.getApplication().getViewHandler().restoreView(context, vi))
- {
- context.setViewRoot(new UIViewRoot());
- context.getViewRoot().setViewId(vi);
-
context.getViewRoot().setRenderKitId(RenderKitFactory.HTML_BASIC_RENDER_KIT);
-
request.getPortletSession().setAttribute(createViewRootKey(context, vi, viewId),
context.getViewRoot());
- }
+ context.getApplication().getViewHandler().restoreView(context, vi);
+
getLifecycle().render(context);
if (log.isTraceEnabled())
{
@@ -582,22 +577,9 @@
{
view = defaultView;
}
- UIViewRoot viewRoot = null;
- try
- {
- viewRoot = (UIViewRoot)portletRequest.
+ UIViewRoot viewRoot = (UIViewRoot)portletRequest.
getPortletSession().
getAttribute(createViewRootKey(facesContext, view, viewId));
- }
- catch (Exception e)
- {
- viewRoot = new UIViewRoot();
- facesContext.setViewRoot(viewRoot);
- facesContext.getViewRoot().setViewId(view);
-
facesContext.getViewRoot().setRenderKitId(RenderKitFactory.HTML_BASIC_RENDER_KIT);
-
portletRequest.getPortletSession().setAttribute(createViewRootKey(facesContext, view,
viewId), viewRoot);
-
- }
if (null != viewRoot)
{
facesContext.setViewRoot(viewRoot);
@@ -609,7 +591,7 @@
facesContext.getViewRoot().setViewId(view);
facesContext.getViewRoot().setRenderKitId(RenderKitFactory.HTML_BASIC_RENDER_KIT);
portletRequest.getPortletSession().setAttribute(createViewRootKey(facesContext, view,
viewId), viewRoot);
- }
+ }
}
portletRequest.setAttribute(REQUEST_SERVLET_PATH,
view.replaceAll(".jsp", ".jsf"));
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]