Author: julien(a)jboss.com
Date: 2007-03-06 20:14:28 -0500 (Tue, 06 Mar 2007)
New Revision: 6570
Modified:
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editWindow.xhtml
Log:
when editing a window, if a portlet is selected then it becomes the portlet of the window
Modified:
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java
===================================================================
---
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java 2007-03-07
00:46:57 UTC (rev 6569)
+++
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java 2007-03-07
01:14:28 UTC (rev 6570)
@@ -627,8 +627,24 @@
Map actionParams = actionEvent.getParameterMap();
if (actionParams.get("meta_action") != null)
{
- String[] uris = (String[])actionParams.get("uri");
- selectedContentURI = uris[0];
+ String[] uris = (String[])actionParams.get("uri");
+ if (uris != null && uris.length > 0)
+ {
+ String uri = uris[0];
+
+ PortalObject po = getSelectedObject();
+ switch(po.getType())
+ {
+ case PortalObject.TYPE_WINDOW:
+ Window window = (Window)po;
+ window.getContent().setURI(uri);
+ break;
+ case PortalObject.TYPE_PAGE:
+ selectedContentURI = uri;
+ break;
+ }
+
+ }
}
}
}
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editWindow.xhtml
===================================================================
---
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editWindow.xhtml 2007-03-07
00:46:57 UTC (rev 6569)
+++
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editWindow.xhtml 2007-03-07
01:14:28 UTC (rev 6570)
@@ -12,6 +12,7 @@
<!-- -->
<div>
<jbp:portlet
+ actionListener="#{portalobjectmgr.processEvent}"
instanceId="#{portalobjectmgr.selectedContentEditorInstance}"
renderParameters="#{portalobjectmgr.renderParameters}"
supportedModes="edit_content"
Show replies by date