Author: julien(a)jboss.com
Date: 2007-06-26 13:46:46 -0400 (Tue, 26 Jun 2007)
New Revision: 7560
Modified:
trunk/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSContentEditorPortlet.java
trunk/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/editor/main.jsp
Log:
update cms integration content selector workflow
Modified:
trunk/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSContentEditorPortlet.java
===================================================================
---
trunk/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSContentEditorPortlet.java 2007-06-26
16:47:03 UTC (rev 7559)
+++
trunk/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSContentEditorPortlet.java 2007-06-26
17:46:46 UTC (rev 7560)
@@ -25,6 +25,9 @@
import java.io.IOException;
import java.util.List;
import java.util.Locale;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Iterator;
import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;
@@ -61,12 +64,26 @@
public void processAction(ActionRequest req, ActionResponse resp) throws
PortletException, PortletSecurityException, IOException
{
- if (req.getPortletMode().equals(EDIT_CONTENT))
+ if (req.getPortletMode().equals(EDIT_CONTENT) &&
req.getParameter("content.action.select") != null)
{
- String path = req.getParameter("path");
- if (path != null)
+ String contentURI = req.getParameter("content.uri");
+ if (contentURI != null)
{
- resp.setRenderParameter("path", path);
+ // Will contain the next render params
+ Map params = new HashMap();
+
+ //
+ params.put("content.uri", new String[]{contentURI});
+
+ //
+ String catParam = req.getParameter("path");
+ if (catParam != null)
+ {
+ params.put("path", new String[]{catParam});
+ }
+
+ //
+ resp.setRenderParameters(params);
}
}
}
Modified: trunk/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/editor/main.jsp
===================================================================
--- trunk/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/editor/main.jsp 2007-06-26
16:47:03 UTC (rev 7559)
+++ trunk/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/editor/main.jsp 2007-06-26
17:46:46 UTC (rev 7560)
@@ -90,7 +90,8 @@
{
File file = (File)files.get(j);
- PortletURL metaURL = renderResponse.createRenderURL();
+ PortletURL metaURL = renderResponse.createActionURL();
+ metaURL.setParameter("content.action.select", "select");
metaURL.setParameter("content.uri", file.getBasePath());
metaURL.setParameter("path", sCurrPath);
@@ -103,6 +104,7 @@
out.println("<tr
onmouseover=\"this.className='portlet-section-alternate';\"
onmouseout=\"this.className='portlet-section-body';\">");
}
%>
+<tr>
<td><img src="<%= renderRequest.getContextPath() +
CMSAdminConstants.DEFAULT_IMAGES_PATH%>/file.gif"
alt="${n:i18n("CMS_FILE")}"
border="0"> <a href="<%= metaURL
%>"><%=
@@ -134,12 +136,6 @@
%>
</p>
<%
- PortletURL submitURL = renderResponse.createActionURL();
- submitURL.setParameter("content.uri", uri);
- submitURL.setParameter("content.action.select", "select");
-%>
-<a href="<%= submitURL.toString() %>">Confirm</a>
-<%
}
}
-%>
+%>
\ No newline at end of file
Show replies by date