Author: thomas.heute(a)jboss.com
Date: 2007-03-12 08:03:34 -0400 (Mon, 12 Mar 2007)
New Revision: 6633
Added:
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/wizard/
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/wizard/NewWindowWizard.java
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/wizard/
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/wizard/newWindowTpl.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/wizard/newWindowWizardConfirm.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/wizard/selectPage.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/wizard/selectPortal.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/wizard/selectPortlet.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/wizard/selectRegion.xhtml
Modified:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objects.xhtml
Log:
Basic wizard. Use with care.
Added:
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/wizard/NewWindowWizard.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/wizard/NewWindowWizard.java
(rev 0)
+++
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/wizard/NewWindowWizard.java 2007-03-12
12:03:34 UTC (rev 6633)
@@ -0,0 +1,358 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.core.admin.ui.wizard;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.Set;
+
+import javax.faces.context.FacesContext;
+
+import org.jboss.portal.core.model.content.ContentType;
+import org.jboss.portal.core.model.instance.Instance;
+import org.jboss.portal.core.model.instance.InstanceContainer;
+import org.jboss.portal.core.model.portal.Page;
+import org.jboss.portal.core.model.portal.Portal;
+import org.jboss.portal.core.model.portal.PortalObject;
+import org.jboss.portal.core.model.portal.PortalObjectContainer;
+import org.jboss.portal.core.model.portal.PortalObjectId;
+import org.jboss.portal.core.model.portal.Window;
+import org.jboss.portal.portlet.Portlet;
+import org.jboss.portal.portlet.PortletContext;
+import org.jboss.portal.portlet.PortletInvoker;
+import org.jboss.portal.portlet.PortletInvokerException;
+import org.jboss.portal.portlet.federation.FederatingPortletInvoker;
+import org.jboss.portal.security.AuthorizationDomainRegistry;
+import org.jboss.portal.security.RoleSecurityBinding;
+import org.jboss.portal.security.SecurityConstants;
+import org.jboss.portal.security.spi.provider.DomainConfigurator;
+import org.jboss.portal.theme.LayoutService;
+import org.jboss.portal.theme.PortalLayout;
+import org.jboss.portal.theme.ThemeConstants;
+
+/**
+ * @author <a href="mailto:theute@jboss.org">Thomas Heute</a>
+ * @version $Revision$
+ */
+public class NewWindowWizard
+{
+
+ private List steps;
+ private int currentStep;
+ private FederatingPortletInvoker federatingPortletInvoker;
+ private String selectedPortletId;
+ private String selectedPortalId;
+ private String selectedPageId;
+ private String selectedRegionId;
+ private String selectedPortletInvokerId;
+ private String selectedParentPageId;
+ private PortalObjectContainer portalObjectContainer;
+ private InstanceContainer instanceContainer;
+ private LayoutService layoutService;
+ private AuthorizationDomainRegistry authorizationDomainRegistry;
+
+ public NewWindowWizard()
+ {
+ steps = new ArrayList();
+ steps.add("selectPortlet");
+ steps.add("selectPortal");
+ steps.add("selectPage");
+ steps.add("selectRegion");
+ steps.add("newWindowWizardConfirm");
+ currentStep = 0;
+ }
+
+ public String next()
+ {
+ currentStep++;
+ return (String)steps.get(currentStep);
+ }
+
+ public String previous()
+ {
+ currentStep--;
+ return (String)steps.get(currentStep);
+ }
+
+ public String selectPortlet()
+ {
+ FacesContext ctx = FacesContext.getCurrentInstance();
+ selectedPortletId =
(String)ctx.getExternalContext().getRequestParameterMap().get("id");
+ selectedPortletInvokerId =
(String)ctx.getExternalContext().getRequestParameterMap().get("portletInvokerId");
+ currentStep = 1;
+ return (String)steps.get(currentStep);
+ }
+
+ public String selectPortal()
+ {
+ FacesContext ctx = FacesContext.getCurrentInstance();
+ selectedPortalId =
(String)ctx.getExternalContext().getRequestParameterMap().get("id");
+ currentStep = 2;
+ selectedPageId = null;
+ selectedRegionId = null;
+ return (String)steps.get(currentStep);
+ }
+
+ public String selectPage()
+ {
+ FacesContext ctx = FacesContext.getCurrentInstance();
+ selectedPageId =
(String)ctx.getExternalContext().getRequestParameterMap().get("id");
+ currentStep = 3;
+ selectedRegionId = null;
+ return (String)steps.get(currentStep);
+ }
+
+ public String selectParentPage()
+ {
+ FacesContext ctx = FacesContext.getCurrentInstance();
+ selectedParentPageId =
(String)ctx.getExternalContext().getRequestParameterMap().get("id");
+ currentStep = 2;
+ return (String)steps.get(currentStep);
+ }
+
+ public String selectRegion()
+ {
+ FacesContext ctx = FacesContext.getCurrentInstance();
+ selectedRegionId =
(String)ctx.getExternalContext().getRequestParameterMap().get("name");
+ currentStep = 4;
+ return (String)steps.get(currentStep);
+ }
+
+ public Portlet getSelectedPortlet()
+ {
+ PortletInvoker portletInvoker =
federatingPortletInvoker.getFederatedInvoker(selectedPortletInvokerId);
+ try
+ {
+ Portlet selectedPortlet =
portletInvoker.getPortlet(PortletContext.createPortletContext(selectedPortletId));
+ return selectedPortlet;
+ }
+ catch (IllegalArgumentException e)
+ {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ catch (PortletInvokerException e)
+ {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+ public Page getSelectedPage()
+ {
+ return (Page)getObjectFromId(selectedPageId);
+ }
+
+ public Page getSelectedParentPage()
+ {
+ return (Page)getObjectFromId(selectedParentPageId);
+ }
+
+ public Portal getSelectedPortal()
+ {
+ return (Portal)getObjectFromId(selectedPortalId);
+ }
+
+ public PortalObject getObjectFromId(String id)
+ {
+ PortalObjectId objectId = PortalObjectId.parse(id,
PortalObjectId.LEGACY_BASE64_FORMAT);
+ return getObjectFromId(objectId);
+ }
+
+ public PortalObject getObjectFromId(PortalObjectId id)
+ {
+ return portalObjectContainer.getObject(id);
+ }
+
+ public List getPages()
+ {
+ if (selectedParentPageId != null)
+ {
+ Collection result =
getSelectedParentPage().getChildren(PortalObject.PAGE_MASK);
+ if (result.size() != 0)
+ {
+ return new ArrayList(result);
+ }
+ else
+ {
+ return new
ArrayList(getSelectedPage().getParent().getChildren(PortalObject.PAGE_MASK));
+ }
+ }
+ else
+ {
+ return new ArrayList(getSelectedPortal().getChildren(PortalObject.PAGE_MASK));
+ }
+ }
+
+ public String createWindow()
+ {
+ Portlet portlet = getSelectedPortlet();
+ InstanceContainer container = instanceContainer;
+ String instanceId = "wizardInstance_" +
container.getDefinitions().size();
+ String windowId = "wizardWindow_" + container.getDefinitions().size();
+ try
+ {
+ if ((container.getDefinition(instanceId) == null) &&
(getSelectedPage().getWindow(windowId) == null))
+ {
+ Instance instance = container.createDefinition(instanceId,
portlet.getContext().getId());
+
+ //
+ DomainConfigurator configurator =
authorizationDomainRegistry.getDomain("instance").getConfigurator();
+ Set constraints = Collections.singleton(new
RoleSecurityBinding("view", SecurityConstants.UNCHECKED_ROLE_NAME));
+ configurator.setSecurityBindings(instance.getId(), constraints);
+
+ Window window = getSelectedPage().createWindow(windowId, ContentType.PORTLET,
instanceId);
+ window.setDeclaredProperty(ThemeConstants.PORTAL_PROP_REGION,
getSelectedRegionId());
+ window.setDeclaredProperty(ThemeConstants.PORTAL_PROP_ORDER, "" +
Integer.MAX_VALUE);
+
+ return reset();
+ }
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+ public String cancel()
+ {
+ return reset();
+ }
+
+ public String reset()
+ {
+ selectedPortletId = null;
+ selectedPortalId = null;
+ selectedPageId = null;
+ selectedRegionId = null;
+ selectedPortletInvokerId = null;
+ selectedParentPageId = null;
+ currentStep = 0;
+ return "index";
+ }
+
+ public List getRegions()
+ {
+ Page page = getSelectedPage();
+ String layoutId = page.getProperty(ThemeConstants.PORTAL_PROP_LAYOUT);
+ PortalLayout layout = layoutService.getLayout(layoutId, false);
+ return layout.getLayoutInfo().getRegionNames();
+ }
+
+ public String getSelectedPortletId()
+ {
+ return selectedPortletId;
+ }
+
+ public int getCurrentStep()
+ {
+ return currentStep;
+ }
+
+ public String getSelectedPortalId()
+ {
+ return selectedPortalId;
+ }
+
+ public String getSelectedPageId()
+ {
+ return selectedPageId;
+ }
+
+ public String getSelectedRegionId()
+ {
+ return selectedRegionId;
+ }
+
+ public FederatingPortletInvoker getFederatingPortletInvoker()
+ {
+ return federatingPortletInvoker;
+ }
+
+ public void setFederatingPortletInvoker(FederatingPortletInvoker
federatingPortletInvoker)
+ {
+ this.federatingPortletInvoker = federatingPortletInvoker;
+ }
+
+ public PortalObjectContainer getPortalObjectContainer()
+ {
+ return portalObjectContainer;
+ }
+
+ public void setPortalObjectContainer(PortalObjectContainer portalObjectContainer)
+ {
+ this.portalObjectContainer = portalObjectContainer;
+ }
+
+ public LayoutService getLayoutService()
+ {
+ return layoutService;
+ }
+
+ public void setLayoutService(LayoutService layoutService)
+ {
+ this.layoutService = layoutService;
+ }
+
+ public InstanceContainer getInstanceContainer()
+ {
+ return instanceContainer;
+ }
+
+ public void setInstanceContainer(InstanceContainer instanceContainer)
+ {
+ this.instanceContainer = instanceContainer;
+ }
+
+ public AuthorizationDomainRegistry getAuthorizationDomainRegistry()
+ {
+ return authorizationDomainRegistry;
+ }
+
+ public void setAuthorizationDomainRegistry(AuthorizationDomainRegistry
authorizationDomainRegistry)
+ {
+ this.authorizationDomainRegistry = authorizationDomainRegistry;
+ }
+
+ public boolean getNextEnabled()
+ {
+ if (currentStep == 1)
+ {
+ return (selectedPortalId != null);
+ }
+ if (currentStep == 2)
+ {
+ return (selectedPageId != null);
+ }
+ if (currentStep == 3)
+ {
+ return (selectedRegionId != null);
+ }
+ return true;
+ }
+
+}
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-12
08:38:21 UTC (rev 6632)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml 2007-03-12
12:03:34 UTC (rev 6633)
@@ -167,7 +167,34 @@
<value>local</value>
</managed-property>
</managed-bean>
+
<managed-bean>
+ <managed-bean-name>newWindowWizard</managed-bean-name>
+
<managed-bean-class>org.jboss.portal.core.admin.ui.wizard.NewWindowWizard</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ <managed-property>
+ <property-name>instanceContainer</property-name>
+ <value>#{applicationScope.InstanceContainer}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>federatingPortletInvoker</property-name>
+ <value>#{applicationScope.FederatingPortletInvoker}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>portalObjectContainer</property-name>
+ <value>#{applicationScope.PortalObjectContainer}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>layoutService</property-name>
+ <value>#{applicationScope.LayoutService}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>authorizationDomainRegistry</property-name>
+ <value>#{applicationScope.AuthorizationDomainRegistry}</value>
+ </managed-property>
+ </managed-bean>
+
+ <managed-bean>
<managed-bean-name>createInstanceAction</managed-bean-name>
<managed-bean-class>org.jboss.portal.core.admin.ui.actions.CreateInstanceAction</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
@@ -192,6 +219,18 @@
<navigation-rule>
<navigation-case>
+ <from-outcome>index</from-outcome>
+ <to-view-id>/WEB-INF/jsf/objects.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>advancedMode</from-outcome>
+ <to-view-id>/WEB-INF/jsf/objects.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>wizardMode</from-outcome>
+ <to-view-id>/WEB-INF/jsf/wizard/selectPortlet.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
<from-outcome>objects</from-outcome>
<to-view-id>/WEB-INF/jsf/objects.xhtml</to-view-id>
</navigation-case>
@@ -231,6 +270,26 @@
<from-outcome>portlets</from-outcome>
<to-view-id>/WEB-INF/jsf/portlets.xhtml</to-view-id>
</navigation-case>
+ <navigation-case>
+ <from-outcome>selectPortlet</from-outcome>
+ <to-view-id>/WEB-INF/jsf/wizard/selectPortlet.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>selectPortal</from-outcome>
+ <to-view-id>/WEB-INF/jsf/wizard/selectPortal.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>selectPage</from-outcome>
+ <to-view-id>/WEB-INF/jsf/wizard/selectPage.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>selectRegion</from-outcome>
+ <to-view-id>/WEB-INF/jsf/wizard/selectRegion.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>newWindowWizardConfirm</from-outcome>
+
<to-view-id>/WEB-INF/jsf/wizard/newWindowWizardConfirm.xhtml</to-view-id>
+ </navigation-case>
</navigation-rule>
<lifecycle>
Modified: 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 2007-03-12
08:38:21 UTC (rev 6632)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objects.xhtml 2007-03-12
12:03:34 UTC (rev 6633)
@@ -3,7 +3,7 @@
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="editContext.xhtml"/>
@@ -19,5 +19,7 @@
</c:when>
<c:otherwise>FIXME</c:otherwise>
</c:choose>
+
+ <p style="text-align: right"><h:commandLink
action="wizardMode">Go to wizard mode</h:commandLink></p>
</div>
Added:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/wizard/newWindowTpl.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/wizard/newWindowTpl.xhtml
(rev 0)
+++
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/wizard/newWindowTpl.xhtml 2007-03-12
12:03:34 UTC (rev 6633)
@@ -0,0 +1,102 @@
+<div
+
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:c="http://java.sun.com/jstl/core"
+ class="admin-ui">
+
+ <div class="portlet-section-header">Adding a new Portlet</div>
+ <p style="text-align: right;"><h:commandLink
action="advancedMode">Go to advanced mode</h:commandLink></p>
+
+ <c:choose>
+ <c:when test="#{newWindowWizard.currentStep == 0}">
+ <div class="wizardStepBox" id="selected">
+ <p class="stepNumber">Step 1</p>
+ <p class="stepText">Select Portlet</p>
+ </div>
+ </c:when>
+ <c:otherwise>
+ <div class="wizardStepBox">
+ <p class="stepNumber">Step 1</p>
+ <p class="stepText">Select Portlet</p>
+ </div>
+ </c:otherwise>
+ </c:choose>
+
+ <c:choose>
+ <c:when test="#{newWindowWizard.currentStep == 1}">
+ <div class="wizardStepBox" id="selected">
+ <p class="stepNumber">Step 2</p>
+ <p class="stepText">Select Portal</p>
+ </div>
+ </c:when>
+ <c:otherwise>
+ <div class="wizardStepBox">
+ <p class="stepNumber">Step 2</p>
+ <p class="stepText">Select Portal</p>
+ </div>
+ </c:otherwise>
+ </c:choose>
+
+ <c:choose>
+ <c:when test="#{newWindowWizard.currentStep == 2}">
+ <div class="wizardStepBox" id="selected">
+ <p class="stepNumber">Step 3</p>
+ <p class="stepText">Select Page</p>
+ </div>
+ </c:when>
+ <c:otherwise>
+ <div class="wizardStepBox">
+ <p class="stepNumber">Step 3</p>
+ <p class="stepText">Select Page</p>
+ </div>
+ </c:otherwise>
+ </c:choose>
+
+ <c:choose>
+ <c:when test="#{newWindowWizard.currentStep == 3}">
+ <div class="wizardStepBox" id="selected">
+ <p class="stepNumber">Step 4</p>
+ <p class="stepText">Select Region</p>
+ </div>
+ </c:when>
+ <c:otherwise>
+ <div class="wizardStepBox">
+ <p class="stepNumber">Step 4</p>
+ <p class="stepText">Select Region</p>
+ </div>
+ </c:otherwise>
+ </c:choose>
+
+ <c:choose>
+ <c:when test="#{newWindowWizard.currentStep == 4}">
+ <div class="wizardStepBox" id="selected">
+ <p class="stepNumber">Step 5</p>
+ <p class="stepText">Confirm</p>
+ </div>
+ </c:when>
+ <c:otherwise>
+ <div class="wizardStepBox">
+ <p class="stepNumber">Step 5</p>
+ <p class="stepText">Confirm</p>
+ </div>
+ </c:otherwise>
+ </c:choose>
+
+ <!-- Status message -->
+ <h:message id="status" for="status"/>
+
+
+ <!-- Content -->
+ <div class="wizardContent">
+ <ui:insert name="content">Content</ui:insert>
+ </div>
+
+ <div class="wizardButtonBox">
+ <h:form>
+ <h:commandButton rendered="#{newWindowWizard.currentStep gt 0}"
value="Previous" action="#{newWindowWizard.previous}"
styleClass="portlet-form-button"/>
+ <h:commandButton disabled="#{!newWindowWizard.nextEnabled}"
rendered="#{newWindowWizard.currentStep lt 4}" value="Next"
action="#{newWindowWizard.next}"
styleClass="portlet-form-button"/>
+ </h:form>
+ </div>
+
+</div>
Added:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/wizard/newWindowWizardConfirm.xhtml
===================================================================
---
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/wizard/newWindowWizardConfirm.xhtml
(rev 0)
+++
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/wizard/newWindowWizardConfirm.xhtml 2007-03-12
12:03:34 UTC (rev 6633)
@@ -0,0 +1,26 @@
+<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:f="http://java.sun.com/jsf/core"
+
xmlns:c="http://java.sun.com/jstl/core">
+
+ <ui:composition template="newWindowTpl.xhtml">
+ <ui:define name="content">
+
+ <table>
+
<tr><td>Portlet</td><td>#{newWindowWizard.selectedPortlet.name.defaultString}</td></tr>
+
<tr><td>Portal</td><td>#{newWindowWizard.selectedPortal.name}</td></tr>
+
<tr><td>Page</td><td>#{newWindowWizard.selectedPage.name}</td></tr>
+
<tr><td>Region</td><td>#{newWindowWizard.selectedRegionId}</td></tr>
+ </table>
+
+ <h:form>
+ <h:commandButton value="Confirm"
action="#{newWindowWizard.createWindow}"
styleClass="portlet-form-button"/>
+ <h:commandButton value="Cancel"
action="#{newWindowWizard.cancel}"
styleClass="portlet-form-button"/>
+ </h:form>
+
+ </ui:define>
+ </ui:composition>
+
+</div>
\ No newline at end of file
Added:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/wizard/selectPage.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/wizard/selectPage.xhtml
(rev 0)
+++
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/wizard/selectPage.xhtml 2007-03-12
12:03:34 UTC (rev 6633)
@@ -0,0 +1,41 @@
+<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:f="http://java.sun.com/jsf/core"
+
xmlns:c="http://java.sun.com/jstl/core">
+
+ <ui:composition template="newWindowTpl.xhtml">
+ <ui:define name="content">
+
+<table>
+ <tbody class="portlet-section-header">
+ <tr>
+ <th>Page</th>
+ <th></th>
+ </tr>
+ </tbody>
+ <tbody>
+ <c:forEach items="#{newWindowWizard.pages}"
var="object" varStatus="status">
+ <tr class="#{object.id == newWindowWizard.selectedPageId ?
'portlet-section-selected' : status.index % 2 == 0 ?
'portlet-section-body' : 'portlet-section-alternate'}">
+ <td>
+ <h:commandLink id="cl_#{status.index}"
action="#{newWindowWizard.selectPage}">
+ <h:outputText id="ot_#{status.index}"
value="#{object.name}"/>
+ <f:param id="f_#{status.index}" name="id"
value="#{object.id}"/>
+ </h:commandLink>
+ </td>
+ <td>
+ <c:if test="#{not empty object.pages}">
+ <h:commandLink id="cl2_#{status.index}"
action="#{newWindowWizard.selectParentPage}">
+ <h:outputText id="ot2_#{status.index}"
value="Sub-Pages"/>
+ <f:param id="f2_#{status.index}" name="id"
value="#{object.id}"/>
+ </h:commandLink>
+ </c:if>
+ </td>
+ </tr>
+ </c:forEach>
+ </tbody>
+</table>
+</ui:define>
+ </ui:composition>
+</div>
\ No newline at end of file
Added:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/wizard/selectPortal.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/wizard/selectPortal.xhtml
(rev 0)
+++
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/wizard/selectPortal.xhtml 2007-03-12
12:03:34 UTC (rev 6633)
@@ -0,0 +1,33 @@
+<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:f="http://java.sun.com/jsf/core"
+
xmlns:c="http://java.sun.com/jstl/core">
+
+ <ui:composition template="newWindowTpl.xhtml">
+ <ui:define name="content">
+ <table width="100%">
+
+ <tbody class="portlet-section-header">
+ <tr>
+ <th>Portal</th>
+ </tr>
+ </tbody>
+ <tbody>
+ <c:forEach items="#{portalobjectmgr.selectedObject.portals}"
var="object" varStatus="status">
+ <tr class="#{object.id == newWindowWizard.selectedPortalId ?
'portlet-section-selected' : status.index % 2 == 0 ?
'portlet-section-body' : 'portlet-section-alternate'}">
+ <td>
+ <h:commandLink
action="#{newWindowWizard.selectPortal}">
+ <h:outputText value="#{object.name}"/>
+ <f:param name="id"
value="#{object.id}"/>
+ </h:commandLink>
+ </td>
+ </tr>
+ </c:forEach>
+ </tbody>
+
+</table>
+</ui:define>
+ </ui:composition>
+</div>
\ No newline at end of file
Added:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/wizard/selectPortlet.xhtml
===================================================================
---
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/wizard/selectPortlet.xhtml
(rev 0)
+++
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/wizard/selectPortlet.xhtml 2007-03-12
12:03:34 UTC (rev 6633)
@@ -0,0 +1,49 @@
+<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:f="http://java.sun.com/jsf/core"
+
xmlns:c="http://java.sun.com/jstl/core">
+ <ui:composition template="newWindowTpl.xhtml">
+ <ui:define name="content">
+ <h:form>
+ <h:outputLabel for="menu">
+ <h:outputText value="Portlet provider: "
styleClass="portlet-form-field-label"/>
+ </h:outputLabel>
+ <h:selectOneMenu id="menu" styleClass="portlet-form-field"
value="#{portletmgr.selectedPortletInvokerId}">
+ <f:selectItems value="#{portletmgr.portletInvokerItems}"/>
+ </h:selectOneMenu>
+ <h:commandButton value="Change"
styleClass="portlet-form-button"/>
+ </h:form>
+
+ <h:form>
+ <table width="100%">
+ <thead class="portlet-section-header">
+ <tr>
+ <th>Name</th>
+ </tr>
+ </thead>
+ <tbody>
+ <c:forEach items="#{portletmgr.selectedPortlets}"
var="portlet" varStatus="status">
+ <tr class="#{portlet.context.id ==
newWindowWizard.selectedPortletId ? 'portlet-section-selected' : (status.index % 2
== 0 ? 'portlet-section-body' : 'portlet-section-alternate')}">
+ <td><h:commandLink
action="#{newWindowWizard.selectPortlet}">
+ <h:outputText>#{portlet.name.value}</h:outputText>
+ <f:param name="id"
value="#{portlet.context.id}"/>
+ <f:param name="portletInvokerId"
value="#{portletmgr.selectedPortletInvokerId}"/>
+ </h:commandLink></td>
+ </tr>
+ </c:forEach>
+ </tbody>
+ </table>
+ <ul class="pagination">
+ <c:forEach begin="0" end="#{portletmgr.portletCount}"
step="#{portletmgr.paginationSize}" var="index">
+ <li class="#{index == portletmgr.selectedFrom ? 'selected'
: ''}">
+ <h:commandLink
action="#{portletmgr.selectFrom}"><f:param name="from"
value="#{index}"/><h:outputText
value="#{index}"/></h:commandLink>
+ </li>
+ </c:forEach>
+ </ul>
+ </h:form>
+
+ </ui:define>
+ </ui:composition>
+</div>
\ No newline at end of file
Added:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/wizard/selectRegion.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/wizard/selectRegion.xhtml
(rev 0)
+++
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/wizard/selectRegion.xhtml 2007-03-12
12:03:34 UTC (rev 6633)
@@ -0,0 +1,35 @@
+<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:f="http://java.sun.com/jsf/core"
+
xmlns:c="http://java.sun.com/jstl/core">
+
+ <ui:composition template="newWindowTpl.xhtml">
+ <ui:define name="content">
+
+ <table width="100%">
+
+ <tbody class="portlet-section-header">
+ <tr>
+ <th>Portal</th>
+ </tr>
+ </tbody>
+ <tbody>
+ <c:forEach items="#{newWindowWizard.regions}"
var="object" varStatus="status">
+ <tr class="#{object == newWindowWizard.selectedRegionId ?
'portlet-section-selected' : status.index % 2 == 0 ?
'portlet-section-body' : 'portlet-section-alternate'}">
+ <td>
+ <h:commandLink
action="#{newWindowWizard.selectRegion}">
+ <h:outputText value="#{object}"/>
+ <f:param name="name"
value="#{object}"/>
+ </h:commandLink>
+ </td>
+ </tr>
+ </c:forEach>
+ </tbody>
+
+</table>
+
+</ui:define>
+ </ui:composition>
+</div>
\ No newline at end of file