Author: thomas.heute(a)jboss.com
Date: 2008-06-16 09:20:15 -0400 (Mon, 16 Jun 2008)
New Revision: 11057
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/InternalContentProvider.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/render/RenderWindowCommand.java
Log:
- Missing resources was stopping the call too early to be handled by the error management
policy
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/InternalContentProvider.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/InternalContentProvider.java 2008-06-16
09:12:23 UTC (rev 11056)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/InternalContentProvider.java 2008-06-16
13:20:15 UTC (rev 11057)
@@ -62,6 +62,7 @@
import org.w3c.dom.Element;
import javax.portlet.MimeResponse;
+
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
@@ -173,11 +174,42 @@
}
}
+ // Get Window properties
+ Map<String, String> windowProps = new HashMap<String,
String>(window.getProperties());
+
+ try
+ {
+ // Check that the associated portlet is deployed
+ getPortletInstance(rendererContext).getPortlet();
+ }
+ catch (PortletInvokerException e)
+ {
+ ControllerResponse cr;
+
+ //
+ if (e instanceof NoSuchPortletException)
+ {
+ cr = new
UnavailableResourceResponse(((NoSuchPortletException)e).getPortletId(), false);
+ }
+ else
+ {
+ log.error("Portlet invoker exception during portlet window
rendering", e);
+ cr = new org.jboss.portal.core.controller.command.response.ErrorResponse(e,
false);
+ }
+
+ //
+ return new WindowRendition(windowProps, WindowState.NORMAL, Mode.VIEW, null,
null, cr);
+ }
+
//
WindowNavigationalState windowNS = rendererContext.getNavigationalState();
+
+ if (windowNS == null)
+ {
+
+ }
//
- Map<String, String> windowProps = new HashMap<String,
String>(window.getProperties());
Mode mode = windowNS.getMode();
WindowState windowState = windowNS.getWindowState();
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/render/RenderWindowCommand.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/render/RenderWindowCommand.java 2008-06-16
09:12:23 UTC (rev 11056)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/render/RenderWindowCommand.java 2008-06-16
13:20:15 UTC (rev 11057)
@@ -142,7 +142,7 @@
public void acquireResources() throws NoSuchResourceException
{
super.acquireResources();
-
+/*
// check that the portlet associated with the window is deployed by delegating to
the navigational state which
// in turn delegates to ControllerPortletControllerContext which knows the windows
which are available
String windowName = window.getName();
@@ -152,5 +152,7 @@
log.debug("Resource associated with window '" + windowName +
"' could not be found!");
throw new NoSuchResourceException(windowName);
}
+ */
}
+
}
Show replies by date