Author: wesleyhales
Date: 2008-03-31 20:20:32 -0400 (Mon, 31 Mar 2008)
New Revision: 10440
Modified:
branches/JBoss_Portal_2_6_4_JBPB/core-admin/src/resources/portal-admin-war/jsf/common/editPageLayout.xhtml
branches/JBoss_Portal_2_6_4_JBPB/core-admin/src/resources/portal-admin-war/jsf/editWindow.xhtml
branches/JBoss_Portal_2_6_4_JBPB/core/src/resources/portal-core-war/WEB-INF/jsp/content/portlet_editor.jsp
branches/JBoss_Portal_2_6_4_JBPB/faces/src/main/org/jboss/portal/faces/component/portlet/JSFInvocation.java
Log:
admin migration to portlet bridge - final fixes
Modified:
branches/JBoss_Portal_2_6_4_JBPB/core/src/resources/portal-core-war/WEB-INF/jsp/content/portlet_editor.jsp
===================================================================
---
branches/JBoss_Portal_2_6_4_JBPB/core/src/resources/portal-core-war/WEB-INF/jsp/content/portlet_editor.jsp 2008-03-31
23:48:01 UTC (rev 10439)
+++
branches/JBoss_Portal_2_6_4_JBPB/core/src/resources/portal-core-war/WEB-INF/jsp/content/portlet_editor.jsp 2008-04-01
00:20:32 UTC (rev 10440)
@@ -29,6 +29,15 @@
var domTT_maxWidth = false;
//]]>
+ function submitForm(elem,actionUrl){
+ while (elem.parentNode && elem.parentNode.tagName.toLowerCase() !=
"form"){
+ elem = elem.parentNode;
+ }
+ var oForm = elem.parentNode;
+ oForm.action = actionUrl;
+ oForm.submit();
+ }
+
</script>
<table style="width:500px;">
@@ -108,17 +117,11 @@
String iconLocation = getIcon(info);
- PortletURL actionURL = renderResponse.createActionURL();
- actionURL.setParameter("content.uri",instance.getId());
- actionURL.setParameter("content.action.select","true");
- String test = "?action=1&" +
actionURL.toString().substring(actionURL.toString().lastIndexOf("?") +
1,actionURL.toString().length());
-// test = test.replace("/","%2F");
-//
%>
- <%--<portlet:actionURL var="test">--%>
- <%--<portlet:param name="content.action.select"
value="true"/>--%>
- <%--<portlet:param name="content.uri" value="<%=
instance.getId() %>"/>--%>
- <%--</portlet:actionURL>--%>
+ <portlet:actionURL var="test">
+ <portlet:param name="content.action.select"
value="true"/>
+ <portlet:param name="content.uri" value="<%=
instance.getId() %>"/>
+ </portlet:actionURL>
<div style="display:none">
<div class="darktip" id="info-container-<%= displayName
%>">
@@ -141,7 +144,7 @@
<tr class="<%= rowClass %>" >
<td >
<img src="<%= iconLocation %>" align="middle"
style="margin:0 4px 0 0"/>
- <span onmouseover="domTT_activate(this, event, 'content',
document.getElementById('info-container-<%= displayName
%>'),'delay', 0, 'trail', false, 'fade', 'both',
'fadeMax', 95, 'styleClass', 'none');"><a
href="<%= test %>" id="portlet-instance-link"><%=
displayName %></a></span>
+ <span onmouseover="domTT_activate(this, event, 'content',
document.getElementById('info-container-<%= displayName
%>'),'delay', 0, 'trail', false, 'fade', 'both',
'fadeMax', 95, 'styleClass', 'none');"><a
href="javascript:void(0);" onclick="submitForm(this,'<%= test
%>');return false" id="portlet-instance-link"><%= displayName
%></a></span>
</td>
</tr>
<%
Modified:
branches/JBoss_Portal_2_6_4_JBPB/core-admin/src/resources/portal-admin-war/jsf/common/editPageLayout.xhtml
===================================================================
---
branches/JBoss_Portal_2_6_4_JBPB/core-admin/src/resources/portal-admin-war/jsf/common/editPageLayout.xhtml 2008-03-31
23:48:01 UTC (rev 10439)
+++
branches/JBoss_Portal_2_6_4_JBPB/core-admin/src/resources/portal-admin-war/jsf/common/editPageLayout.xhtml 2008-04-01
00:20:32 UTC (rev 10440)
@@ -63,6 +63,7 @@
</tr>
<tr>
<td colspan="2" valign="top">
+ <h:form>
<jbp:portlet
portletId="#{pageManager.selectedEditorPortletId}"
portletInvoker="#{pageManager.portletInvoker}"
@@ -73,6 +74,7 @@
initialWindowState="normal"
renderParameters="#{pageManager.selectedRenderParameters}"
onClick="url.setParameter('windowName',
document.getElementById('windowForm:windowName').value);"/>
+ </h:form>
</td>
</tr>
</table>
Modified:
branches/JBoss_Portal_2_6_4_JBPB/core-admin/src/resources/portal-admin-war/jsf/editWindow.xhtml
===================================================================
---
branches/JBoss_Portal_2_6_4_JBPB/core-admin/src/resources/portal-admin-war/jsf/editWindow.xhtml 2008-03-31
23:48:01 UTC (rev 10439)
+++
branches/JBoss_Portal_2_6_4_JBPB/core-admin/src/resources/portal-admin-war/jsf/editWindow.xhtml 2008-04-01
00:20:32 UTC (rev 10440)
@@ -10,7 +10,7 @@
<ui:define name="content">
<!-- -->
-
+ <h:form>
<div class="clear">
<jbp:portlet
actionListener="#{portalobjectmgr.processEvent}"
@@ -22,7 +22,7 @@
initialMode="edit_content"
initialWindowState="normal"/>
</div>
-
+ </h:form>
</ui:define>
</ui:composition>
Modified:
branches/JBoss_Portal_2_6_4_JBPB/faces/src/main/org/jboss/portal/faces/component/portlet/JSFInvocation.java
===================================================================
---
branches/JBoss_Portal_2_6_4_JBPB/faces/src/main/org/jboss/portal/faces/component/portlet/JSFInvocation.java 2008-03-31
23:48:01 UTC (rev 10439)
+++
branches/JBoss_Portal_2_6_4_JBPB/faces/src/main/org/jboss/portal/faces/component/portlet/JSFInvocation.java 2008-04-01
00:20:32 UTC (rev 10440)
@@ -112,8 +112,10 @@
ViewHandler vh = faces.getApplication().getViewHandler();
String viewId = faces.getViewRoot().getViewId();
String clientId = uiportlet.getClientId(faces);
- StringBuffer url = new StringBuffer(vh.getActionURL(faces, viewId));
+ String actionURL = vh.getActionURL(faces, viewId);
+ actionURL = faces.getExternalContext().encodeActionURL(actionURL);
+ StringBuffer url = new StringBuffer(actionURL);
//
url.append("&").append(clientId).append("=jbp");