Author: julien(a)jboss.com
Date: 2007-03-03 17:14:42 -0500 (Sat, 03 Mar 2007)
New Revision: 6511
Added:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objects.xhtml
Modified:
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPortalPreferences.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objectNavigation.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/pages.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/portals.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/windows.xhtml
Log:
use only one page for displaying portal objects, simplify navigations
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-03
21:34:34 UTC (rev 6510)
+++
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java 2007-03-03
22:14:42 UTC (rev 6511)
@@ -531,7 +531,6 @@
public String selectObject()
{
- String next = "portals";
try
{
// Get id
@@ -551,16 +550,12 @@
switch(object.getType())
{
case PortalObject.TYPE_CONTEXT:
- next = "portals";
break;
case PortalObject.TYPE_PORTAL:
- next = "pages";
break;
case PortalObject.TYPE_PAGE:
- next = "pages";
break;
case PortalObject.TYPE_WINDOW:
- next = "windows";
break;
}
}
@@ -571,7 +566,7 @@
}
//
- return next;
+ return "objects";
}
public void selectPlugin()
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml 2007-03-03
21:34:34 UTC (rev 6510)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml 2007-03-03
22:14:42 UTC (rev 6511)
@@ -203,18 +203,10 @@
<navigation-rule>
<navigation-case>
- <from-outcome>portals</from-outcome>
- <to-view-id>/WEB-INF/jsf/portals.xhtml</to-view-id>
+ <from-outcome>objects</from-outcome>
+ <to-view-id>/WEB-INF/jsf/objects.xhtml</to-view-id>
</navigation-case>
<navigation-case>
- <from-outcome>windows</from-outcome>
- <to-view-id>/WEB-INF/jsf/windows.xhtml</to-view-id>
- </navigation-case>
- <navigation-case>
- <from-outcome>pages</from-outcome>
- <to-view-id>/WEB-INF/jsf/pages.xhtml</to-view-id>
- </navigation-case>
- <navigation-case>
<from-outcome>editPortalPreferences</from-outcome>
<to-view-id>/WEB-INF/jsf/editPortalPreferences.xhtml</to-view-id>
</navigation-case>
Modified:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPortalPreferences.xhtml
===================================================================
---
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPortalPreferences.xhtml 2007-03-03
21:34:34 UTC (rev 6510)
+++
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPortalPreferences.xhtml 2007-03-03
22:14:42 UTC (rev 6511)
@@ -18,7 +18,7 @@
<h:selectOneMenu id="name" styleClass="portlet-form-field"
value="#{portalAction.defaultPageName}">
<f:selectItems value="#{portalobjectmgr.portalPageItems}" />
</h:selectOneMenu>
- <h:commandButton styleClass="portlet-form-button"
value="Update" action="portals"/>
+ <h:commandButton styleClass="portlet-form-button"
value="Update" action="objects"/>
</h:form>
Modified:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objectNavigation.xhtml
===================================================================
---
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objectNavigation.xhtml 2007-03-03
21:34:34 UTC (rev 6510)
+++
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objectNavigation.xhtml 2007-03-03
22:14:42 UTC (rev 6511)
@@ -36,7 +36,7 @@
</h:commandLink> | <h:commandLink
action="editPortalTheme"
actionListener="#{portalobjectmgr.selectObject}">
<h:outputText value="Theme"/>
<f:param name="id"
value="#{object.id}"/>
- </h:commandLink> | <h:commandLink
action="portals"
actionListener="#{portalobjectmgr.destroyObject}">
+ </h:commandLink> | <h:commandLink
action="objects"
actionListener="#{portalobjectmgr.destroyObject}">
<h:outputText value="Destroy"/>
<f:param name="id"
value="#{object.id}"/>
</h:commandLink>
@@ -72,7 +72,7 @@
</h:commandLink> | <h:commandLink
action="editPageTheme"
actionListener="#{portalobjectmgr.selectObject}">
<h:outputText value="Theme"/>
<f:param name="id"
value="#{object.id}"/>
- </h:commandLink> | <h:commandLink
action="pages" actionListener="#{portalobjectmgr.destroyObject}">
+ </h:commandLink> | <h:commandLink
action="objects"
actionListener="#{portalobjectmgr.destroyObject}">
<h:outputText value="Destroy"/>
<f:param name="id"
value="#{object.id}"/>
</h:commandLink>
Added: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objects.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objects.xhtml
(rev 0)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objects.xhtml 2007-03-03
22:14:42 UTC (rev 6511)
@@ -0,0 +1,22 @@
+<div
+
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:c="http://java.sun.com/jstl/core">
+
+ <c:choose>
+ <c:when test="#{portalobjectmgr.selectedObject.type == 0}">
+ <ui:include src="portals.xhtml"/>
+ </c:when>
+ <c:when test="#{portalobjectmgr.selectedObject.type == 1}">
+ <ui:include src="pages.xhtml"/>
+ </c:when>
+ <c:when test="#{portalobjectmgr.selectedObject.type == 2}">
+ <ui:include src="pages.xhtml"/>
+ </c:when>
+ <c:when test="#{portalobjectmgr.selectedObject.type == 3}">
+ <ui:include src="windows.xhtml"/>
+ </c:when>
+ </c:choose>
+
+</div>
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/pages.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/pages.xhtml 2007-03-03
21:34:34 UTC (rev 6510)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/pages.xhtml 2007-03-03
22:14:42 UTC (rev 6511)
@@ -4,8 +4,8 @@
xmlns:h="http://java.sun.com/jsf/html">
<ui:composition template="objectTemplate.xhtml">
+
<ui:define name="content">
-
<!-- Navigation -->
<ui:include src="objectNavigation.xhtml"/>
@@ -16,8 +16,8 @@
<h:commandButton action="#{addPageAction.execute}"
value="Add page" styleClass="portlet-form-button"/>
<h:message for="name"
errorClass="portlet-msg-error"/>
</h:form>
+ </ui:define>
- </ui:define>
</ui:composition>
</div>
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/portals.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/portals.xhtml 2007-03-03
21:34:34 UTC (rev 6510)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/portals.xhtml 2007-03-03
22:14:42 UTC (rev 6511)
@@ -4,19 +4,24 @@
xmlns:h="http://java.sun.com/jsf/html">
<ui:composition template="objectTemplate.xhtml">
+
<ui:define name="content">
- <!-- Navigation -->
- <ui:include src="objectNavigation.xhtml"/>
-
- <hr/>
+ <!-- -->
<h:form id="portal_form">
<h:inputText id="name"
value="#{portalAction.portalName}"
styleClass="portlet-form-input-field" required="true"/>
<h:commandButton action="#{portalAction.addPortal}"
value="Add portal" styleClass="portlet-form-button"/>
<h:message for="name"
errorClass="portlet-msg-error"/>
</h:form>
+ <!-- Separation -->
+ <hr/>
+
+ <!-- Navigation -->
+ <ui:include src="objectNavigation.xhtml"/>
+
</ui:define>
+
</ui:composition>
</div>
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/windows.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/windows.xhtml 2007-03-03
21:34:34 UTC (rev 6510)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/windows.xhtml 2007-03-03
22:14:42 UTC (rev 6511)
@@ -5,17 +5,20 @@
xmlns:h="http://java.sun.com/jsf/html">
<ui:composition template="objectTemplate.xhtml">
- <ui:define name="content">
- <h:form id="window_form">
- <ct:content
- contentType="#{portalobjectmgr.selectedContentType}"
- contentURI="#{portalobjectmgr.selectedContentURI}"
- submitFunction="document.window_form.submit()"/>
- <h:commandButton value="Update"
action="#{assignContentToWindowAction.execute}"
styleClass="portlet-form-button"/>
- </h:form>
+ <ui:define name="content">
- </ui:define>
+ <!-- -->
+ <h:form id="window_form">
+ <ct:content
+ contentType="#{portalobjectmgr.selectedContentType}"
+ contentURI="#{portalobjectmgr.selectedContentURI}"
+ submitFunction="document.window_form.submit()"/>
+ <h:commandButton value="Update"
action="#{assignContentToWindowAction.execute}"
styleClass="portlet-form-button"/>
+ </h:form>
+
+ </ui:define>
+
</ui:composition>
</div>