Author: julien(a)jboss.com
Date: 2007-01-20 07:29:35 -0500 (Sat, 20 Jan 2007)
New Revision: 6056
Modified:
trunk/core/src/main/org/jboss/portal/core/controller/classic/ClassicController.java
trunk/core/src/main/org/jboss/portal/core/impl/model/CustomizationManagerService.java
trunk/core/src/main/org/jboss/portal/core/portlet/dashboard/PortletContentEditor.java
Log:
JBPORTAL_1200 : Dashboard - window operations fail
Modified:
trunk/core/src/main/org/jboss/portal/core/controller/classic/ClassicController.java
===================================================================
---
trunk/core/src/main/org/jboss/portal/core/controller/classic/ClassicController.java 2007-01-19
21:49:16 UTC (rev 6055)
+++
trunk/core/src/main/org/jboss/portal/core/controller/classic/ClassicController.java 2007-01-20
12:29:35 UTC (rev 6056)
@@ -142,6 +142,7 @@
}
catch (ResourceNotFoundException e)
{
+ log.error("Resource not found " + e.getRef(), e);
AbstractResponseHandler.sendStatusCode(invocation,
HttpServletResponse.SC_NOT_FOUND);
}
catch (ControllerException e)
Modified:
trunk/core/src/main/org/jboss/portal/core/impl/model/CustomizationManagerService.java
===================================================================
---
trunk/core/src/main/org/jboss/portal/core/impl/model/CustomizationManagerService.java 2007-01-19
21:49:16 UTC (rev 6055)
+++
trunk/core/src/main/org/jboss/portal/core/impl/model/CustomizationManagerService.java 2007-01-20
12:29:35 UTC (rev 6056)
@@ -166,7 +166,7 @@
//
Content content = window.getContent();
String instanceId = ((PortletContent)content).getInstanceRef();
- if (instanceId == null)
+ if (instanceId == null)
{
return null;
}
Modified:
trunk/core/src/main/org/jboss/portal/core/portlet/dashboard/PortletContentEditor.java
===================================================================
---
trunk/core/src/main/org/jboss/portal/core/portlet/dashboard/PortletContentEditor.java 2007-01-19
21:49:16 UTC (rev 6055)
+++
trunk/core/src/main/org/jboss/portal/core/portlet/dashboard/PortletContentEditor.java 2007-01-20
12:29:35 UTC (rev 6056)
@@ -60,10 +60,10 @@
for (int i = 0; i < available_instances.size(); i++)
{
Instance instance = (Instance)available_instances.get(i);
- writer.println("<option value=\"");
- writer.println(instance.getId());
- writer.println("\">");
- writer.println(instance.getId());
+ writer.print("<option value=\"");
+ writer.print(instance.getId());
+ writer.print("\">");
+ writer.print(instance.getId());
writer.println("</option>\n");
}
writer.println("</select>");
@@ -76,8 +76,18 @@
{
for (int i = 0; i < copyInstance.length; i++)
{
- PortletContent content =
(PortletContent)ctx.createWindow(ContentType.PORTLET);
- content.setInstanceRef(copyInstance[i]);
+ String instanceRef = copyInstance[i];
+ Instance instance = instanceContainer.getDefinition(instanceRef);
+ if (instance != null)
+ {
+ PortletContent content =
(PortletContent)ctx.createWindow(ContentType.PORTLET);
+ content.setInstanceRef(instanceRef);
+ }
+ else
+ {
+ // Handle me
+ System.out.println("Instance not found " + instanceRef);
+ }
}
}
catch (Exception e)
Show replies by date