JBoss Portal SVN: r10517 - branches/JBoss_Portal_Branch_2_6/core-identity/src/main/org/jboss/portal/core/identity/services/impl.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-04-08 07:42:53 -0400 (Tue, 08 Apr 2008)
New Revision: 10517
Modified:
branches/JBoss_Portal_Branch_2_6/core-identity/src/main/org/jboss/portal/core/identity/services/impl/IdentityMailServiceImpl.java
Log:
JBPORTAL-1975: Cannot load email templates in core-identity
Modified: branches/JBoss_Portal_Branch_2_6/core-identity/src/main/org/jboss/portal/core/identity/services/impl/IdentityMailServiceImpl.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-identity/src/main/org/jboss/portal/core/identity/services/impl/IdentityMailServiceImpl.java 2008-04-08 10:48:23 UTC (rev 10516)
+++ branches/JBoss_Portal_Branch_2_6/core-identity/src/main/org/jboss/portal/core/identity/services/impl/IdentityMailServiceImpl.java 2008-04-08 11:42:53 UTC (rev 10517)
@@ -66,7 +66,7 @@
private static final String TEMPLATE_PATH = "conf/templates/";
/** The template prefix. */
- private static final String TEMPLATE_PREFIX = "/emailTemplate_";
+ private static final String TEMPLATE_PREFIX = "/emailTemplate";
/** The core-identity configuration service. */
private IdentityUIConfigurationService identityUIConfigurationService;
@@ -215,10 +215,10 @@
private String generateEmailText(String templateLocation, Map<String, String> mailData, Locale locale) throws IOException, TemplateException
{
ClassLoader tcl = Thread.currentThread().getContextClassLoader();
- URL config = tcl.getResource(TEMPLATE_PATH + templateLocation + TEMPLATE_PREFIX + locale.getLanguage() + "_" + locale.getCountry() + ".tpl");
+ URL config = tcl.getResource(TEMPLATE_PATH + templateLocation + TEMPLATE_PREFIX + "_" + locale.getLanguage() + "_" + locale.getCountry() + ".tpl");
if (config == null)
{
- config = tcl.getResource(TEMPLATE_PATH + templateLocation + TEMPLATE_PREFIX + locale.getLanguage() + ".tpl");
+ config = tcl.getResource(TEMPLATE_PATH + templateLocation + TEMPLATE_PREFIX + "_" + locale.getLanguage() + ".tpl");
}
if (config == null)
{
@@ -226,7 +226,7 @@
}
if (config == null)
{
- throw new FileNotFoundException("Cannot load a suitable email templte in: " + TEMPLATE_PATH);
+ throw new FileNotFoundException("Cannot load a suitable email template in: " + TEMPLATE_PATH);
}
InputStream in = config.openStream();
18 years
JBoss Portal SVN: r10516 - in modules/presentation/trunk: build and 6 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-04-08 06:48:23 -0400 (Tue, 08 Apr 2008)
New Revision: 10516
Removed:
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/Constants.java
Modified:
modules/presentation/trunk/build/pom.xml
modules/presentation/trunk/classic/pom.xml
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionDecoder.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionEncoder.java
modules/presentation/trunk/pom.xml
modules/presentation/trunk/presentation/pom.xml
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client2/PresentationClient.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/LinkActivation.java
Log:
updates to PF
Modified: modules/presentation/trunk/build/pom.xml
===================================================================
--- modules/presentation/trunk/build/pom.xml 2008-04-08 05:26:51 UTC (rev 10515)
+++ modules/presentation/trunk/build/pom.xml 2008-04-08 10:48:23 UTC (rev 10516)
@@ -20,9 +20,8 @@
<artifactId>module-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
- <name>JBoss Portal Presentation Module</name>
+ <name>JBoss Portal Presentation Framework - Parent Module</name>
<url>http://www.jboss.com/products/jbossmc</url>
- <description>JBoss Portal Presentation Module</description>
<properties>
<version.sun.servlet>2.4</version.sun.servlet>
Modified: modules/presentation/trunk/classic/pom.xml
===================================================================
--- modules/presentation/trunk/classic/pom.xml 2008-04-08 05:26:51 UTC (rev 10515)
+++ modules/presentation/trunk/classic/pom.xml 2008-04-08 10:48:23 UTC (rev 10516)
@@ -10,8 +10,8 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>presentation-classic</artifactId>
<packaging>jar</packaging>
- <name>JBoss Portal Presentation Framework</name>
-
+ <name>JBoss Portal Presentation Framework - Classic Module</name>
+
<dependencies>
<dependency>
Modified: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java 2008-04-08 05:26:51 UTC (rev 10515)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java 2008-04-08 10:48:23 UTC (rev 10516)
@@ -50,9 +50,14 @@
import org.jboss.portal.presentation.protocol.ShowUIObjectResponse;
import org.jboss.portal.web.WebRequest;
import org.jboss.portal.web.WebResponse;
+import org.jboss.portal.web.ServletContextDispatcher;
+import org.jboss.portal.web.ServletContainer;
+import org.jboss.portal.web.impl.DefaultServletContainerFactory;
+import org.jboss.portal.portlet.URLFormat;
import java.io.PrintWriter;
import java.io.IOException;
+import java.io.Writer;
import java.util.Collection;
/**
@@ -92,6 +97,40 @@
return null;
}
+ public String renderURL(ProtocolAction action, URLFormat format) throws IllegalArgumentException
+ {
+ if (action == null)
+ {
+ throw new IllegalArgumentException("No null action can be rendered");
+ }
+
+ //
+ String link = encoder.encode(action);
+
+ //
+ if (link == null)
+ {
+ throw new IllegalArgumentException("The action " + action + " cannot be rendered");
+ }
+
+ //
+ return link;
+ }
+
+ public void renderURL(Writer writer, ProtocolAction action, URLFormat format) throws IOException
+ {
+ writer.write(renderURL(action, format));
+ }
+
+ public ServletContextDispatcher getDispatcher()
+ {
+ ServletContainer container = DefaultServletContainerFactory.getInstance().getServletContainer();
+ return new ServletContextDispatcher(
+ req,
+ resp,
+ container);
+ }
+
public void process() throws IOException, PresentationServerException
{
ProtocolAction action = decoder.decode(req);
Modified: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionDecoder.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionDecoder.java 2008-04-08 05:26:51 UTC (rev 10515)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionDecoder.java 2008-04-08 10:48:23 UTC (rev 10516)
@@ -24,10 +24,10 @@
import org.jboss.portal.presentation.protocol.ProtocolAction;
import org.jboss.portal.presentation.protocol.ViewUIObjectAction;
+import org.jboss.portal.presentation.protocol.GetActivation;
+import org.jboss.portal.presentation.protocol.PostActivation;
import org.jboss.portal.web.WebRequest;
-import java.util.Map;
-
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
* @version $Revision: 630 $
@@ -50,6 +50,34 @@
String targetId = pathInfo.substring("/view/".length());
action = new ViewUIObjectAction(targetId);
}
+ else if (pathInfo.startsWith("/invoke/"))
+ {
+ int from = "/invoke/".length();
+
+ //
+ String path = null;
+ int to = pathInfo.indexOf('/', from + 1);
+ if (to == -1)
+ {
+ to = pathInfo.length();
+ }
+ else
+ {
+ path = pathInfo.substring(to + 1);
+ }
+
+ //
+ String targetId = pathInfo.substring(from, to);
+
+ //
+ switch (request.getVerb())
+ {
+ case GET:
+ return new GetActivation(targetId, path, request.getQueryParameterMap());
+ case POST:
+ return new PostActivation(targetId, path, request.getQueryParameterMap(), request.getBody());
+ }
+ }
}
//
Modified: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionEncoder.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionEncoder.java 2008-04-08 05:26:51 UTC (rev 10515)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionEncoder.java 2008-04-08 10:48:23 UTC (rev 10516)
@@ -24,7 +24,12 @@
import org.jboss.portal.presentation.protocol.ProtocolAction;
import org.jboss.portal.presentation.protocol.ViewUIObjectAction;
+import org.jboss.portal.presentation.protocol.LinkActivation;
+import org.jboss.portal.presentation.protocol.UIObjectAction;
+import org.jboss.portal.common.text.FastURLEncoder;
+import java.util.Map;
+
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
* @version $Revision: 630 $
@@ -34,13 +39,61 @@
public String encode(ProtocolAction action)
{
- if (action instanceof ViewUIObjectAction)
+ if (action instanceof UIObjectAction)
{
- ViewUIObjectAction viewObjectAction = (ViewUIObjectAction)action;
+ UIObjectAction objectAction = (UIObjectAction)action;
- return "/view/" + viewObjectAction.getTargetId();
+ //
+ String targetId = FastURLEncoder.getUTF8Instance().encode(objectAction.getTargetId());
+
+ //
+ if (action instanceof ViewUIObjectAction)
+ {
+ return "/view/" + targetId;
+ }
+ else if (action instanceof LinkActivation)
+ {
+ LinkActivation linkActivationAction = (LinkActivation)action;
+
+ //
+ StringBuilder builder = new StringBuilder("/invoke/" + targetId);
+
+ //
+ if (linkActivationAction.getPath() != null)
+ {
+ builder.append(linkActivationAction.getPath());
+ }
+
+ //
+ boolean empty = true;
+ if (linkActivationAction.getQueryParameters() != null)
+ {
+ for (Map.Entry<String, String[]> queryParameterEntry : linkActivationAction.getQueryParameters().entrySet())
+ {
+ String queryParameterName = queryParameterEntry.getKey();
+
+ //
+ for (String queryParameterValue : queryParameterEntry.getValue())
+ {
+ if (!empty)
+ {
+ builder.append('&');
+ }
+
+ //
+ builder.append(FastURLEncoder.getUTF8Instance().encode(queryParameterName));
+ builder.append('=');
+ builder.append(FastURLEncoder.getUTF8Instance().encode(queryParameterValue));
+ }
+ }
+ }
+
+ //
+ return builder.toString();
+ }
}
+ //
return null;
}
Deleted: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/Constants.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/Constants.java 2008-04-08 05:26:51 UTC (rev 10515)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/Constants.java 2008-04-08 10:48:23 UTC (rev 10516)
@@ -1,45 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2008, 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.presentation.classic.protocol;
-
-/**
- * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-final class Constants
-{
-
- /** . */
- public static final String ACTION_PARAM = "action";
-
- /** . */
- public static final String TARGET_ID_PARAM = "id";
-
- /** . */
- public static final String VIEW_UI_OBJECT_ACTION = "view";
-
- private Constants()
- {
- }
-
-}
Modified: modules/presentation/trunk/pom.xml
===================================================================
--- modules/presentation/trunk/pom.xml 2008-04-08 05:26:51 UTC (rev 10515)
+++ modules/presentation/trunk/pom.xml 2008-04-08 10:48:23 UTC (rev 10516)
@@ -4,7 +4,7 @@
<groupId>org.jboss.portal.presentation</groupId>
<artifactId>module-aggregator</artifactId>
<packaging>pom</packaging>
- <name>JBoss Portal Presentation Module</name>
+ <name>JBoss Portal Presentation Framework - Aggregator Module</name>
<version>1.0.0-SNAPSHOT</version>
<url>http://labs.jboss.com/jbossportal</url>
Modified: modules/presentation/trunk/presentation/pom.xml
===================================================================
--- modules/presentation/trunk/presentation/pom.xml 2008-04-08 05:26:51 UTC (rev 10515)
+++ modules/presentation/trunk/presentation/pom.xml 2008-04-08 10:48:23 UTC (rev 10516)
@@ -10,8 +10,8 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>presentation-presentation</artifactId>
<packaging>jar</packaging>
- <name>JBoss Portal Presentation Framework</name>
-
+ <name>JBoss Portal Presentation Framework - Presentation Module</name>
+
<dependencies>
<dependency>
<groupId>sun-servlet</groupId>
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client2/PresentationClient.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client2/PresentationClient.java 2008-04-08 05:26:51 UTC (rev 10515)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client2/PresentationClient.java 2008-04-08 10:48:23 UTC (rev 10516)
@@ -23,7 +23,13 @@
package org.jboss.portal.presentation.client2;
import org.jboss.portal.presentation.state.navigational.NavigationalStateContext;
+import org.jboss.portal.presentation.protocol.ProtocolAction;
+import org.jboss.portal.portlet.URLFormat;
+import org.jboss.portal.web.ServletContextDispatcher;
+import java.io.IOException;
+import java.io.Writer;
+
/**
* The contract that defines the services that the client provides to the server during a presentation server invocation.
*
@@ -33,6 +39,38 @@
public interface PresentationClient
{
+ /**
+ * Renders the provided action as an hyperlink.
+ *
+ * @param action the action to render
+ * @param format the url format
+ * @return the rendered url
+ * @throws IllegalArgumentException if the action is null or cannot be rendered
+ */
+ String renderURL(ProtocolAction action, URLFormat format) throws IllegalArgumentException;
+
+ /**
+ * Renders the provided action as an hyperlink.
+ *
+ * @param writer the writer
+ * @param action the action to render
+ * @param format the url format
+ * @throws IllegalArgumentException if the action is null or cannot be rendered
+ * @throws IOException any IOException thrown by the writer
+ */
+ void renderURL(Writer writer, ProtocolAction action, URLFormat format) throws IOException;
+
+ /**
+ * Returns the navigational state context provided by the client.
+ *
+ * @return the navigational state context
+ */
NavigationalStateContext getNavigationalStateContext();
+ /**
+ * Returns the servlet context dispatcher.
+ *
+ * @return the servlet context dispatcher
+ */
+ ServletContextDispatcher getDispatcher();
}
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/LinkActivation.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/LinkActivation.java 2008-04-08 05:26:51 UTC (rev 10515)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/LinkActivation.java 2008-04-08 10:48:23 UTC (rev 10516)
@@ -42,6 +42,19 @@
super(targetId);
//
+ if (path != null)
+ {
+ if (path.length() == 0)
+ {
+ throw new IllegalArgumentException("Empty path are not accepted");
+ }
+ if (path.charAt(0) != '/')
+ {
+ throw new IllegalArgumentException("Path values must start with '/':" + path);
+ }
+ }
+
+ //
this.path = path;
this.queryParameters = queryParameters;
}
18 years
JBoss Portal SVN: r10515 - in modules/test/trunk/remote: src/main/java/org/jboss/unit/remote and 8 other directories.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2008-04-08 01:26:51 -0400 (Tue, 08 Apr 2008)
New Revision: 10515
Added:
modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/SeleniumConfiguration.java
modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/web/
modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/web/deployment/
modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/web/deployment/ActualBootstrap.java
modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/web/deployment/WebBootstrap.java
Removed:
modules/test/trunk/remote/src/test/java/org/jboss/unit/test/remote/ActualBootstrap.java
modules/test/trunk/remote/src/test/java/org/jboss/unit/test/remote/WebBootstrap.java
Modified:
modules/test/trunk/remote/pom.xml
modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/ClickLinkCommand.java
modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/GetPageCommand.java
modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/WebPageConversation.java
modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/WebPageDriverCommand.java
modules/test/trunk/remote/src/test/build.xml
modules/test/trunk/remote/src/test/java/org/jboss/unit/test/remote/webpage/ClickLinkCommandTestCase.java
modules/test/trunk/remote/src/test/java/org/jboss/unit/test/remote/webpage/GetPageCommandTestCase.java
modules/test/trunk/remote/src/test/resources/remote-jboss-unit.xml
modules/test/trunk/remote/src/test/resources/server-beans.xml
modules/test/trunk/remote/src/test/resources/war/WEB-INF/web.xml
Log:
* browser paramaterization of selenium integration
* test suite disabled in remote/pom.xml since hudson's browser environment is not yet setup
Modified: modules/test/trunk/remote/pom.xml
===================================================================
--- modules/test/trunk/remote/pom.xml 2008-04-07 12:55:25 UTC (rev 10514)
+++ modules/test/trunk/remote/pom.xml 2008-04-08 05:26:51 UTC (rev 10515)
@@ -100,7 +100,7 @@
</dependency>
</dependencies>
- <!-- DeActivating Selenium integration test until the Selenium Tests are parametrized with proper pointers to firefox -->
+ <!-- DeActivating Selenium integration test until proper browser environment is setup on hudson. otherwise the test suite fails -->
<!--
<build>
<plugins>
@@ -126,6 +126,9 @@
<goals>
<goal>stop-server</goal>
</goals>
+ <configuration>
+ <port>12345</port>
+ </configuration>
</execution>
</executions>
</plugin>
@@ -174,8 +177,8 @@
<property name="dependency.jboss-dependency.jar" value="${maven.dependency.org.jboss.microcontainer.jboss-dependency.jar.path}"/>
<property name="dependency.jboss-common-core.jar" value="${maven.dependency.org.jboss.jboss-common-core.jar.path}"/>
<property name="dependency.jboss-remoting.jar" value="${maven.dependency.jboss.jboss-remoting.jar.path}"/>
+
-
<ant antfile="${basedir}/src/test/build.xml">
<target name="run.test.remote"/>
</ant>
@@ -190,7 +193,8 @@
</plugins>
</build>
-->
-
+
+
<properties>
</properties>
</project>
Modified: modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/ClickLinkCommand.java
===================================================================
--- modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/ClickLinkCommand.java 2008-04-07 12:55:25 UTC (rev 10514)
+++ modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/ClickLinkCommand.java 2008-04-08 05:26:51 UTC (rev 10515)
@@ -58,12 +58,12 @@
/**
*
*/
- public void execute(RemoteDriverCommandContext webPageCommandContext)
+ public void execute(SeleniumConfiguration config, RemoteDriverCommandContext webPageCommandContext)
{
Selenium browser = null;
try
{
- browser = new DefaultSelenium("localhost",12345, "*firefox /home/soshah/firefox/firefox-bin", uri.toString());
+ browser = new DefaultSelenium(config.getHost(),config.getPort(), "*"+config.getBrowser(), uri.toString());
browser.start();
browser.open(uri.toString());
Modified: modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/GetPageCommand.java
===================================================================
--- modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/GetPageCommand.java 2008-04-07 12:55:25 UTC (rev 10514)
+++ modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/GetPageCommand.java 2008-04-08 05:26:51 UTC (rev 10515)
@@ -50,12 +50,12 @@
* @param webPageCommandContext
* @return
*/
- public void execute(RemoteDriverCommandContext webPageCommandContext)
+ public void execute(SeleniumConfiguration config, RemoteDriverCommandContext webPageCommandContext)
{
Selenium browser = null;
try
{
- browser = new DefaultSelenium("localhost",12345, "*firefox /home/soshah/firefox/firefox-bin", uri.toString());
+ browser = new DefaultSelenium(config.getHost(),config.getPort(), "*"+config.getBrowser(), uri.toString());
browser.start();
browser.open(uri.toString());
Added: modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/SeleniumConfiguration.java
===================================================================
--- modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/SeleniumConfiguration.java (rev 0)
+++ modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/SeleniumConfiguration.java 2008-04-08 05:26:51 UTC (rev 10515)
@@ -0,0 +1,74 @@
+/******************************************************************************
+ * 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.unit.remote.driver.webpage;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class SeleniumConfiguration
+{
+ private String host = null;
+ private int port = 0;
+ private String browser = null;
+
+ /**
+ *
+ * @param host
+ * @param port
+ * @param browser
+ */
+ public SeleniumConfiguration(String host, int port, String browser)
+ {
+ this.host = host;
+ this.port = port;
+ this.browser = browser;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public String getBrowser()
+ {
+ return browser;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public String getHost()
+ {
+ return host;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public int getPort()
+ {
+ return port;
+ }
+}
Modified: modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/WebPageConversation.java
===================================================================
--- modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/WebPageConversation.java 2008-04-07 12:55:25 UTC (rev 10514)
+++ modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/WebPageConversation.java 2008-04-08 05:26:51 UTC (rev 10515)
@@ -24,6 +24,7 @@
import org.jboss.portal.test.framework.server.Node;
import org.jboss.unit.driver.DriverCommand;
+import org.jboss.unit.driver.command.StartTestCommand;
import org.jboss.portal.test.framework.server.NodeId;
import org.jboss.unit.remote.driver.RemoteDriverCommandContext;
import org.jboss.unit.remote.driver.RemoteDriverResponseContext;
@@ -60,7 +61,7 @@
DriverCommand command = commandContext.getCommand();
if(command instanceof WebPageDriverCommand)
{
- ((WebPageDriverCommand)command).execute(commandContext);
+ ((WebPageDriverCommand)command).execute(this.getSeleniumConfig(commandContext), commandContext);
//Push the data extracted from executing the command over to the Server Side Extension of the Test
this.pushContext(commandContext);
@@ -109,4 +110,24 @@
return remoteResponseContext;
}
+
+ /**
+ *
+ * @param commandContext
+ * @return
+ */
+ private SeleniumConfiguration getSeleniumConfig(RemoteDriverCommandContext commandContext)
+ {
+ SeleniumConfiguration config = null;
+
+ StartTestCommand startCommand = (StartTestCommand)commandContext.getResponseContext().getCommandContext().getCommand();
+
+ String host = (String)startCommand.getParametrization().get("selenium-server-host");
+ int port = Integer.parseInt((String)startCommand.getParametrization().get("selenium-server-port"));
+ String browser = (String)startCommand.getParametrization().get("browser");
+
+ config = new SeleniumConfiguration(host,port,browser);
+
+ return config;
+ }
}
Modified: modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/WebPageDriverCommand.java
===================================================================
--- modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/WebPageDriverCommand.java 2008-04-07 12:55:25 UTC (rev 10514)
+++ modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/driver/webpage/WebPageDriverCommand.java 2008-04-08 05:26:51 UTC (rev 10515)
@@ -52,7 +52,7 @@
* @param webPageCommandContext
* @return
*/
- public abstract void execute(RemoteDriverCommandContext webPageCommandContext);
+ public abstract void execute(SeleniumConfiguration config, RemoteDriverCommandContext webPageCommandContext);
/**
*
Added: modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/web/deployment/ActualBootstrap.java
===================================================================
--- modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/web/deployment/ActualBootstrap.java (rev 0)
+++ modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/web/deployment/ActualBootstrap.java 2008-04-08 05:26:51 UTC (rev 10515)
@@ -0,0 +1,55 @@
+/******************************************************************************
+ * 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.unit.remote.web.deployment;
+
+import org.jboss.kernel.plugins.bootstrap.basic.BasicBootstrap;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class ActualBootstrap extends BasicBootstrap
+{
+
+ /** . */
+ private final WebBootstrap callback;
+
+ // I don't know why we need to declare it since super() does not declare it
+ public ActualBootstrap(WebBootstrap callback) throws Exception
+ {
+ super();
+
+ //
+ this.callback = callback;
+ }
+
+ protected void bootstrap() throws Throwable
+ {
+ super.bootstrap();
+
+ //
+ callback.boostrap();
+ }
+
+}
+
Added: modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/web/deployment/WebBootstrap.java
===================================================================
--- modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/web/deployment/WebBootstrap.java (rev 0)
+++ modules/test/trunk/remote/src/main/java/org/jboss/unit/remote/web/deployment/WebBootstrap.java 2008-04-08 05:26:51 UTC (rev 10515)
@@ -0,0 +1,246 @@
+/******************************************************************************
+ * 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.unit.remote.web.deployment;
+
+import org.jboss.kernel.plugins.deployment.xml.BeanXMLDeployer;
+import org.jboss.kernel.spi.deployment.KernelDeployment;
+import org.jboss.kernel.spi.event.KernelEventListener;
+import org.jboss.kernel.spi.event.KernelEvent;
+import org.jboss.kernel.spi.registry.KernelRegistry;
+import org.jboss.kernel.spi.registry.KernelRegistryEntry;
+import org.apache.log4j.Logger;
+
+import javax.servlet.ServletContext;
+import javax.servlet.ServletContextListener;
+import javax.servlet.ServletContextEvent;
+import java.net.URL;
+import java.net.MalformedURLException;
+
+/**
+ * A kernel bootstrap with a life cycle triggered by the <code>ServletContextListener</code> interface.
+ * All beans will be injected as servlet context attributes. The bean xml file must be available as
+ * a servlet context resource under the path <i>/WEB-INF/jboss-beans.xml</i>.
+ *
+ * @todo specify an alternative logger name
+ * @todo implement the specification of an alternative xml file path
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class WebBootstrap implements ServletContextListener, KernelEventListener
+{
+
+ /**
+ * The servlet context init parameter name for the bean resource location. For instance for a web application
+ * resource it could be <i>/WEB-INF/my-beans.xml</i>, for the web application classloader resource it could be
+ * <i>org/jboss/portal/my-beans.xml</i>. If no init parameter is declared then the litteral value
+ * <i>/WEB-INF/jboss-beans.xml</i> is used and the lookup is done in the servlet context resourcees.
+ */
+ public static final String BEANS_RESOURCE_LOCATION_KEY = "jboss.portal.mc.beans_resource_location";
+
+ /**
+ * The servlet context init parameter name for the bean resource type which can be the servlet context
+ * or the web application classloader. If no value is specified the servlet context will be used for
+ * resource lookup. The legal values are <i>context</i> for the servlet context and <i>classloader</i>
+ * for the web application classloader.
+ */
+ public static final String BEANS_RESOURCE_TYPE_KEY = "jboss.portal.mc.beans_resource_type";
+
+ /** Default value for the bean resource location. */
+ public static final String DEFAULT_JBOSS_BEANS_RESOURCE_LOCATION = "/WEB-INF/jboss-beans.xml";
+
+ /** Servlet context resource type. */
+ public static final String CONTEXT_RESOURCE_TYPE = "context";
+
+ /** Classloader resource type. */
+ public static final String CLASSLOADER_RESOURCE_TYPE = "classloader";
+
+ /** . */
+ private final static Logger log = Logger.getLogger(WebBootstrap.class);
+
+ /** . */
+ private ServletContext servletContext;
+
+ /** . */
+ private BeanXMLDeployer deployer;
+
+ /** . */
+ private KernelDeployment deployment;
+
+ /** . */
+ private boolean registered;
+
+ /** . */
+ private ActualBootstrap bootstrap;
+
+ public void contextInitialized(ServletContextEvent event)
+ {
+ servletContext = event.getServletContext();
+
+ //
+ try
+ {
+ bootstrap = new ActualBootstrap(this);
+
+ //
+ bootstrap.run();
+
+ //
+ log.info("Web kernel started");
+ }
+ catch (Exception e)
+ {
+ log.info("Web kernel boostrap failed", e);
+ }
+ }
+
+ public void contextDestroyed(ServletContextEvent event)
+ {
+ log.info("Web kernel shutdown");
+
+ //
+ if (deployment != null)
+ {
+ deployer.undeploy(deployment);
+ }
+
+ //
+ if (registered)
+ {
+ registered = false;
+ try
+ {
+ KernelRegistry registry = bootstrap.getKernel().getRegistry();
+ registry.unregisterListener(this, null, "ABC");
+ }
+ catch (Throwable throwable)
+ {
+ log.error("Cannot unregister kernel registry listener", throwable);
+ }
+ }
+
+ //
+ servletContext = null;
+
+ //
+ log.info("Web kernel stopped");
+ }
+
+ public void onEvent(KernelEvent event, Object object)
+ {
+ Object context = event.getContext();
+ if (context instanceof String)
+ {
+ String key = (String)context;
+ String type = event.getType();
+ if ("KERNEL_REGISTRY_REGISTERED".equals(type))
+ {
+ KernelRegistryEntry entry = bootstrap.getKernel().getRegistry().getEntry(context);
+ Object target = entry.getTarget();
+ servletContext.setAttribute(key, target);
+ }
+ else if ("KERNEL_REGISTRY_UNREGISTERED".equals(type))
+ {
+ servletContext.removeAttribute(key);
+ }
+ }
+ }
+
+ void boostrap() throws Throwable
+ {
+ //
+ bootstrap.getKernel().getRegistry().registerListener(WebBootstrap.this, null, "ABC");
+ registered = true;
+
+ //
+ deployer = new BeanXMLDeployer(bootstrap.getKernel());
+
+ //
+ URL url = getBeansURL();
+
+ //
+ if (url != null)
+ {
+ log.debug("About to deploy beans url=" + url);
+ deployment = deployer.deploy(url);
+ }
+ else
+ {
+ log.error("No valid beans URL was determined");
+ }
+ }
+
+ protected URL getBeansURL()
+ {
+ String location = servletContext.getInitParameter(BEANS_RESOURCE_LOCATION_KEY);
+ String type = servletContext.getInitParameter(BEANS_RESOURCE_TYPE_KEY);
+
+ //
+ if (location == null)
+ {
+ location = DEFAULT_JBOSS_BEANS_RESOURCE_LOCATION;
+ type = CONTEXT_RESOURCE_TYPE;
+ }
+ else if (type == null)
+ {
+ type = CONTEXT_RESOURCE_TYPE;
+ }
+
+ //
+ if (CONTEXT_RESOURCE_TYPE.equals(type))
+ {
+ try
+ {
+ return servletContext.getResource(location);
+ }
+ catch (MalformedURLException e)
+ {
+ log.error("Cannot obtain beans definition file from servlet context with location=" + location, e);
+
+ //
+ return null;
+ }
+ }
+ else if (CLASSLOADER_RESOURCE_TYPE.equals(type))
+ {
+ URL resource = Thread.currentThread().getContextClassLoader().getResource(location);
+
+ //
+ if (resource == null)
+ {
+ log.error("Cannot obtain bean definition file from thread context classloader with location=" + location);
+ }
+
+ //
+ return resource;
+ }
+ else
+ {
+ log.error("Cannot obtain bean definition file since the context type cannot be determined type=" + type);
+
+ //
+ return null;
+ }
+ }
+}
+
Modified: modules/test/trunk/remote/src/test/build.xml
===================================================================
--- modules/test/trunk/remote/src/test/build.xml 2008-04-07 12:55:25 UTC (rev 10514)
+++ modules/test/trunk/remote/src/test/build.xml 2008-04-08 05:26:51 UTC (rev 10515)
@@ -86,15 +86,51 @@
<tests config="${basedir}/src/test/resources/remote-jboss-unit.xml">
<property name="serverName" value="RemoteJBoss_4_2_1"/>
<property name="archivePath" value="${target}/test"/>
- <property name="archiveId" value="test-remote.ear"/>
+ <property name="archiveId" value="test-remote.ear"/>
+ <parameter name="selenium-server-host">
+ <value>localhost</value>
+ </parameter>
+
+ <parameter name="selenium-server-port">
+ <value>12345</value>
+ </parameter>
+
+ <parameter name="browser">
+ <value>firefox</value>
+ <!-- Uncomment to test with Internet Explorer -->
+ <!--<value>iexplore</value>-->
+ </parameter>
+
<classpath>
<pathelement path="${test_classpath}"/>
</classpath>
</tests>
- </jboss-unit>
+ </jboss-unit>
</target>
+ <target name="run.test.remote" depends="package-tests">
+ <!-- turn serverside debugging on and off here -->
+ <property name="serverDebug" value="false"/>
+
+ <!-- start the jboss unit remote server side components -->
+ <condition property="debug" value="-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8787,suspend=y" else="">
+ <istrue value="${serverDebug}"/>
+ </condition>
+ <antcall target="cargo.jboss4x.start">
+ <param name="cargo.jvmargs.value" value="${debug}"/>
+ </antcall>
+
+ <!-- run the actual jboss unit remote test suite -->
+ <antcall target="test.remote">
+ <!-- turn client side debugging on and off here -->
+ <param name="clientDebug" value="false"/>
+ </antcall>
+
+ <!-- stop the jboss unit remote server side components -->
+ <antcall target="cargo.jboss4x.stop"/>
+ </target>
+
<target name="cargo.jboss4x.start" depends="cargo.setup">
<cargo
containerId="jboss42x"
@@ -124,29 +160,7 @@
</configuration>
</cargo>
</target>
-
- <target name="run.test.remote" depends="package-tests">
- <!-- turn serverside debugging on and off here -->
- <property name="serverDebug" value="false"/>
- <!-- start the jboss unit remote server side components -->
- <condition property="debug" value="-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8787,suspend=y" else="">
- <istrue value="${serverDebug}"/>
- </condition>
- <antcall target="cargo.jboss4x.start">
- <param name="cargo.jvmargs.value" value="${debug}"/>
- </antcall>
-
- <!-- run the actual jboss unit remote test suite -->
- <antcall target="test.remote">
- <!-- turn client side debugging on and off here -->
- <param name="clientDebug" value="false"/>
- </antcall>
-
- <!-- stop the jboss unit remote server side components -->
- <antcall target="cargo.jboss4x.stop"/>
- </target>
-
<target name="cargo.setup" depends="prepare_env">
<property name="cargo.log.dir" value="${target}/test/cargo"/>
<mkdir dir="${cargo.log.dir}"/>
Deleted: modules/test/trunk/remote/src/test/java/org/jboss/unit/test/remote/ActualBootstrap.java
===================================================================
--- modules/test/trunk/remote/src/test/java/org/jboss/unit/test/remote/ActualBootstrap.java 2008-04-07 12:55:25 UTC (rev 10514)
+++ modules/test/trunk/remote/src/test/java/org/jboss/unit/test/remote/ActualBootstrap.java 2008-04-08 05:26:51 UTC (rev 10515)
@@ -1,55 +0,0 @@
-/******************************************************************************
- * 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.unit.test.remote;
-
-import org.jboss.kernel.plugins.bootstrap.basic.BasicBootstrap;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public class ActualBootstrap extends BasicBootstrap
-{
-
- /** . */
- private final WebBootstrap callback;
-
- // I don't know why we need to declare it since super() does not declare it
- public ActualBootstrap(WebBootstrap callback) throws Exception
- {
- super();
-
- //
- this.callback = callback;
- }
-
- protected void bootstrap() throws Throwable
- {
- super.bootstrap();
-
- //
- callback.boostrap();
- }
-
-}
-
Deleted: modules/test/trunk/remote/src/test/java/org/jboss/unit/test/remote/WebBootstrap.java
===================================================================
--- modules/test/trunk/remote/src/test/java/org/jboss/unit/test/remote/WebBootstrap.java 2008-04-07 12:55:25 UTC (rev 10514)
+++ modules/test/trunk/remote/src/test/java/org/jboss/unit/test/remote/WebBootstrap.java 2008-04-08 05:26:51 UTC (rev 10515)
@@ -1,246 +0,0 @@
-/******************************************************************************
- * 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.unit.test.remote;
-
-import org.jboss.kernel.plugins.deployment.xml.BeanXMLDeployer;
-import org.jboss.kernel.spi.deployment.KernelDeployment;
-import org.jboss.kernel.spi.event.KernelEventListener;
-import org.jboss.kernel.spi.event.KernelEvent;
-import org.jboss.kernel.spi.registry.KernelRegistry;
-import org.jboss.kernel.spi.registry.KernelRegistryEntry;
-import org.apache.log4j.Logger;
-
-import javax.servlet.ServletContext;
-import javax.servlet.ServletContextListener;
-import javax.servlet.ServletContextEvent;
-import java.net.URL;
-import java.net.MalformedURLException;
-
-/**
- * A kernel bootstrap with a life cycle triggered by the <code>ServletContextListener</code> interface.
- * All beans will be injected as servlet context attributes. The bean xml file must be available as
- * a servlet context resource under the path <i>/WEB-INF/jboss-beans.xml</i>.
- *
- * @todo specify an alternative logger name
- * @todo implement the specification of an alternative xml file path
- *
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public class WebBootstrap implements ServletContextListener, KernelEventListener
-{
-
- /**
- * The servlet context init parameter name for the bean resource location. For instance for a web application
- * resource it could be <i>/WEB-INF/my-beans.xml</i>, for the web application classloader resource it could be
- * <i>org/jboss/portal/my-beans.xml</i>. If no init parameter is declared then the litteral value
- * <i>/WEB-INF/jboss-beans.xml</i> is used and the lookup is done in the servlet context resourcees.
- */
- public static final String BEANS_RESOURCE_LOCATION_KEY = "jboss.portal.mc.beans_resource_location";
-
- /**
- * The servlet context init parameter name for the bean resource type which can be the servlet context
- * or the web application classloader. If no value is specified the servlet context will be used for
- * resource lookup. The legal values are <i>context</i> for the servlet context and <i>classloader</i>
- * for the web application classloader.
- */
- public static final String BEANS_RESOURCE_TYPE_KEY = "jboss.portal.mc.beans_resource_type";
-
- /** Default value for the bean resource location. */
- public static final String DEFAULT_JBOSS_BEANS_RESOURCE_LOCATION = "/WEB-INF/jboss-beans.xml";
-
- /** Servlet context resource type. */
- public static final String CONTEXT_RESOURCE_TYPE = "context";
-
- /** Classloader resource type. */
- public static final String CLASSLOADER_RESOURCE_TYPE = "classloader";
-
- /** . */
- private final static Logger log = Logger.getLogger(WebBootstrap.class);
-
- /** . */
- private ServletContext servletContext;
-
- /** . */
- private BeanXMLDeployer deployer;
-
- /** . */
- private KernelDeployment deployment;
-
- /** . */
- private boolean registered;
-
- /** . */
- private ActualBootstrap bootstrap;
-
- public void contextInitialized(ServletContextEvent event)
- {
- servletContext = event.getServletContext();
-
- //
- try
- {
- bootstrap = new ActualBootstrap(this);
-
- //
- bootstrap.run();
-
- //
- log.info("Web kernel started");
- }
- catch (Exception e)
- {
- log.info("Web kernel boostrap failed", e);
- }
- }
-
- public void contextDestroyed(ServletContextEvent event)
- {
- log.info("Web kernel shutdown");
-
- //
- if (deployment != null)
- {
- deployer.undeploy(deployment);
- }
-
- //
- if (registered)
- {
- registered = false;
- try
- {
- KernelRegistry registry = bootstrap.getKernel().getRegistry();
- registry.unregisterListener(this, null, "ABC");
- }
- catch (Throwable throwable)
- {
- log.error("Cannot unregister kernel registry listener", throwable);
- }
- }
-
- //
- servletContext = null;
-
- //
- log.info("Web kernel stopped");
- }
-
- public void onEvent(KernelEvent event, Object object)
- {
- Object context = event.getContext();
- if (context instanceof String)
- {
- String key = (String)context;
- String type = event.getType();
- if ("KERNEL_REGISTRY_REGISTERED".equals(type))
- {
- KernelRegistryEntry entry = bootstrap.getKernel().getRegistry().getEntry(context);
- Object target = entry.getTarget();
- servletContext.setAttribute(key, target);
- }
- else if ("KERNEL_REGISTRY_UNREGISTERED".equals(type))
- {
- servletContext.removeAttribute(key);
- }
- }
- }
-
- void boostrap() throws Throwable
- {
- //
- bootstrap.getKernel().getRegistry().registerListener(WebBootstrap.this, null, "ABC");
- registered = true;
-
- //
- deployer = new BeanXMLDeployer(bootstrap.getKernel());
-
- //
- URL url = getBeansURL();
-
- //
- if (url != null)
- {
- log.debug("About to deploy beans url=" + url);
- deployment = deployer.deploy(url);
- }
- else
- {
- log.error("No valid beans URL was determined");
- }
- }
-
- protected URL getBeansURL()
- {
- String location = servletContext.getInitParameter(BEANS_RESOURCE_LOCATION_KEY);
- String type = servletContext.getInitParameter(BEANS_RESOURCE_TYPE_KEY);
-
- //
- if (location == null)
- {
- location = DEFAULT_JBOSS_BEANS_RESOURCE_LOCATION;
- type = CONTEXT_RESOURCE_TYPE;
- }
- else if (type == null)
- {
- type = CONTEXT_RESOURCE_TYPE;
- }
-
- //
- if (CONTEXT_RESOURCE_TYPE.equals(type))
- {
- try
- {
- return servletContext.getResource(location);
- }
- catch (MalformedURLException e)
- {
- log.error("Cannot obtain beans definition file from servlet context with location=" + location, e);
-
- //
- return null;
- }
- }
- else if (CLASSLOADER_RESOURCE_TYPE.equals(type))
- {
- URL resource = Thread.currentThread().getContextClassLoader().getResource(location);
-
- //
- if (resource == null)
- {
- log.error("Cannot obtain bean definition file from thread context classloader with location=" + location);
- }
-
- //
- return resource;
- }
- else
- {
- log.error("Cannot obtain bean definition file since the context type cannot be determined type=" + type);
-
- //
- return null;
- }
- }
-}
-
Modified: modules/test/trunk/remote/src/test/java/org/jboss/unit/test/remote/webpage/ClickLinkCommandTestCase.java
===================================================================
--- modules/test/trunk/remote/src/test/java/org/jboss/unit/test/remote/webpage/ClickLinkCommandTestCase.java 2008-04-07 12:55:25 UTC (rev 10514)
+++ modules/test/trunk/remote/src/test/java/org/jboss/unit/test/remote/webpage/ClickLinkCommandTestCase.java 2008-04-08 05:26:51 UTC (rev 10515)
@@ -30,6 +30,7 @@
import org.jboss.unit.driver.command.StartTestCommand;
import static org.jboss.unit.api.Assert.*;
import org.jboss.unit.info.TestInfo;
+import org.jboss.unit.info.impl.SimpleParameterInfo;
import org.jboss.unit.info.impl.SimpleTestCaseInfo;
import org.jboss.unit.driver.response.EndTestResponse;
import org.jboss.unit.remote.RequestContext;
@@ -103,7 +104,14 @@
*/
public void initDriver(DriverContext context) throws DriverException
{
- this.info = new SimpleTestCaseInfo(this.getClass().getName());
+ SimpleParameterInfo browserParam = new SimpleParameterInfo("browser");
+ SimpleParameterInfo hostParam = new SimpleParameterInfo("selenium-server-host");
+ SimpleParameterInfo portParam = new SimpleParameterInfo("selenium-server-port");
+
+ this.info = new SimpleTestCaseInfo(this.getClass().getName());
+ ((SimpleTestCaseInfo)this.info).addParameter(browserParam);
+ ((SimpleTestCaseInfo)this.info).addParameter(hostParam);
+ ((SimpleTestCaseInfo)this.info).addParameter(portParam);
}
/**
Modified: modules/test/trunk/remote/src/test/java/org/jboss/unit/test/remote/webpage/GetPageCommandTestCase.java
===================================================================
--- modules/test/trunk/remote/src/test/java/org/jboss/unit/test/remote/webpage/GetPageCommandTestCase.java 2008-04-07 12:55:25 UTC (rev 10514)
+++ modules/test/trunk/remote/src/test/java/org/jboss/unit/test/remote/webpage/GetPageCommandTestCase.java 2008-04-08 05:26:51 UTC (rev 10515)
@@ -31,6 +31,7 @@
import static org.jboss.unit.api.Assert.*;
import org.jboss.unit.info.TestInfo;
import org.jboss.unit.info.impl.SimpleTestCaseInfo;
+import org.jboss.unit.info.impl.SimpleParameterInfo;
import org.jboss.unit.driver.response.EndTestResponse;
import org.jboss.unit.remote.RequestContext;
import org.jboss.unit.remote.ResponseContext;
@@ -90,8 +91,15 @@
*
*/
public void initDriver(DriverContext context) throws DriverException
- {
- this.info = new SimpleTestCaseInfo(this.getClass().getName());
+ {
+ SimpleParameterInfo browserParam = new SimpleParameterInfo("browser");
+ SimpleParameterInfo hostParam = new SimpleParameterInfo("selenium-server-host");
+ SimpleParameterInfo portParam = new SimpleParameterInfo("selenium-server-port");
+
+ this.info = new SimpleTestCaseInfo(this.getClass().getName());
+ ((SimpleTestCaseInfo)this.info).addParameter(browserParam);
+ ((SimpleTestCaseInfo)this.info).addParameter(hostParam);
+ ((SimpleTestCaseInfo)this.info).addParameter(portParam);
}
/**
Modified: modules/test/trunk/remote/src/test/resources/remote-jboss-unit.xml
===================================================================
--- modules/test/trunk/remote/src/test/resources/remote-jboss-unit.xml 2008-04-07 12:55:25 UTC (rev 10514)
+++ modules/test/trunk/remote/src/test/resources/remote-jboss-unit.xml 2008-04-08 05:26:51 UTC (rev 10515)
@@ -4,6 +4,6 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:jboss:jboss-unit:1.0 jboss-unit_1_0.xsd">
<generic>
- <class name="org.jboss.unit.remote.driver.RemoteTestDriverClient"/>
- </generic>
+ <class name="org.jboss.unit.remote.driver.RemoteTestDriverClient"/>
+ </generic>
</jboss-unit>
\ No newline at end of file
Modified: modules/test/trunk/remote/src/test/resources/server-beans.xml
===================================================================
--- modules/test/trunk/remote/src/test/resources/server-beans.xml 2008-04-07 12:55:25 UTC (rev 10514)
+++ modules/test/trunk/remote/src/test/resources/server-beans.xml 2008-04-08 05:26:51 UTC (rev 10515)
@@ -59,7 +59,7 @@
</uninstall>
<!-- Configuration for the test case -->
<!-- url of the web page to be accessed/asserted -->
- <property name="uri">http://localhost:8080/test-remote</property>
+ <property name="uri">http://localhost:8080/test-remote/</property>
</bean>
<!-- GetPageCommandTestCase -->
@@ -71,7 +71,7 @@
<parameter><this/></parameter>
</uninstall>
<!-- Configuration for the test case -->
- <property name="uri">http://localhost:8080/test-remote</property>
+ <property name="uri">http://localhost:8080/test-remote/</property>
<property name="link">link1</property>
</bean>
</deployment>
\ No newline at end of file
Modified: modules/test/trunk/remote/src/test/resources/war/WEB-INF/web.xml
===================================================================
--- modules/test/trunk/remote/src/test/resources/war/WEB-INF/web.xml 2008-04-07 12:55:25 UTC (rev 10514)
+++ modules/test/trunk/remote/src/test/resources/war/WEB-INF/web.xml 2008-04-08 05:26:51 UTC (rev 10515)
@@ -35,6 +35,6 @@
<param-value>classloader</param-value>
</context-param>
<listener>
- <listener-class>org.jboss.unit.test.remote.WebBootstrap</listener-class>
+ <listener-class>org.jboss.unit.remote.web.deployment.WebBootstrap</listener-class>
</listener>
</web-app>
18 years
JBoss Portal SVN: r10514 - in modules/presentation/trunk: presentation/src/main/java/org/jboss/portal/presentation/client/controller and 3 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-04-07 08:55:25 -0400 (Mon, 07 Apr 2008)
New Revision: 10514
Modified:
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionDecoder.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionEncoder.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/controller/UIController.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/ajax/entry/GWTClientFilter.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/ajax/entry/PortalEntryPoint.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/GetActivation.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/LinkActivation.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/PostActivation.java
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/portal/MockPortalEntryPoint.java
Log:
- minor update to link activation
- rewrite action decoded/encoder
Modified: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionDecoder.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionDecoder.java 2008-04-07 12:21:14 UTC (rev 10513)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionDecoder.java 2008-04-07 12:55:25 UTC (rev 10514)
@@ -37,23 +37,17 @@
public ProtocolAction decode(WebRequest request)
{
-
ProtocolAction action = null;
- Map<String, String[]> queryParams = request.getQueryParameterMap();
+ //
+ String pathInfo = request.getPathInfo();
- String[] actionValues = queryParams.get(Constants.ACTION_PARAM);
-
- if (actionValues != null)
+ //
+ if (pathInfo != null)
{
- String actionValue = actionValues[0];
-
- String[] targetIds = queryParams.get(Constants.TARGET_ID_PARAM);
-
- if (targetIds != null)
+ if (pathInfo.startsWith("/view/"))
{
- String targetId = targetIds[0];
-
+ String targetId = pathInfo.substring("/view/".length());
action = new ViewUIObjectAction(targetId);
}
}
Modified: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionEncoder.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionEncoder.java 2008-04-07 12:21:14 UTC (rev 10513)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionEncoder.java 2008-04-07 12:55:25 UTC (rev 10514)
@@ -38,8 +38,7 @@
{
ViewUIObjectAction viewObjectAction = (ViewUIObjectAction)action;
- //
- return "/index.html?action=" + Constants.VIEW_UI_OBJECT_ACTION + "&id=" + viewObjectAction.getTargetId();
+ return "/view/" + viewObjectAction.getTargetId();
}
return null;
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/controller/UIController.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/controller/UIController.java 2008-04-07 12:21:14 UTC (rev 10513)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/controller/UIController.java 2008-04-07 12:55:25 UTC (rev 10514)
@@ -213,11 +213,11 @@
{
if ("GET".equals(webReq.getMethod()))
{
- return new GetActivation(target.getId(), webReq.getQueryParameterMap());
+ return new GetActivation(target.getId(), null, webReq.getQueryParameterMap());
}
else if ("POST".equals(webReq.getMethod()))
{
- return new PostActivation(target.getId(), webReq.getQueryParameterMap(), webReq.getBody());
+ return new PostActivation(target.getId(), null, webReq.getQueryParameterMap(), webReq.getBody());
}
}
}
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/ajax/entry/GWTClientFilter.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/ajax/entry/GWTClientFilter.java 2008-04-07 12:21:14 UTC (rev 10513)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/ajax/entry/GWTClientFilter.java 2008-04-07 12:55:25 UTC (rev 10514)
@@ -129,12 +129,12 @@
}
if(method.equalsIgnoreCase("get"))
{
- GetActivation get = new GetActivation(targetId, queryParameters);
+ GetActivation get = new GetActivation(targetId, null, queryParameters);
request.getSession().setAttribute("serverAction", get);
}
else
{
- PostActivation post = new PostActivation(targetId, queryParameters, null);
+ PostActivation post = new PostActivation(targetId, null, queryParameters, null);
request.getSession().setAttribute("serverAction", post);
}
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/ajax/entry/PortalEntryPoint.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/ajax/entry/PortalEntryPoint.java 2008-04-07 12:21:14 UTC (rev 10513)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/ajax/entry/PortalEntryPoint.java 2008-04-07 12:55:25 UTC (rev 10514)
@@ -156,7 +156,7 @@
String targetId = this.parseTargetId(url);
- GetActivation get = new GetActivation(targetId, queryParams);
+ GetActivation get = new GetActivation(targetId, null, queryParams);
request.setAttribute("serverAction", get);
@@ -210,7 +210,7 @@
queryParams.put(URLDecoder.decode(name, "UTF-8"), new String[]{URLDecoder.decode(value, "UTF-8")});
}
- PostActivation post = new PostActivation(targetId, queryParams, null);
+ PostActivation post = new PostActivation(targetId, null, queryParams, null);
request.setAttribute("serverAction", post);
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/GetActivation.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/GetActivation.java 2008-04-07 12:21:14 UTC (rev 10513)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/GetActivation.java 2008-04-07 12:55:25 UTC (rev 10514)
@@ -27,14 +27,14 @@
/**
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
- *
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
*/
public class GetActivation extends LinkActivation
{
- public GetActivation(String targetId, Map queryParameters)
+ public GetActivation(String targetId, String path, Map<String, String[]> queryParameters)
{
- super(targetId, queryParameters);
+ super(targetId, path, queryParameters);
}
public String toString()
@@ -44,11 +44,10 @@
if(this.queryParameters != null)
{
buffer.append("QueryString---------------\n");
- for(Iterator itr=this.queryParameters.keySet().iterator(); itr.hasNext();)
+ for (String key : this.queryParameters.keySet())
{
- String key = (String)itr.next();
- String[] value = (String[])this.queryParameters.get(key);
- buffer.append(key+"="+value[0]+"\n");
+ String[] value = this.queryParameters.get(key);
+ buffer.append(key).append("=").append(value[0]).append("\n");
}
}
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/LinkActivation.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/LinkActivation.java 2008-04-07 12:21:14 UTC (rev 10513)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/LinkActivation.java 2008-04-07 12:55:25 UTC (rev 10514)
@@ -26,31 +26,42 @@
/**
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
- *
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
*/
public abstract class LinkActivation extends UIObjectAction
{
- /** julien: Not used for now . */
- // protected String url = null;
+ /** . */
+ protected String path = null;
/** . */
- protected Map queryParameters = null;
+ protected Map<String, String[]> queryParameters = null;
- protected LinkActivation(String targetId, Map queryParameters)
+ protected LinkActivation(String targetId, String path, Map<String, String[]> queryParameters)
{
super(targetId);
//
+ this.path = path;
this.queryParameters = queryParameters;
}
/**
- *
- * @return
+ * Returns the path or null if no path value is present
+ * @return the path
*/
- public Map getQueryParameters()
+ public String getPath()
{
+ return path;
+ }
+
+ /**
+ * Returns the query parameters or null if no query string is present.
+ *
+ * @return the query parameters
+ */
+ public Map<String, String[]> getQueryParameters()
+ {
return queryParameters;
}
}
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/PostActivation.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/PostActivation.java 2008-04-07 12:21:14 UTC (rev 10513)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/PostActivation.java 2008-04-07 12:55:25 UTC (rev 10514)
@@ -29,7 +29,7 @@
/**
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
- *
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
*/
public class PostActivation extends LinkActivation
{
@@ -37,17 +37,18 @@
/** . */
private final Body body;
- public PostActivation(String targetId, Map queryParameters, Body body)
+ public PostActivation(String targetId, String path, Map<String, String[]> queryParameters, Body body)
{
- super(targetId, queryParameters);
+ super(targetId, path, queryParameters);
//
this.body = body;
}
/**
- *
- * @return
+ * The body.
+ *
+ * @return the body
*/
public Body getBody()
{
@@ -61,22 +62,20 @@
if(this.queryParameters != null)
{
buffer.append("QueryString---------------\n");
- for(Iterator itr=this.queryParameters.keySet().iterator(); itr.hasNext();)
+ for (String key : this.queryParameters.keySet())
{
- String key = (String)itr.next();
- String[] value = (String[])this.queryParameters.get(key);
- buffer.append(key+"="+value[0]+"\n");
+ String[] value = this.queryParameters.get(key);
+ buffer.append(key).append("=").append(value[0]).append("\n");
}
}
if(this.body != null && ((Body.Form)this.body).getParameters() != null)
{
buffer.append("PostBody---------------\n");
- for(Iterator itr=((Body.Form)this.body).getParameters().keySet().iterator(); itr.hasNext();)
+ for (String key : ((Body.Form)this.body).getParameters().keySet())
{
- String key = (String)itr.next();
String[] value = ((Body.Form)this.body).getParameters().get(key);
- buffer.append(key+"="+value[0]+"\n");
+ buffer.append(key).append("=").append(value[0]).append("\n");
}
}
Modified: modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/portal/MockPortalEntryPoint.java
===================================================================
--- modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/portal/MockPortalEntryPoint.java 2008-04-07 12:21:14 UTC (rev 10513)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/portal/MockPortalEntryPoint.java 2008-04-07 12:55:25 UTC (rev 10514)
@@ -7,7 +7,6 @@
import java.net.URLDecoder;
import javax.management.MBeanServer;
-import javax.management.ObjectName;
import javax.servlet.ServletException;
import javax.servlet.UnavailableException;
@@ -15,10 +14,8 @@
import javax.servlet.http.HttpServletResponse;
import org.apache.log4j.Logger;
-import org.jboss.mx.util.MBeanProxy;
import org.jboss.mx.util.MBeanServerLocator;
-import org.jboss.portal.common.invocation.InterceptorStackFactory;
import org.jboss.portal.web.WebRequest;
import org.jboss.portal.web.WebResponse;
@@ -133,7 +130,7 @@
String targetId = this.parseTargetId(url);
- GetActivation get = new GetActivation(targetId, queryParams);
+ GetActivation get = new GetActivation(targetId, null, queryParams);
request.setAttribute("serverAction", get);
@@ -187,7 +184,7 @@
queryParams.put(URLDecoder.decode(name, "UTF-8"), new String[]{URLDecoder.decode(value, "UTF-8")});
}
- PostActivation post = new PostActivation(targetId, queryParams, null);
+ PostActivation post = new PostActivation(targetId, null, queryParams, null);
request.setAttribute("serverAction", post);
18 years
JBoss Portal SVN: r10513 - modules/common/trunk/common/src/main/java/org/jboss/portal/common/servlet.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-04-07 08:21:14 -0400 (Mon, 07 Apr 2008)
New Revision: 10513
Added:
modules/common/trunk/common/src/main/java/org/jboss/portal/common/servlet/URLFormat.java
Log:
- moved URLFormat to servlet package as it is related to how a servlet encodes an URL
Copied: modules/common/trunk/common/src/main/java/org/jboss/portal/common/servlet/URLFormat.java (from rev 10512, modules/common/trunk/common/src/main/java/org/jboss/portal/common/net/URLFormat.java)
===================================================================
--- modules/common/trunk/common/src/main/java/org/jboss/portal/common/servlet/URLFormat.java (rev 0)
+++ modules/common/trunk/common/src/main/java/org/jboss/portal/common/servlet/URLFormat.java 2008-04-07 12:21:14 UTC (rev 10513)
@@ -0,0 +1,107 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, 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.common.servlet;
+
+/**
+ * Defines how a URL should be formatted when rendered.
+ *
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class URLFormat
+{
+
+ /**
+ * Factory creation of URLFormat objects.
+ *
+ * @param secure if the url should be secure
+ * @param authenticated if the url should force the user to authenticate
+ * @param relative if the url is relative or absolute
+ * @param escapeXML if the url should have XML escaped
+ * @param servletEncoded if the url should be encoded with the servlet response (session propagation)
+ * @return the rendered URL
+ */
+ public static URLFormat create(
+ Boolean secure,
+ Boolean authenticated,
+ Boolean relative,
+ Boolean escapeXML,
+ Boolean servletEncoded)
+ {
+ return new URLFormat(secure, authenticated, relative, escapeXML, servletEncoded);
+ }
+
+ /** . */
+ private final Boolean secure;
+
+ /** . */
+ private final Boolean authenticated;
+
+ /** . */
+ private final Boolean relative;
+
+ /** . */
+ private final Boolean escapeXML;
+
+ /** . */
+ private final Boolean servletEncoded;
+
+ private URLFormat(
+ Boolean secure,
+ Boolean authenticated,
+ Boolean relative,
+ Boolean escapeXML,
+ Boolean servletEncoded)
+ {
+ this.secure = secure;
+ this.authenticated = authenticated;
+ this.relative = relative;
+ this.escapeXML = escapeXML;
+ this.servletEncoded = servletEncoded;
+ }
+
+ public Boolean getSecure()
+ {
+ return secure;
+ }
+
+ public Boolean getAuthenticated()
+ {
+ return authenticated;
+ }
+
+ public Boolean getRelative()
+ {
+ return relative;
+ }
+
+ public Boolean getEscapeXML()
+ {
+ return escapeXML;
+ }
+
+ public Boolean getServletEncoded()
+ {
+ return servletEncoded;
+ }
+}
18 years
JBoss Portal SVN: r10512 - modules/common/trunk/common/src/main/java/org/jboss/portal/common/net.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-04-07 08:11:10 -0400 (Mon, 07 Apr 2008)
New Revision: 10512
Added:
modules/common/trunk/common/src/main/java/org/jboss/portal/common/net/URLFormat.java
Log:
added javabean that describes how a URL should be rendered
Added: modules/common/trunk/common/src/main/java/org/jboss/portal/common/net/URLFormat.java
===================================================================
--- modules/common/trunk/common/src/main/java/org/jboss/portal/common/net/URLFormat.java (rev 0)
+++ modules/common/trunk/common/src/main/java/org/jboss/portal/common/net/URLFormat.java 2008-04-07 12:11:10 UTC (rev 10512)
@@ -0,0 +1,87 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, 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.common.net;
+
+/**
+ * Defines how a URL should be formatted when rendered.
+ *
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class URLFormat
+{
+
+ /**
+ * Factory creation of URLFormat objects.
+ *
+ * @param secure if the url should be secure
+ * @param authenticated if the url should force the user to authenticate
+ * @param relative if the url is relative or absolute
+ * @param escapeXML if the url should have XML escaped
+ * @return the rendered URL
+ */
+ public static URLFormat create(Boolean secure, Boolean authenticated, Boolean relative, Boolean escapeXML)
+ {
+ return new URLFormat(secure, authenticated, relative, escapeXML);
+ }
+
+ /** . */
+ private final Boolean secure;
+
+ /** . */
+ private final Boolean authenticated;
+
+ /** . */
+ private final Boolean relative;
+
+ /** . */
+ private final Boolean escapeXML;
+
+ private URLFormat(Boolean secure, Boolean authenticated, Boolean relative, Boolean escapeXML)
+ {
+ this.secure = secure;
+ this.authenticated = authenticated;
+ this.relative = relative;
+ this.escapeXML = escapeXML;
+ }
+
+ public Boolean getSecure()
+ {
+ return secure;
+ }
+
+ public Boolean getAuthenticated()
+ {
+ return authenticated;
+ }
+
+ public Boolean getRelative()
+ {
+ return relative;
+ }
+
+ public Boolean getEscapeXML()
+ {
+ return escapeXML;
+ }
+}
18 years
JBoss Portal SVN: r10511 - in modules/presentation/trunk: classic/src/main/java/org/jboss/portal/presentation/classic and 3 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-04-07 06:44:23 -0400 (Mon, 07 Apr 2008)
New Revision: 10511
Added:
modules/presentation/trunk/presentation/src/main/resources/org/jboss/portal/presentation/impl/state/structural/
Removed:
modules/presentation/trunk/presentation/src/main/resources/org/jboss/portal/presentation/impl/state/stuctural/
Modified:
modules/presentation/trunk/classic/src/main/artifacts/presentation-war/WEB-INF/page-structure.xml
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationServlet.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/NodeImporter.java
modules/presentation/trunk/presentation/src/main/resources/org/jboss/portal/presentation/impl/state/structural/page_structure_1_0.xsd
Log:
added schema validation in node document import
Modified: modules/presentation/trunk/classic/src/main/artifacts/presentation-war/WEB-INF/page-structure.xml
===================================================================
--- modules/presentation/trunk/classic/src/main/artifacts/presentation-war/WEB-INF/page-structure.xml 2008-04-07 09:06:32 UTC (rev 10510)
+++ modules/presentation/trunk/classic/src/main/artifacts/presentation-war/WEB-INF/page-structure.xml 2008-04-07 10:44:23 UTC (rev 10511)
@@ -1,9 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<context-def
xmlns="urn:jboss:portal:presentation:page:1.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:jboss:jboss-unit:1.0 page_structure_1_0.xsd"
- >
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<page-def name="default">
<window-def name="windowA">
<content>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Pellentesque odio nisl, faucibus id, placerat et, pulvinar at, nisi. Vivamus mollis pharetra risus. Mauris vitae massa vel augue congue eleifend. Morbi pede pede, adipiscing nec, scelerisque nec, ullamcorper sed, libero. Mauris iaculis lorem sit amet eros. Proin viverra eros. Morbi sit amet libero. Donec nec turpis et nunc consectetuer auctor. Fusce et metus. Sed commodo condimentum libero. Sed mollis tellus id justo. Nulla condimentum, libero ultricies accumsan pellentesque, nibh pede egestas quam, vitae varius nisi arcu ac urna. Phasellus interdum, odio vitae eleifend suscipit, nibh massa laoreet lorem, id mollis justo nisl non nunc. Sed enim enim, rutrum a, scelerisque eget, laoreet non, ante. Aenean molestie ipsum in nisi.</content>
Modified: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationServlet.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationServlet.java 2008-04-07 09:06:32 UTC (rev 10510)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationServlet.java 2008-04-07 10:44:23 UTC (rev 10511)
@@ -30,9 +30,7 @@
import org.jboss.portal.presentation.impl.state.structural.ContextNode;
import org.jboss.portal.presentation.impl.state.structural.NodeImporter;
import org.jboss.portal.presentation.impl.state.structural.StructuralStateContextImpl;
-import org.jboss.portal.common.xml.XMLTools;
import org.jboss.portal.common.io.IOTools;
-import org.w3c.dom.Document;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
@@ -52,11 +50,14 @@
public void init() throws ServletException
{
- Document doc;
+ StructuralStateContextImpl structuralStateContext = new StructuralStateContextImpl();
+
+ //
InputStream in = getServletContext().getResourceAsStream("/WEB-INF/page-structure.xml");
try
{
- doc = XMLTools.getDocumentBuilderFactory().newDocumentBuilder().parse(in);
+ ContextNode root = structuralStateContext.getRoot();
+ new NodeImporter(root).importDocument(in);
}
catch (Exception e)
{
@@ -68,13 +69,6 @@
}
//
- StructuralStateContextImpl structuralStateContext = new StructuralStateContextImpl();
-
- //
- ContextNode root = structuralStateContext.getRoot();
- new NodeImporter(root).importDocument(doc);
-
- //
this.server = new PresentationServerImpl(structuralStateContext);
}
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/NodeImporter.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/NodeImporter.java 2008-04-07 09:06:32 UTC (rev 10510)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/NodeImporter.java 2008-04-07 10:44:23 UTC (rev 10511)
@@ -26,7 +26,20 @@
import org.w3c.dom.Element;
import static org.jboss.portal.common.xml.XMLTools.*;
+import org.jboss.portal.common.xml.XMLTools;
+import org.jboss.portal.common.io.IOTools;
+import org.xml.sax.SAXException;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.validation.Schema;
+import javax.xml.validation.SchemaFactory;
+import javax.xml.XMLConstants;
+import java.io.InputStream;
+import java.io.IOException;
+import java.net.URL;
+
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
* @version $Revision: 630 $
@@ -34,6 +47,27 @@
public class NodeImporter
{
+ /** . */
+ private final static Schema schema;
+
+ /** . */
+ private static final URL schemaURL;
+
+ static
+ {
+ try
+ {
+ schemaURL = NodeImporter.class.getResource("page_structure_1_0.xsd");
+ SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
+ schema = factory.newSchema(schemaURL);
+ }
+ catch (SAXException e)
+ {
+ throw new Error("Could not load the page structure 1.0 schema", e);
+ }
+
+ }
+
/** The root to import the children to. */
private final StructuralNode root;
@@ -59,6 +93,33 @@
importContextDef(document.getDocumentElement());
}
+ public void importDocument(InputStream in) throws IllegalArgumentException, ParserConfigurationException, IOException, SAXException
+ {
+ if (in == null)
+ {
+ throw new IllegalArgumentException();
+ }
+
+ //
+ InputStream schemaStream = schemaURL.openStream();
+
+ try
+ {
+ DocumentBuilderFactory factory = XMLTools.getDocumentBuilderFactory();
+ factory.setValidating(true);
+ factory.setNamespaceAware(true);
+ factory.setAttribute("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema");
+ factory.setAttribute("http://java.sun.com/xml/jaxp/properties/schemaSource", schemaStream);
+ DocumentBuilder builder = factory.newDocumentBuilder();
+ Document doc = builder.parse(in);
+ importDocument(doc);
+ }
+ finally
+ {
+ IOTools.safeClose(schemaStream);
+ }
+ }
+
private void importContextDef(Element contextDefElt)
{
// Children pages
Copied: modules/presentation/trunk/presentation/src/main/resources/org/jboss/portal/presentation/impl/state/structural (from rev 10510, modules/presentation/trunk/presentation/src/main/resources/org/jboss/portal/presentation/impl/state/stuctural)
Modified: modules/presentation/trunk/presentation/src/main/resources/org/jboss/portal/presentation/impl/state/structural/page_structure_1_0.xsd
===================================================================
--- modules/presentation/trunk/presentation/src/main/resources/org/jboss/portal/presentation/impl/state/stuctural/page_structure_1_0.xsd 2008-04-07 09:06:32 UTC (rev 10510)
+++ modules/presentation/trunk/presentation/src/main/resources/org/jboss/portal/presentation/impl/state/structural/page_structure_1_0.xsd 2008-04-07 10:44:23 UTC (rev 10511)
@@ -42,7 +42,9 @@
<xsd:complexContent>
<xsd:extension base="nodeDefType">
<xsd:sequence>
- <xsd:element name="page-def" type="pageDefType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="page-def" type="pageDefType"/>
+ </xsd:choice>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
@@ -51,10 +53,10 @@
<xsd:complexType name="pageDefType">
<xsd:complexContent>
<xsd:extension base="namedNodeDefType">
- <xsd:sequence>
- <xsd:element name="page-def" type="pageDefType" minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="window-def" type="windowDefType" minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="page-def" type="pageDefType"/>
+ <xsd:element name="window-def" type="windowDefType"/>
+ </xsd:choice>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
18 years
JBoss Portal SVN: r10510 - in modules/presentation/trunk: classic/src/main/artifacts/presentation-war/WEB-INF and 14 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-04-07 05:06:32 -0400 (Mon, 07 Apr 2008)
New Revision: 10510
Added:
modules/presentation/trunk/classic/src/main/artifacts/presentation-war/WEB-INF/page-structure.xml
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/model/PageViewPortScope.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionDecoder.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionEncoder.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/Constants.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/NodeImporter.java
modules/presentation/trunk/presentation/src/main/resources/
modules/presentation/trunk/presentation/src/main/resources/org/
modules/presentation/trunk/presentation/src/main/resources/org/jboss/
modules/presentation/trunk/presentation/src/main/resources/org/jboss/portal/
modules/presentation/trunk/presentation/src/main/resources/org/jboss/portal/presentation/
modules/presentation/trunk/presentation/src/main/resources/org/jboss/portal/presentation/impl/
modules/presentation/trunk/presentation/src/main/resources/org/jboss/portal/presentation/impl/state/
modules/presentation/trunk/presentation/src/main/resources/org/jboss/portal/presentation/impl/state/stuctural/
modules/presentation/trunk/presentation/src/main/resources/org/jboss/portal/presentation/impl/state/stuctural/page_structure_1_0.xsd
Modified:
modules/presentation/trunk/classic/src/assemble/presentation-war.xml
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/PresentationServerImpl.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationServlet.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/StructuralStateContextImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/WindowNode.java
Log:
created a node importer for creating page structure from an XML definition instead of using a programmatic approach
Modified: modules/presentation/trunk/classic/src/assemble/presentation-war.xml
===================================================================
--- modules/presentation/trunk/classic/src/assemble/presentation-war.xml 2008-04-07 08:53:27 UTC (rev 10509)
+++ modules/presentation/trunk/classic/src/assemble/presentation-war.xml 2008-04-07 09:06:32 UTC (rev 10510)
@@ -25,6 +25,7 @@
<includes>
<include>org.jboss.portal.common:common-common</include>
<include>org.jboss.portal.common:common-portal</include>
+ <include>org.jboss.portal.web:web-web</include>
<include>org.jboss.portal.presentation:presentation-presentation</include>
</includes>
</dependencySet>
Added: modules/presentation/trunk/classic/src/main/artifacts/presentation-war/WEB-INF/page-structure.xml
===================================================================
--- modules/presentation/trunk/classic/src/main/artifacts/presentation-war/WEB-INF/page-structure.xml (rev 0)
+++ modules/presentation/trunk/classic/src/main/artifacts/presentation-war/WEB-INF/page-structure.xml 2008-04-07 09:06:32 UTC (rev 10510)
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<context-def
+ xmlns="urn:jboss:portal:presentation:page:1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:jboss-unit:1.0 page_structure_1_0.xsd"
+ >
+ <page-def name="default">
+ <window-def name="windowA">
+ <content>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Pellentesque odio nisl, faucibus id, placerat et, pulvinar at, nisi. Vivamus mollis pharetra risus. Mauris vitae massa vel augue congue eleifend. Morbi pede pede, adipiscing nec, scelerisque nec, ullamcorper sed, libero. Mauris iaculis lorem sit amet eros. Proin viverra eros. Morbi sit amet libero. Donec nec turpis et nunc consectetuer auctor. Fusce et metus. Sed commodo condimentum libero. Sed mollis tellus id justo. Nulla condimentum, libero ultricies accumsan pellentesque, nibh pede egestas quam, vitae varius nisi arcu ac urna. Phasellus interdum, odio vitae eleifend suscipit, nibh massa laoreet lorem, id mollis justo nisl non nunc. Sed enim enim, rutrum a, scelerisque eget, laoreet non, ante. Aenean molestie ipsum in nisi.</content>
+ </window-def>
+ <window-def name="windowB">
+ <content>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Pellentesque odio nisl, faucibus id, placerat et, pulvinar at, nisi. Vivamus mollis pharetra risus. Mauris vitae massa vel augue congue eleifend. Morbi pede pede, adipiscing nec, scelerisque nec, ullamcorper sed, libero. Mauris iaculis lorem sit amet eros. Proin viverra eros. Morbi sit amet libero. Donec nec turpis et nunc consectetuer auctor. Fusce et metus. Sed commodo condimentum libero. Sed mollis tellus id justo. Nulla condimentum, libero ultricies accumsan pellentesque, nibh pede egestas quam, vitae varius nisi arcu ac urna. Phasellus interdum, odio vitae eleifend suscipit, nibh massa laoreet lorem, id mollis justo nisl non nunc. Sed enim enim, rutrum a, scelerisque eget, laoreet non, ante. Aenean molestie ipsum in nisi.</content>
+ </window-def>
+ <window-def name="windowC">
+ <content>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Pellentesque odio nisl, faucibus id, placerat et, pulvinar at, nisi. Vivamus mollis pharetra risus. Mauris vitae massa vel augue congue eleifend. Morbi pede pede, adipiscing nec, scelerisque nec, ullamcorper sed, libero. Mauris iaculis lorem sit amet eros. Proin viverra eros. Morbi sit amet libero. Donec nec turpis et nunc consectetuer auctor. Fusce et metus. Sed commodo condimentum libero. Sed mollis tellus id justo. Nulla condimentum, libero ultricies accumsan pellentesque, nibh pede egestas quam, vitae varius nisi arcu ac urna. Phasellus interdum, odio vitae eleifend suscipit, nibh massa laoreet lorem, id mollis justo nisl non nunc. Sed enim enim, rutrum a, scelerisque eget, laoreet non, ante. Aenean molestie ipsum in nisi.</content>
+ </window-def>
+ <page-def name="child-page-default-1">
+ <window-def name="windowA">
+ <content>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Pellentesque odio nisl, faucibus id, placerat et, pulvinar at, nisi. Vivamus mollis pharetra risus. Mauris vitae massa vel augue congue eleifend. Morbi pede pede, adipiscing nec, scelerisque nec, ullamcorper sed, libero. Mauris iaculis lorem sit amet eros. Proin viverra eros. Morbi sit amet libero. Donec nec turpis et nunc consectetuer auctor. Fusce et metus. Sed commodo condimentum libero. Sed mollis tellus id justo. Nulla condimentum, libero ultricies accumsan pellentesque, nibh pede egestas quam, vitae varius nisi arcu ac urna. Phasellus interdum, odio vitae eleifend suscipit, nibh massa laoreet lorem, id mollis justo nisl non nunc. Sed enim enim, rutrum a, scelerisque eget, laoreet non, ante. Aenean molestie ipsum in nisi.</content>
+ </window-def>
+ <window-def name="windowB">
+ <content>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Pellentesque odio nisl, faucibus id, placerat et, pulvinar at, nisi. Vivamus mollis pharetra risus. Mauris vitae massa vel augue congue eleifend. Morbi pede pede, adipiscing nec, scelerisque nec, ullamcorper sed, libero. Mauris iaculis lorem sit amet eros. Proin viverra eros. Morbi sit amet libero. Donec nec turpis et nunc consectetuer auctor. Fusce et metus. Sed commodo condimentum libero. Sed mollis tellus id justo. Nulla condimentum, libero ultricies accumsan pellentesque, nibh pede egestas quam, vitae varius nisi arcu ac urna. Phasellus interdum, odio vitae eleifend suscipit, nibh massa laoreet lorem, id mollis justo nisl non nunc. Sed enim enim, rutrum a, scelerisque eget, laoreet non, ante. Aenean molestie ipsum in nisi.</content>
+ </window-def>
+ </page-def>
+ <page-def name="child-page-default-2">
+ <window-def name="windowA">
+ <content>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Pellentesque odio nisl, faucibus id, placerat et, pulvinar at, nisi. Vivamus mollis pharetra risus. Mauris vitae massa vel augue congue eleifend. Morbi pede pede, adipiscing nec, scelerisque nec, ullamcorper sed, libero. Mauris iaculis lorem sit amet eros. Proin viverra eros. Morbi sit amet libero. Donec nec turpis et nunc consectetuer auctor. Fusce et metus. Sed commodo condimentum libero. Sed mollis tellus id justo. Nulla condimentum, libero ultricies accumsan pellentesque, nibh pede egestas quam, vitae varius nisi arcu ac urna. Phasellus interdum, odio vitae eleifend suscipit, nibh massa laoreet lorem, id mollis justo nisl non nunc. Sed enim enim, rutrum a, scelerisque eget, laoreet non, ante. Aenean molestie ipsum in nisi.</content>
+ </window-def>
+ <window-def name="windowB">
+ <content>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Pellentesque odio nisl, faucibus id, placerat et, pulvinar at, nisi. Vivamus mollis pharetra risus. Mauris vitae massa vel augue congue eleifend. Morbi pede pede, adipiscing nec, scelerisque nec, ullamcorper sed, libero. Mauris iaculis lorem sit amet eros. Proin viverra eros. Morbi sit amet libero. Donec nec turpis et nunc consectetuer auctor. Fusce et metus. Sed commodo condimentum libero. Sed mollis tellus id justo. Nulla condimentum, libero ultricies accumsan pellentesque, nibh pede egestas quam, vitae varius nisi arcu ac urna. Phasellus interdum, odio vitae eleifend suscipit, nibh massa laoreet lorem, id mollis justo nisl non nunc. Sed enim enim, rutrum a, scelerisque eget, laoreet non, ante. Aenean molestie ipsum in nisi.</content>
+ </window-def>
+ <window-def name="windowC">
+ <content>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Pellentesque odio nisl, faucibus id, placerat et, pulvinar at, nisi. Vivamus mollis pharetra risus. Mauris vitae massa vel augue congue eleifend. Morbi pede pede, adipiscing nec, scelerisque nec, ullamcorper sed, libero. Mauris iaculis lorem sit amet eros. Proin viverra eros. Morbi sit amet libero. Donec nec turpis et nunc consectetuer auctor. Fusce et metus. Sed commodo condimentum libero. Sed mollis tellus id justo. Nulla condimentum, libero ultricies accumsan pellentesque, nibh pede egestas quam, vitae varius nisi arcu ac urna. Phasellus interdum, odio vitae eleifend suscipit, nibh massa laoreet lorem, id mollis justo nisl non nunc. Sed enim enim, rutrum a, scelerisque eget, laoreet non, ante. Aenean molestie ipsum in nisi.</content>
+ </window-def>
+ <window-def name="windowD">
+ <content>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Pellentesque odio nisl, faucibus id, placerat et, pulvinar at, nisi. Vivamus mollis pharetra risus. Mauris vitae massa vel augue congue eleifend. Morbi pede pede, adipiscing nec, scelerisque nec, ullamcorper sed, libero. Mauris iaculis lorem sit amet eros. Proin viverra eros. Morbi sit amet libero. Donec nec turpis et nunc consectetuer auctor. Fusce et metus. Sed commodo condimentum libero. Sed mollis tellus id justo. Nulla condimentum, libero ultricies accumsan pellentesque, nibh pede egestas quam, vitae varius nisi arcu ac urna. Phasellus interdum, odio vitae eleifend suscipit, nibh massa laoreet lorem, id mollis justo nisl non nunc. Sed enim enim, rutrum a, scelerisque eget, laoreet non, ante. Aenean molestie ipsum in nisi.</content>
+ </window-def>
+ </page-def>
+ </page-def>
+ <page-def name="default-sibling-1">
+ <window-def name="windowA">
+ <content>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Pellentesque odio nisl, faucibus id, placerat et, pulvinar at, nisi. Vivamus mollis pharetra risus. Mauris vitae massa vel augue congue eleifend. Morbi pede pede, adipiscing nec, scelerisque nec, ullamcorper sed, libero. Mauris iaculis lorem sit amet eros. Proin viverra eros. Morbi sit amet libero. Donec nec turpis et nunc consectetuer auctor. Fusce et metus. Sed commodo condimentum libero. Sed mollis tellus id justo. Nulla condimentum, libero ultricies accumsan pellentesque, nibh pede egestas quam, vitae varius nisi arcu ac urna. Phasellus interdum, odio vitae eleifend suscipit, nibh massa laoreet lorem, id mollis justo nisl non nunc. Sed enim enim, rutrum a, scelerisque eget, laoreet non, ante. Aenean molestie ipsum in nisi.</content>
+ </window-def>
+ <window-def name="windowB">
+ <content>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Pellentesque odio nisl, faucibus id, placerat et, pulvinar at, nisi. Vivamus mollis pharetra risus. Mauris vitae massa vel augue congue eleifend. Morbi pede pede, adipiscing nec, scelerisque nec, ullamcorper sed, libero. Mauris iaculis lorem sit amet eros. Proin viverra eros. Morbi sit amet libero. Donec nec turpis et nunc consectetuer auctor. Fusce et metus. Sed commodo condimentum libero. Sed mollis tellus id justo. Nulla condimentum, libero ultricies accumsan pellentesque, nibh pede egestas quam, vitae varius nisi arcu ac urna. Phasellus interdum, odio vitae eleifend suscipit, nibh massa laoreet lorem, id mollis justo nisl non nunc. Sed enim enim, rutrum a, scelerisque eget, laoreet non, ante. Aenean molestie ipsum in nisi.</content>
+ </window-def>
+ <window-def name="windowC">
+ <content>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Pellentesque odio nisl, faucibus id, placerat et, pulvinar at, nisi. Vivamus mollis pharetra risus. Mauris vitae massa vel augue congue eleifend. Morbi pede pede, adipiscing nec, scelerisque nec, ullamcorper sed, libero. Mauris iaculis lorem sit amet eros. Proin viverra eros. Morbi sit amet libero. Donec nec turpis et nunc consectetuer auctor. Fusce et metus. Sed commodo condimentum libero. Sed mollis tellus id justo. Nulla condimentum, libero ultricies accumsan pellentesque, nibh pede egestas quam, vitae varius nisi arcu ac urna. Phasellus interdum, odio vitae eleifend suscipit, nibh massa laoreet lorem, id mollis justo nisl non nunc. Sed enim enim, rutrum a, scelerisque eget, laoreet non, ante. Aenean molestie ipsum in nisi.</content>
+ </window-def>
+ <window-def name="windowD">
+ <content>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Pellentesque odio nisl, faucibus id, placerat et, pulvinar at, nisi. Vivamus mollis pharetra risus. Mauris vitae massa vel augue congue eleifend. Morbi pede pede, adipiscing nec, scelerisque nec, ullamcorper sed, libero. Mauris iaculis lorem sit amet eros. Proin viverra eros. Morbi sit amet libero. Donec nec turpis et nunc consectetuer auctor. Fusce et metus. Sed commodo condimentum libero. Sed mollis tellus id justo. Nulla condimentum, libero ultricies accumsan pellentesque, nibh pede egestas quam, vitae varius nisi arcu ac urna. Phasellus interdum, odio vitae eleifend suscipit, nibh massa laoreet lorem, id mollis justo nisl non nunc. Sed enim enim, rutrum a, scelerisque eget, laoreet non, ante. Aenean molestie ipsum in nisi.</content>
+ </window-def>
+ <window-def name="windowE">
+ <content>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Pellentesque odio nisl, faucibus id, placerat et, pulvinar at, nisi. Vivamus mollis pharetra risus. Mauris vitae massa vel augue congue eleifend. Morbi pede pede, adipiscing nec, scelerisque nec, ullamcorper sed, libero. Mauris iaculis lorem sit amet eros. Proin viverra eros. Morbi sit amet libero. Donec nec turpis et nunc consectetuer auctor. Fusce et metus. Sed commodo condimentum libero. Sed mollis tellus id justo. Nulla condimentum, libero ultricies accumsan pellentesque, nibh pede egestas quam, vitae varius nisi arcu ac urna. Phasellus interdum, odio vitae eleifend suscipit, nibh massa laoreet lorem, id mollis justo nisl non nunc. Sed enim enim, rutrum a, scelerisque eget, laoreet non, ante. Aenean molestie ipsum in nisi.</content>
+ </window-def>
+ </page-def>
+</context-def>
Modified: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/PresentationServerImpl.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/PresentationServerImpl.java 2008-04-07 08:53:27 UTC (rev 10509)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/PresentationServerImpl.java 2008-04-07 09:06:32 UTC (rev 10510)
@@ -28,11 +28,14 @@
import org.jboss.portal.presentation.server2.PresentationRequest;
import org.jboss.portal.presentation.state.structural.StructuralStateContext;
import org.jboss.portal.presentation.protocol.ProtocolAction;
+import org.jboss.portal.presentation.protocol.ViewUIObjectAction;
+import org.jboss.portal.presentation.protocol.UIObjectAction;
+import org.jboss.portal.presentation.protocol.ErrorResponse;
+import org.jboss.portal.presentation.protocol.ShowUIObjectResponse;
import org.jboss.portal.presentation.model.content.WindowContent;
import org.jboss.portal.presentation.client2.PresentationClient;
import org.jboss.portal.presentation.impl.state.structural.StructuralStateContextImpl;
-import org.jboss.portal.presentation.impl.state.structural.ContextNode;
-import org.jboss.portal.presentation.impl.state.structural.PageNode;
+import org.jboss.portal.presentation.impl.state.structural.StructuralNode;
import org.jboss.portal.presentation.impl.state.structural.WindowNode;
/**
@@ -43,18 +46,11 @@
{
/** . */
- private StructuralStateContextImpl structuralStateContext = new StructuralStateContextImpl();
+ private StructuralStateContextImpl structuralStateContext;
- public PresentationServerImpl()
+ public PresentationServerImpl(StructuralStateContextImpl structuralStateContext)
{
- ContextNode root = structuralStateContext.getRoot();
- PageNode defaultPage = root.addChild("default", PageNode.class);
- PageNode fooPage = root.addChild("foo", PageNode.class);
- PageNode barPage = root.addChild("bar", PageNode.class);
- defaultPage.addChild("foo", WindowNode.class);
- defaultPage.addChild("bar", WindowNode.class);
- defaultPage.addChild("juu", PageNode.class);
- defaultPage.addChild("daa", PageNode.class);
+ this.structuralStateContext = structuralStateContext;
}
public StructuralStateContext getStructuralStateContext()
@@ -69,11 +65,48 @@
public WindowContent renderWindow(PresentationClient client, String windowId) throws PresentationServerException
{
- return new WindowContent(0, "Window " + windowId, "Some markup for window " + windowId);
+ StructuralNode node = structuralStateContext.getNode(windowId);
+
+ //
+ if (node instanceof WindowNode)
+ {
+ WindowNode window = (WindowNode)node;
+ return new WindowContent(0, "Window " + window.getName(), window.getContent());
+ }
+ else
+ {
+ throw new PresentationServerException("No such window " + windowId);
+ }
}
public PresentationResponse process(PresentationClient client, PresentationRequest request) throws PresentationServerException
{
+ ProtocolAction action = request.getProtocolAction();
+
+ if (action instanceof UIObjectAction)
+ {
+ UIObjectAction objectAction = (UIObjectAction)action;
+
+ //
+ String targetId = objectAction.getTargetId();
+
+ //
+ StructuralNode targetNode = structuralStateContext.getNode(targetId);
+
+ //
+ if (targetNode == null)
+ {
+ return new PresentationResponse(new ErrorResponse(404));
+ }
+
+ //
+ if (objectAction instanceof ViewUIObjectAction)
+ {
+ return new PresentationResponse(new ShowUIObjectResponse(targetId));
+ }
+ }
+
+ //
throw new UnsupportedOperationException();
}
}
Modified: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java 2008-04-07 08:53:27 UTC (rev 10509)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java 2008-04-07 09:06:32 UTC (rev 10510)
@@ -28,19 +28,29 @@
import org.jboss.portal.presentation.classic.model.DefaultPageViewPortScope;
import org.jboss.portal.presentation.classic.model.ClassicViewPortContext;
import org.jboss.portal.presentation.classic.model.ClassicUINode;
+import org.jboss.portal.presentation.classic.model.PageViewPortScope;
+import org.jboss.portal.presentation.classic.protocol.ActionDecoder;
+import org.jboss.portal.presentation.classic.protocol.ActionEncoder;
import org.jboss.portal.presentation.server2.PresentationServer;
import org.jboss.portal.presentation.server2.PresentationServerException;
+import org.jboss.portal.presentation.server2.PresentationRequest;
+import org.jboss.portal.presentation.server2.PresentationResponse;
import org.jboss.portal.presentation.model2.UIModel;
import org.jboss.portal.presentation.model2.ViewPort;
import org.jboss.portal.presentation.model2.UIObject;
+import org.jboss.portal.presentation.model2.ViewPortScope;
import org.jboss.portal.presentation.model2.ui.UIContext;
import org.jboss.portal.presentation.model2.ui.UIPage;
import org.jboss.portal.presentation.model2.ui.UIWindow;
import org.jboss.portal.presentation.impl.model2.UIModelImpl;
import org.jboss.portal.presentation.model.content.WindowContent;
+import org.jboss.portal.presentation.protocol.ViewUIObjectAction;
+import org.jboss.portal.presentation.protocol.ProtocolAction;
+import org.jboss.portal.presentation.protocol.ProtocolResponse;
+import org.jboss.portal.presentation.protocol.ShowUIObjectResponse;
+import org.jboss.portal.web.WebRequest;
+import org.jboss.portal.web.WebResponse;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
import java.io.PrintWriter;
import java.io.IOException;
import java.util.Collection;
@@ -53,17 +63,23 @@
{
/** . */
- private final HttpServletRequest req;
+ private final WebRequest req;
/** . */
- private final HttpServletResponse resp;
+ private final WebResponse resp;
/** . */
private final PresentationServer server;
+ /** . */
+ private final ActionDecoder decoder = new ActionDecoder();
+
+ /** . */
+ private final ActionEncoder encoder = new ActionEncoder();
+
public ClassicPresentationClient(
- HttpServletRequest req,
- HttpServletResponse resp,
+ WebRequest req,
+ WebResponse resp,
PresentationServer server)
{
this.req = req;
@@ -76,42 +92,74 @@
return null;
}
- public void process() throws IOException
+ public void process() throws IOException, PresentationServerException
{
+ ProtocolAction action = decoder.decode(req);
- StructuralStateContext ssc = server.getStructuralStateContext();
+ PresentationResponse presentationResp = null;
- DefaultPageViewPortScope scope = new DefaultPageViewPortScope(ssc.getRootId());
+ if (action != null)
+ {
+ PresentationRequest request = new PresentationRequest(action);
+ presentationResp = server.process(this, request);
+ }
+
+ if (presentationResp != null)
+ {
+ ProtocolResponse protocolResp = presentationResp.getProtocolResponse();
+
+ //
+ if (protocolResp instanceof ShowUIObjectResponse)
+ {
+ ShowUIObjectResponse showObjectResp = (ShowUIObjectResponse)protocolResp;
+ PageViewPortScope scope = new PageViewPortScope(showObjectResp.getTargetId());
+ renderDocument(scope, showObjectResp.getTargetId());
+ }
+ else
+ {
+ throw new UnsupportedOperationException("Not handled: " + protocolResp);
+ }
+ }
+ else
+ {
+ StructuralStateContext ssc = server.getStructuralStateContext();
+ DefaultPageViewPortScope scope = new DefaultPageViewPortScope(ssc.getRootId());
+ renderDocument(scope, ssc.getRootId());
+ }
+ }
+
+ private void renderDocument(ViewPortScope scope, String nodeId) throws IOException
+ {
+ StructuralStateContext ssc = server.getStructuralStateContext();
ClassicViewPortContext context = new ClassicViewPortContext();
-
UIModel model = new UIModelImpl(null, ssc);
-
ViewPort viewPort = model.createViewPort(context, scope);
+ //
viewPort.refresh();
- ClassicUINode root = context.getNode(ssc.getRootId());
+ //
+ ClassicUINode node = context.getNode(nodeId);
+ //
resp.setContentType("text/html");
PrintWriter writer = resp.getWriter();
- render(root, writer);
+
+ //
+ writer.print("<html><body>");
+ renderNode(node, writer);
+ writer.print("</body></html>");
}
- private void render(ClassicUINode node, PrintWriter writer)
+ private void renderNode(ClassicUINode node, PrintWriter writer)
{
UIObject object = node.getObject();
//
if (object instanceof UIContext)
{
- writer.print("<html><body>");
-
- //
renderChildren(node, writer);
-
- //
- writer.print("</body></html>");
}
else if (object instanceof UIPage)
{
@@ -127,7 +175,11 @@
}
else
{
- writer.print("<div>Link to page : " + object.getId() + "</div>");
+ ViewUIObjectAction viewPage = new ViewUIObjectAction(object.getId());
+
+ String url = encoder.encode(viewPage);
+
+ writer.print("<div>Link to page <a href=\"" + req.getContextPath() + url + "\">" + object.getName() + "</a></div>");
}
}
else if (object instanceof UIWindow)
@@ -138,6 +190,9 @@
//
writer.print("<div>");
+ writer.print("Window " + object.getName());
+ writer.print("</div>");
+ writer.print("<div>");
writer.print(content.getMarkup());
writer.print("</div>");
}
@@ -157,9 +212,8 @@
{
for (ClassicUINode child : children)
{
- render(child, writer);
+ renderNode(child, writer);
}
}
}
-
}
Modified: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationServlet.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationServlet.java 2008-04-07 08:53:27 UTC (rev 10509)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationServlet.java 2008-04-07 09:06:32 UTC (rev 10510)
@@ -23,15 +23,23 @@
package org.jboss.portal.presentation.classic;
import org.jboss.portal.web.WebRequest;
+import org.jboss.portal.web.WebResponse;
import org.jboss.portal.presentation.server2.PresentationServer;
-import org.jboss.portal.presentation.client2.PresentationClient;
+import org.jboss.portal.presentation.server2.PresentationServerException;
import org.jboss.portal.presentation.PresentationServerImpl;
+import org.jboss.portal.presentation.impl.state.structural.ContextNode;
+import org.jboss.portal.presentation.impl.state.structural.NodeImporter;
+import org.jboss.portal.presentation.impl.state.structural.StructuralStateContextImpl;
+import org.jboss.portal.common.xml.XMLTools;
+import org.jboss.portal.common.io.IOTools;
+import org.w3c.dom.Document;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.ServletException;
import java.io.IOException;
+import java.io.InputStream;
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
@@ -40,17 +48,51 @@
public class ClassicPresentationServlet extends HttpServlet
{
- private PresentationServer server = new PresentationServerImpl();
+ private PresentationServer server;
+ public void init() throws ServletException
+ {
+ Document doc;
+ InputStream in = getServletContext().getResourceAsStream("/WEB-INF/page-structure.xml");
+ try
+ {
+ doc = XMLTools.getDocumentBuilderFactory().newDocumentBuilder().parse(in);
+ }
+ catch (Exception e)
+ {
+ throw new ServletException(e);
+ }
+ finally
+ {
+ IOTools.safeClose(in);
+ }
+ //
+ StructuralStateContextImpl structuralStateContext = new StructuralStateContextImpl();
+
+ //
+ ContextNode root = structuralStateContext.getRoot();
+ new NodeImporter(root).importDocument(doc);
+
+ //
+ this.server = new PresentationServerImpl(structuralStateContext);
+ }
+
protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
{
-// WebRequest webRequest = new WebRequest(req);
+ WebRequest webReq = new WebRequest(req);
+ WebResponse webResp = new WebResponse(resp);
- ClassicPresentationClient client = new ClassicPresentationClient(req, resp, server);
+ ClassicPresentationClient client = new ClassicPresentationClient(webReq, webResp, server);
- client.process();
-
+ try
+ {
+ client.process();
+ }
+ catch (PresentationServerException e)
+ {
+ throw new ServletException(e);
+ }
}
}
Added: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/model/PageViewPortScope.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/model/PageViewPortScope.java (rev 0)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/model/PageViewPortScope.java 2008-04-07 09:06:32 UTC (rev 10510)
@@ -0,0 +1,136 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, 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.presentation.classic.model;
+
+import org.jboss.portal.presentation.model2.ViewPortScope;
+import org.jboss.portal.presentation.model2.ObjectTraversalType;
+import org.jboss.portal.presentation.model2.UIObject;
+import org.jboss.portal.presentation.model2.ui.UIPage;
+import org.jboss.portal.presentation.model2.ui.UIWindow;
+import org.jboss.portal.presentation.model2.ui.UIContext;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class PageViewPortScope implements ViewPortScope
+{
+
+ /** . */
+ private static final int NO_PAGE = 0;
+
+ /** . */
+ private static final int PAGE = 1;
+
+ /** . */
+ private static final int PAGE_CHILD = 2;
+
+ /** . */
+ private static final int PAGE_SIBLING = 3;
+
+ /** . */
+ private final String pageId;
+
+ /** . */
+ private int pageStatus;
+
+ public PageViewPortScope(String pageId)
+ {
+ this.pageId = pageId;
+ this.pageStatus = 0;
+ }
+
+ public String getRootId()
+ {
+ return pageId;
+ }
+
+ public ObjectTraversalType enterObject(UIObject object)
+ {
+ if (object instanceof UIPage)
+ {
+ switch (pageStatus)
+ {
+ case NO_PAGE:
+ if (pageId.equals(object.getId()))
+ {
+ pageStatus = PAGE;
+
+ // We want to traverse the children of the default page
+ return ObjectTraversalType.RECURSIVE;
+ }
+ else
+ {
+ pageStatus = PAGE_SIBLING;
+
+ // We want to see the sibbling pages of the default page
+ return ObjectTraversalType.SINGLE;
+ }
+ case PAGE:
+ pageStatus = PAGE_CHILD;
+
+ // We want to see the children pages of the default page
+ return ObjectTraversalType.SINGLE;
+ case PAGE_CHILD:
+ case PAGE_SIBLING:
+ return ObjectTraversalType.SKIP;
+ default:
+ throw new AssertionError();
+ }
+ }
+ else if (object instanceof UIWindow)
+ {
+ // We don't traverse windows (for now as they are supposed to be leaves)
+ return ObjectTraversalType.SINGLE;
+ }
+ else if (object instanceof UIContext)
+ {
+ return ObjectTraversalType.RECURSIVE;
+ }
+ else
+ {
+ return ObjectTraversalType.SKIP;
+ }
+ }
+
+ public void leaveObject(UIObject object)
+ {
+ if (object instanceof UIPage)
+ {
+ switch (pageStatus)
+ {
+ case NO_PAGE:
+ throw new AssertionError();
+ case PAGE:
+ pageStatus = NO_PAGE;
+ break;
+ case PAGE_SIBLING:
+ pageStatus = NO_PAGE;
+ break;
+ case PAGE_CHILD:
+ pageStatus = PAGE;
+ break;
+ }
+ }
+ }
+}
\ No newline at end of file
Added: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionDecoder.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionDecoder.java (rev 0)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionDecoder.java 2008-04-07 09:06:32 UTC (rev 10510)
@@ -0,0 +1,65 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, 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.presentation.classic.protocol;
+
+import org.jboss.portal.presentation.protocol.ProtocolAction;
+import org.jboss.portal.presentation.protocol.ViewUIObjectAction;
+import org.jboss.portal.web.WebRequest;
+
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class ActionDecoder
+{
+
+ public ProtocolAction decode(WebRequest request)
+ {
+
+ ProtocolAction action = null;
+
+ Map<String, String[]> queryParams = request.getQueryParameterMap();
+
+ String[] actionValues = queryParams.get(Constants.ACTION_PARAM);
+
+ if (actionValues != null)
+ {
+ String actionValue = actionValues[0];
+
+ String[] targetIds = queryParams.get(Constants.TARGET_ID_PARAM);
+
+ if (targetIds != null)
+ {
+ String targetId = targetIds[0];
+
+ action = new ViewUIObjectAction(targetId);
+ }
+ }
+
+ //
+ return action;
+ }
+
+}
Added: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionEncoder.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionEncoder.java (rev 0)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionEncoder.java 2008-04-07 09:06:32 UTC (rev 10510)
@@ -0,0 +1,48 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, 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.presentation.classic.protocol;
+
+import org.jboss.portal.presentation.protocol.ProtocolAction;
+import org.jboss.portal.presentation.protocol.ViewUIObjectAction;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class ActionEncoder
+{
+
+ public String encode(ProtocolAction action)
+ {
+ if (action instanceof ViewUIObjectAction)
+ {
+ ViewUIObjectAction viewObjectAction = (ViewUIObjectAction)action;
+
+ //
+ return "/index.html?action=" + Constants.VIEW_UI_OBJECT_ACTION + "&id=" + viewObjectAction.getTargetId();
+ }
+
+ return null;
+ }
+
+}
Added: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/Constants.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/Constants.java (rev 0)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/Constants.java 2008-04-07 09:06:32 UTC (rev 10510)
@@ -0,0 +1,45 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, 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.presentation.classic.protocol;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+final class Constants
+{
+
+ /** . */
+ public static final String ACTION_PARAM = "action";
+
+ /** . */
+ public static final String TARGET_ID_PARAM = "id";
+
+ /** . */
+ public static final String VIEW_UI_OBJECT_ACTION = "view";
+
+ private Constants()
+ {
+ }
+
+}
Added: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/NodeImporter.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/NodeImporter.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/NodeImporter.java 2008-04-07 09:06:32 UTC (rev 10510)
@@ -0,0 +1,107 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, 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.presentation.impl.state.structural;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+import static org.jboss.portal.common.xml.XMLTools.*;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class NodeImporter
+{
+
+ /** The root to import the children to. */
+ private final StructuralNode root;
+
+ public NodeImporter(StructuralNode root)
+ {
+ this.root = root;
+ }
+
+ /**
+ * Imports the specified document.
+ *
+ * @param document the document
+ * @throws IllegalArgumentException if the document is null
+ */
+ public void importDocument(Document document) throws IllegalArgumentException
+ {
+ if (document == null)
+ {
+ throw new IllegalArgumentException();
+ }
+
+ //
+ importContextDef(document.getDocumentElement());
+ }
+
+ private void importContextDef(Element contextDefElt)
+ {
+ // Children pages
+ for (Element childElt : getChildren(contextDefElt, "page-def"))
+ {
+ importPageDef(root, childElt);
+ }
+ }
+
+ private void importPageDef(StructuralNode parentNode, Element pageDefElt)
+ {
+ PageNode pageNode = createStructuralNode(parentNode, PageNode.class, pageDefElt);
+
+ // Sub pages
+ for (Element childElt : getChildren(pageDefElt, "page-def"))
+ {
+ importPageDef(pageNode, childElt);
+ }
+
+ // Windows
+ for (Element childElt : getChildren(pageDefElt, "window-def"))
+ {
+ importWindowDef(pageNode, childElt);
+ }
+ }
+
+ private void importWindowDef(StructuralNode parentNode, Element windowDefElt)
+ {
+ WindowNode windowNode = createStructuralNode(parentNode, WindowNode.class, windowDefElt);
+
+ //
+ Element contentElt = getUniqueChild(windowDefElt, "content", true);
+
+ //
+ String content = asString(contentElt);
+ windowNode.setContent(content);
+ }
+
+ private <T extends StructuralNode> T createStructuralNode(StructuralNode parent, Class<T> type, Element nodeDefElt)
+ {
+ String nodeName = nodeDefElt.getAttribute("name");
+
+ //
+ return parent.addChild(nodeName, type);
+ }
+}
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/StructuralStateContextImpl.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/StructuralStateContextImpl.java 2008-04-07 08:53:27 UTC (rev 10509)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/StructuralStateContextImpl.java 2008-04-07 09:06:32 UTC (rev 10510)
@@ -61,6 +61,17 @@
return Long.toString(sequence.getAndIncrement());
}
+ public StructuralNode getNode(String nodeId)
+ {
+ if (nodeId == null)
+ {
+ throw new IllegalArgumentException();
+ }
+
+ //
+ return nodes.get(nodeId);
+ }
+
public ContextNode getRoot()
{
return root;
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/WindowNode.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/WindowNode.java 2008-04-07 08:53:27 UTC (rev 10509)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/WindowNode.java 2008-04-07 09:06:32 UTC (rev 10510)
@@ -31,6 +31,10 @@
*/
public class WindowNode extends StructuralNode
{
+
+ /** . */
+ private String content;
+
public WindowNode(String name, StructuralStateContextImpl structuralStateContext)
{
super(name, structuralStateContext);
@@ -40,4 +44,14 @@
{
return UIWindow.class;
}
+
+ public void setContent(String content)
+ {
+ this.content = content;
+ }
+
+ public String getContent()
+ {
+ return content;
+ }
}
Added: modules/presentation/trunk/presentation/src/main/resources/org/jboss/portal/presentation/impl/state/stuctural/page_structure_1_0.xsd
===================================================================
--- modules/presentation/trunk/presentation/src/main/resources/org/jboss/portal/presentation/impl/state/stuctural/page_structure_1_0.xsd (rev 0)
+++ modules/presentation/trunk/presentation/src/main/resources/org/jboss/portal/presentation/impl/state/stuctural/page_structure_1_0.xsd 2008-04-07 09:06:32 UTC (rev 10510)
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema
+ targetNamespace="urn:jboss:portal:presentation:page:1.0"
+ xmlns="urn:jboss:portal:presentation:page:1.0"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
+ version="1.0">
+
+ <xsd:element
+ name="context-def"
+ type="contextDefType">
+ <xsd:annotation><xsd:documentation>A jboss-unit is the top container element.</xsd:documentation></xsd:annotation>
+ </xsd:element>
+
+ <xsd:complexType name="nodeDefType">
+ <xsd:sequence>
+ <xsd:element name="properties" type="nodePropertiesType" minOccurs="0" maxOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="namedNodeDefType">
+ <xsd:complexContent>
+ <xsd:extension base="nodeDefType">
+ <xsd:attribute name="name" type="xsd:string" use="required"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="nodePropertiesType">
+ <xsd:sequence>
+ <xsd:element name="property" type="nodePropertyType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="nodePropertyType">
+ <xsd:attribute name="name" type="xsd:string" use="required"/>
+ <xsd:attribute name="value" type="xsd:string" use="required"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="contextDefType">
+ <xsd:complexContent>
+ <xsd:extension base="nodeDefType">
+ <xsd:sequence>
+ <xsd:element name="page-def" type="pageDefType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="pageDefType">
+ <xsd:complexContent>
+ <xsd:extension base="namedNodeDefType">
+ <xsd:sequence>
+ <xsd:element name="page-def" type="pageDefType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="window-def" type="windowDefType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="windowDefType">
+ <xsd:complexContent>
+ <xsd:extension base="namedNodeDefType">
+ <xsd:sequence>
+ <xsd:element name="content" type="contentType"/>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:simpleType name="contentType" >
+ <xsd:restriction base="xsd:string"/>
+ </xsd:simpleType>
+
+</xsd:schema>
18 years
JBoss Portal SVN: r10509 - in branches/JBoss_Portal_Branch_2_7: core-admin and 9 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-04-07 04:53:27 -0400 (Mon, 07 Apr 2008)
New Revision: 10509
Added:
branches/JBoss_Portal_Branch_2_7/core-admin/src/etc/sun-jsf/portletbridge-api-1.0.0-SNAPSHOT.jar
branches/JBoss_Portal_Branch_2_7/core-admin/src/etc/sun-jsf/portletbridge-impl-1.0.0-SNAPSHOT.jar
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/confirm.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editPageErrorHandling.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editPageLayout.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editPortalErrorHandling.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editPreferences.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editProperties.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editSecurity.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editTheme.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editWindowTheme.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/showPortletDetails.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/tabContainer.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/confirmDeleteInstance.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/dashboard/
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/dashboard/dashboard.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/dashboards.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/dashboardsTemplate.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/displayNameObject.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editContext.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editPage.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editPageLayout.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editPageSecurity.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editPageTheme.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editPortalSecurity.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editPortalTheme.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editProperties.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editWindow.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editWindowSecurity.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editWindowTheme.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/instances.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/instancesTemplate.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/objectNavigation.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/objectTemplate.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/objects.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/portlets.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/portletsTemplate.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/renameObject.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/newWindowTpl.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/newWindowWizardConfirm.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/selectPage.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/selectPortal.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/selectPortlet.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/selectRegion.xhtml
Removed:
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/
Modified:
branches/JBoss_Portal_Branch_2_7/core-admin/build.xml
branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/PortalInstanceDisplayNameAction.java
branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/PortalObjectDisplayNameAction.java
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/WEB-INF/jboss-portlet.xml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/WEB-INF/portlet.xml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/WEB-INF/web.xml
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-war/WEB-INF/jsp/content/portlet_editor.jsp
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/JSFInvocation.java
Log:
Make the admin portlet use the JBoss Portlet Bridge.
(Will still need to move the portletbridge libs out of the sources with a non Snapshot release)
Modified: branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-war/WEB-INF/jsp/content/portlet_editor.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-war/WEB-INF/jsp/content/portlet_editor.jsp 2008-04-07 01:23:46 UTC (rev 10508)
+++ branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-war/WEB-INF/jsp/content/portlet_editor.jsp 2008-04-07 08:53:27 UTC (rev 10509)
@@ -1,173 +1,200 @@
-<%@ page import="org.jboss.portal.common.i18n.LocalizedString" %>
<%@ page import="org.jboss.portal.common.util.IteratorStatus" %>
<%@ page import="org.jboss.portal.core.model.instance.Instance" %>
-<%@ page import="org.jboss.portal.core.portlet.info.PortletIconInfo" %>
-<%@ page import="org.jboss.portal.core.portlet.info.PortletInfoInfo" %>
-<%@ page import="org.jboss.portal.core.ui.content.portlet.PortletContentEditorPortlet" %>
+<%@ page import="org.jboss.portal.portlet.Portlet" %>
+<%@ page import="org.jboss.portal.portlet.PortletInvokerException" %>
+<%@ page import="org.jboss.portal.portlet.info.MetaInfo" %>
+<%@ page import="java.util.Collection" %>
<%@ page language="java" %>
<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %>
<%
- Collection instances = (Collection)request.getAttribute("INSTANCES");
- Instance selectedInstance = (Instance)request.getAttribute("SELECTED_INSTANCE");
+ Collection instances = (Collection)request.getAttribute("INSTANCES");
+ Instance selectedInstance = (Instance)request.getAttribute("SELECTED_INSTANCE");
%>
-<%@page import="org.jboss.portal.portlet.Portlet" %>
-<%@page import="org.jboss.portal.portlet.PortletInvokerException" %>
-<%@page import="org.jboss.portal.portlet.info.MetaInfo" %>
-<%@page import="org.jboss.portal.portlet.info.PortletInfo" %>
-<%@page import="java.util.Collection" %>
-<%@ page import="java.util.Locale" %>
+<%@page import="org.jboss.portal.portlet.info.PortletInfo"%>
+<%@page import="org.jboss.portal.core.portlet.info.CorePortletInfo"%>
+<%@page import="org.jboss.portal.core.portlet.info.PortletInfoInfo"%>
+<%@page import="org.jboss.portal.core.portlet.info.PortletIconInfo"%>
+<%@page import="org.jboss.portal.core.ui.content.portlet.PortletContentEditorPortlet"%>
+<%@ page import="javax.portlet.PortletURL" %>
+<%@ page import="java.net.URLEncoder" %>
<portlet:defineObjects/>
<script type='text/javascript' src='/portal-admin/js/domLib.js'></script>
<script type="text/javascript" src="/portal-admin/js/fadomatic.js"></script>
<script type='text/javascript' src='/portal-admin/js/domTT.js'></script>
<script type="text/javascript">
- //<![CDATA[
- var domTT_styleClass = 'domTTOverlib';
- var domTT_maxWidth = false;
- //]]>
+ //<![CDATA[
+ var domTT_styleClass = 'domTTOverlib';
+ var domTT_maxWidth = false;
+ //]]>
+ //This function checks for a previousSibling in the DOM and it must be a form
+ //generated by JSF. otherwise the actionURL will be treated as a regular link
+ //for non-JSF environment
+ //
+ //For JSF use:
+ //<h:form></h:form>
+ //<jbp:portlet
+ //...
+ function submitForm(actionUrl){
+ var jsfForm;
+ try{
+ //ie is normal
+ if(document.getElementById('bilto').previousSibling.nodeName.toLowerCase() == 'form'){
+ jsfForm = document.getElementById('bilto').previousSibling;
+ }else{
+ //firefox adds that extra text node
+ jsfForm = document.getElementById('bilto').previousSibling.previousSibling;
+ }
+ }catch(e){
+
+ }
+
+ if (jsfForm.nodeName.toLowerCase() == 'form'){
+ jsfForm.action = actionUrl;
+ jsfForm.submit();
+ }else{
+ window.location = actionUrl;
+ }
+ }
+
</script>
<table style="width:500px;">
<tr>
- <td><h3 class="sectionTitle tenpx-top-bottom">Portlet instance associated to this window:</h3></td>
+ <td><h3 class="sectionTitle tenpx-top-bottom">Portlet instance associated to this window:</h3></td>
</tr>
<%
- Locale locale = renderRequest.getLocale();
- if (selectedInstance != null)
- {
- String displayName = selectedInstance.getDisplayName().getString(locale, true);
- if (displayName == null)
- {
- displayName = selectedInstance.getId();
- }
+ if (selectedInstance != null)
+ {
+ String displayName = selectedInstance.getDisplayName().getString(renderRequest.getLocale(), true);
+ if (displayName == null)
+ {
+ displayName = selectedInstance.getId();
+ }
%>
-<%
- Portlet portlet = null;
- try
- {
- portlet = selectedInstance.getPortlet();
- }
- catch (PortletInvokerException e)
- {
- e.printStackTrace();
- }
- if (portlet != null)
- {
- PortletInfo info = portlet.getInfo();
- MetaInfo metaInfo = info.getMeta();
- String iconLocation = getIcon(info);
-%>
+ <%
+ Portlet portlet = null;
+ try
+ {
+ portlet = selectedInstance.getPortlet();
+ }
+ catch (PortletInvokerException e)
+ {
+ e.printStackTrace();
+ }
+ if (portlet != null)
+ {
+ MetaInfo metaInfo = portlet.getInfo().getMeta();
+
+ PortletInfo info = portlet.getInfo();
+
+ String iconLocation = getIcon(info);
+
+ %>
<tr class="portlet-section-selected">
- <td>
- <img src="<%= iconLocation %>" align="middle" style="margin:0 4px 0 0" alt="icon"/>
- <span><%= displayName %></span>
+ <td >
+ <img src="<%= iconLocation %>" align="middle" style="margin:0 4px 0 0"/>
+ <span><%= displayName %></span>
- <div>
- <span class="portlet-form-field-label">Portlet name:</span><%= displayName %>
- </div>
- <div>
- <span class="portlet-form-field-label">Portlet description:</span>
- <%= getLocalizedValue(metaInfo.getMetaValue(MetaInfo.DESCRIPTION), locale) %>
- </div>
+ <div>
+ <span class="portlet-form-field-label">Portlet name:</span><%= metaInfo.getMetaValue(MetaInfo.DISPLAY_NAME).getDefaultString() %>
+ </div>
+ <div>
+ <span class="portlet-form-field-label">Portlet description:</span><%= metaInfo.getMetaValue(MetaInfo.DESCRIPTION).getDefaultString() %>
+ </div>
+
+ </td>
+ </tr>
+ <%
+ }
+ }
- </td>
-</tr>
-<%
- }
- }
+ %>
-%>
+ <tr>
+<td>
-<tr>
- <td>
+<div style="height:300px; width:500px; overflow: auto; overflow-x: hidden; border: 1px solid #333;">
- <div style="height:300px; width:500px; overflow: auto; overflow-x: hidden; border: 1px solid #333;">
- <table style="width:100%;" cellspacing="0" cellpadding="0">
- <%
- for (IteratorStatus i = new IteratorStatus(instances); i.hasNext();)
- {
+ <table style="width:100%;" cellspacing="0" cellpadding="0">
+ <%
+ for (IteratorStatus i = new IteratorStatus(instances); i.hasNext();)
+ {
Instance instance = (Instance)i.next();
String rowClass = instance == selectedInstance ? "portlet-section-selected" : (i.getIndex() % 2 == 0 ? "portlet-section-body" : "portlet-section-alternate");
- String displayName = instance.getDisplayName().getString(locale, true);
- PortletInfo info = instance.getPortlet().getInfo();
- MetaInfo portletMetaInfo = info.getMeta();
+ String displayName = instance.getDisplayName().getString(renderRequest.getLocale(), true);
+ MetaInfo portletMetaInfo = instance.getPortlet().getInfo().getMeta();
if (displayName == null)
{
- displayName = instance.getId();
+ displayName = instance.getId();
}
+
+ PortletInfo info = instance.getPortlet().getInfo();
String iconLocation = getIcon(info);
- %>
- <portlet:actionURL var="url">
- <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 %>">
- <div class="toolbar" style="width: 250px;">
- <div class="title"><%= getLocalizedValue(portletMetaInfo.getMetaValue(MetaInfo.TITLE), locale) %>
- </div>
- </div>
- <div class="content">
- <div><span class="portlet-form-field-label">Portlet name:</span><%= displayName %>
- </div>
- <div><span class="portlet-form-field-label">Portlet description:</span>
- <%= getLocalizedValue(portletMetaInfo.getMetaValue(MetaInfo.DESCRIPTION), locale) %>
- </div>
- </div>
- </div>
- </div>
+ %>
+ <portlet:actionURL var="test">
+ <portlet:param name="content.action.select" value="true"/>
+ <portlet:param name="content.uri" value="<%= instance.getId() %>"/>
+ </portlet:actionURL>
- <tr class="<%= rowClass %>">
- <td>
- <img src="<%= iconLocation %>" align="middle" style="margin:0 4px 0 0" alt="icon"/>
- <span onmouseover="domTT_activate(this, event, 'content', document.getElementById('info-container-<%= displayName %>'),'delay', 0, 'trail', false, 'fade', 'both', 'fadeMax', 95, 'styleClass', 'none');"><a
- href="<%= url %>" id="portlet-instance-link"><%= displayName %>
- </a></span></td>
- </tr>
- <%
- }
- %>
- </table>
- </div>
+ <div style="display:none">
+ <div class="darktip" id="info-container-<%= displayName %>">
+ <div class="toolbar" style="width: 250px;">
+ <div class="title"><%= portletMetaInfo.getMetaValue(MetaInfo.TITLE).getDefaultString() %></div>
+ </div>
+ <div class="content">
+
+ <div>
+ <span class="portlet-form-field-label">Portlet name:</span><%= portletMetaInfo.getMetaValue(MetaInfo.DISPLAY_NAME).getDefaultString() %>
+ </div>
+ <div>
+ <span class="portlet-form-field-label">Portlet description:</span><%= portletMetaInfo.getMetaValue(MetaInfo.DESCRIPTION).getDefaultString() %>
+ </div>
+ </div>
+ </div>
+
+ </div>
+
+ <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="javascript:void(0);" onclick="submitForm('<%= test %>');return false" id="portlet-instance-link"><%= displayName %></a></span>
+ </td>
+ </tr>
+ <%
+ }
+ %>
+ </table>
+</div>
</td>
-</tr>
+ </tr>
</table>
<%!
- private String getIcon(PortletInfo info)
- {
- String iconLocation = PortletContentEditorPortlet.DEFAULT_PORTLET_ICON;
- PortletInfoInfo portletInfo = info.getAttachment(PortletInfoInfo.class);
-
- if (portletInfo != null)
- {
- PortletIconInfo iconInfo = portletInfo.getPortletIconInfo();
- if (iconInfo != null && iconInfo.getIconLocation(PortletIconInfo.SMALL) != null)
+ private String getIcon(PortletInfo info)
+ {
+ String iconLocation = null;
+ if (info instanceof CorePortletInfo)
{
- iconLocation = iconInfo.getIconLocation(PortletIconInfo.SMALL);
+ CorePortletInfo cInfo = (CorePortletInfo)info;
+ PortletInfoInfo portletInfo = cInfo.getPortletInfo();
+ if (portletInfo != null && portletInfo.getPortletIconInfo() != null && portletInfo.getPortletIconInfo().getIconLocation(PortletIconInfo.SMALL) != null)
+ {
+ iconLocation = portletInfo.getPortletIconInfo().getIconLocation(PortletIconInfo.SMALL);
+ }
}
- }
-
- return iconLocation;
- }
-
- private String getLocalizedValue(LocalizedString locString, Locale locale)
- {
- String value = "";
- if (locString != null)
- {
- value = locString.getString(locale, true);
- }
-
- return value;
- }
+ if (iconLocation == null)
+ {
+ iconLocation = PortletContentEditorPortlet.DEFAULT_PORTLET_ICON;
+ }
+ return iconLocation;
+ }
%>
\ No newline at end of file
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/build.xml 2008-04-07 01:23:46 UTC (rev 10508)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/build.xml 2008-04-07 08:53:27 UTC (rev 10509)
@@ -95,12 +95,18 @@
<path refid="jboss.cache.classpath"/>
<path refid="jbossas/core.libs.classpath"/>
<path refid="hibernate.hibernate.classpath"/>
- <path refid="apache.myfaces.classpath"/>
+ <path refid="sun.jsf.classpath"/>
<path refid="apache.log4j.classpath"/>
<path refid="sun.servlet.classpath"/>
<path refid="facelets.facelets.classpath"/>
<path refid="el.el.classpath"/>
- <pathelement location="${source.etc}/sun-jsf/jsf-example.jar"/>
+ <pathelement location="${source.etc}/sun-jsf/jsf-facelets-1.1.14.jar"/>
+ <pathelement location="${source.etc}/sun-jsf/portletbridge-api-1.0.0-SNAPSHOT.jar"/>
+ <pathelement location="${source.etc}/sun-jsf/portletbridge-impl-1.0.0-SNAPSHOT.jar"/>
+ <pathelement location="${source.etc}/sun-jsf/richfaces-api-3.1.4.SR1.jar"/>
+ <pathelement location="${source.etc}/sun-jsf/richfaces-impl-3.1.4.SR1.jar"/>
+ <pathelement location="${source.etc}/sun-jsf/richfaces-ui-3.1.4.SR1.jar"/>
+
</path>
<!-- Configure modules -->
@@ -186,14 +192,16 @@
</jar>
<!-- portal-admin.war -->
- <copy todir="${build.resources}/portal-admin-war/WEB-INF/lib2">
- <fileset dir="${apache.myfaces.lib}" includes="myfaces-api.jar,myfaces-impl.jar,jstl.jar"/>
- <fileset dir="${build.lib}" includes="portal-core-admin-lib.jar"/>
- <fileset dir="${jboss.portal-faces.root}/lib" includes="portal-faces-lib.jar"/>
- <fileset dir="../core-admin/src/etc/sun-jsf" includes="jsf-example.jar"/>
- <fileset dir="${facelets.facelets.lib}" includes="jsf-facelets.jar"/>
- <fileset dir="${el.el.lib}" includes="el-api.jar,el-ri.jar"/>
- <fileset dir="${commons.el.lib}" includes="commons-el.jar"/>
+ <copy todir="${build.resources}/portal-admin-war/WEB-INF/lib">
+ <fileset dir="${apache.myfaces.lib}" includes="jstl.jar"/>
+ <fileset dir="../core-admin/src/etc/sun-jsf" includes="jsf-facelets-1.1.14.jar"/>
+ <fileset dir="../core-admin/src/etc/sun-jsf" includes="portletbridge-api-1.0.0-SNAPSHOT.jar"/>
+ <fileset dir="../core-admin/src/etc/sun-jsf" includes="portletbridge-impl-1.0.0-SNAPSHOT.jar"/>
+ <fileset dir="../core-admin/src/etc/sun-jsf" includes="richfaces-api-3.1.4.SR1.jar"/>
+ <fileset dir="../core-admin/src/etc/sun-jsf" includes="richfaces-impl-3.1.4.SR1.jar"/>
+ <fileset dir="../core-admin/src/etc/sun-jsf" includes="richfaces-ui-3.1.4.SR1.jar"/>
+ <fileset dir="${build.lib}" includes="portal-core-admin-lib.jar"/>
+ <fileset dir="${jboss.portal-faces.root}/lib" includes="portal-faces-lib.jar"/>
<fileset dir="${apache.beanutils.lib}" includes="commons-beanutils.jar"/>
<fileset dir="${apache.digester.lib}" includes="commons-digester.jar"/>
<fileset dir="${apache.lang.lib}" includes="commons-lang.jar"/>
Added: branches/JBoss_Portal_Branch_2_7/core-admin/src/etc/sun-jsf/portletbridge-api-1.0.0-SNAPSHOT.jar
===================================================================
(Binary files differ)
Property changes on: branches/JBoss_Portal_Branch_2_7/core-admin/src/etc/sun-jsf/portletbridge-api-1.0.0-SNAPSHOT.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/JBoss_Portal_Branch_2_7/core-admin/src/etc/sun-jsf/portletbridge-impl-1.0.0-SNAPSHOT.jar
===================================================================
(Binary files differ)
Property changes on: branches/JBoss_Portal_Branch_2_7/core-admin/src/etc/sun-jsf/portletbridge-impl-1.0.0-SNAPSHOT.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/PortalInstanceDisplayNameAction.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/PortalInstanceDisplayNameAction.java 2008-04-07 01:23:46 UTC (rev 10508)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/PortalInstanceDisplayNameAction.java 2008-04-07 08:53:27 UTC (rev 10509)
@@ -67,6 +67,16 @@
private DisplayNameBean displayNameBean;
+ public Object getBean()
+ {
+ return bean;
+ }
+
+ public void setBean(Object bean)
+ {
+ this.bean = bean;
+ }
+
public void addDisplayName() throws ConversionException
{
if (newText != null)
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/PortalObjectDisplayNameAction.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/PortalObjectDisplayNameAction.java 2008-04-07 01:23:46 UTC (rev 10508)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/PortalObjectDisplayNameAction.java 2008-04-07 08:53:27 UTC (rev 10509)
@@ -57,6 +57,16 @@
private DisplayNameBean displayNameBean;
+ public Object getBean()
+ {
+ return bean;
+ }
+
+ public void setBean(Object bean)
+ {
+ this.bean = bean;
+ }
+
public void addDisplayName() throws ConversionException
{
if (newText != null)
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml 2008-04-07 01:23:46 UTC (rev 10508)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml 2008-04-07 08:53:27 UTC (rev 10509)
@@ -28,9 +28,16 @@
<faces-config>
<application>
+ <view-handler>
+ org.jboss.portletbridge.application.PortletViewHandler
+ </view-handler>
<property-resolver>org.jboss.portal.core.admin.ui.AdminPropertyResolver</property-resolver>
- <view-handler>com.sun.facelets.FaceletPortletViewHandler</view-handler>
- </application>
+ </application>
+ <factory>
+ <faces-context-factory>
+ org.jboss.portletbridge.context.FacesContextFactoryImpl
+ </faces-context-factory>
+ </factory>
<converter>
<converter-for-class>org.jboss.portal.core.model.content.ContentType</converter-for-class>
@@ -387,105 +394,105 @@
<navigation-rule>
<navigation-case>
<from-outcome>index</from-outcome>
- <to-view-id>/WEB-INF/jsf/objects.xhtml</to-view-id>
+ <to-view-id>/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>
+ <to-view-id>/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>
+ <to-view-id>/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>
+ <to-view-id>/jsf/objects.xhtml</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>editPortalSecurity</from-outcome>
- <to-view-id>/WEB-INF/jsf/editPortalSecurity.xhtml</to-view-id>
+ <to-view-id>/jsf/editPortalSecurity.xhtml</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>editPortalTheme</from-outcome>
- <to-view-id>/WEB-INF/jsf/editPortalTheme.xhtml</to-view-id>
+ <to-view-id>/jsf/editPortalTheme.xhtml</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>editPageLayout</from-outcome>
- <to-view-id>/WEB-INF/jsf/editPageLayout.xhtml</to-view-id>
+ <to-view-id>/jsf/editPageLayout.xhtml</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>editPageSecurity</from-outcome>
- <to-view-id>/WEB-INF/jsf/editPageSecurity.xhtml</to-view-id>
+ <to-view-id>/jsf/editPageSecurity.xhtml</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>editProperties</from-outcome>
- <to-view-id>/WEB-INF/jsf/editProperties.xhtml</to-view-id>
+ <to-view-id>/jsf/editProperties.xhtml</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>editPageTheme</from-outcome>
- <to-view-id>/WEB-INF/jsf/editPageTheme.xhtml</to-view-id>
+ <to-view-id>/jsf/editPageTheme.xhtml</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>editWindowSecurity</from-outcome>
- <to-view-id>/WEB-INF/jsf/editWindowSecurity.xhtml</to-view-id>
+ <to-view-id>/jsf/editWindowSecurity.xhtml</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>renameObject</from-outcome>
- <to-view-id>/WEB-INF/jsf/renameObject.xhtml</to-view-id>
+ <to-view-id>/jsf/renameObject.xhtml</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>editDisplayNames</from-outcome>
- <to-view-id>/WEB-INF/jsf/displayNameObject.xhtml</to-view-id>
+ <to-view-id>/jsf/displayNameObject.xhtml</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>editWindowTheme</from-outcome>
- <to-view-id>/WEB-INF/jsf/editWindowTheme.xhtml</to-view-id>
+ <to-view-id>/jsf/editWindowTheme.xhtml</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>instances</from-outcome>
- <to-view-id>/WEB-INF/jsf/instances.xhtml</to-view-id>
+ <to-view-id>/jsf/instances.xhtml</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>portlets</from-outcome>
- <to-view-id>/WEB-INF/jsf/portlets.xhtml</to-view-id>
+ <to-view-id>/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>
+ <to-view-id>/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>
+ <to-view-id>/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>
+ <to-view-id>/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>
+ <to-view-id>/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>
+ <to-view-id>/jsf/wizard/newWindowWizardConfirm.xhtml</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>dashboards</from-outcome>
- <to-view-id>/WEB-INF/jsf/dashboards.xhtml</to-view-id>
+ <to-view-id>/jsf/dashboards.xhtml</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>dashboard</from-outcome>
- <to-view-id>/WEB-INF/jsf/dashboard/dashboard.xhtml</to-view-id>
+ <to-view-id>/jsf/dashboard/dashboard.xhtml</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>confirm</from-outcome>
- <to-view-id>/WEB-INF/jsf/common/confirm.xhtml</to-view-id>
+ <to-view-id>/jsf/common/confirm.xhtml</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>confirmDeleteInstance</from-outcome>
- <to-view-id>/WEB-INF/jsf/confirmDeleteInstance.xhtml</to-view-id>
+ <to-view-id>/jsf/confirmDeleteInstance.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/WEB-INF/jboss-portlet.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/WEB-INF/jboss-portlet.xml 2008-04-07 01:23:46 UTC (rev 10508)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/WEB-INF/jboss-portlet.xml 2008-04-07 08:53:27 UTC (rev 10509)
@@ -35,6 +35,9 @@
<trans-attribute>Required</trans-attribute>
</transaction>
<header-content>
+ <script src="/faces/rfRes/org/ajax4jsf/framework.pack.js" type="text/javascript" ></script>
+ <script src="/faces/rfRes/org/richfaces/ui.pack.js" type="text/javascript" ></script>
+ <link rel="stylesheet" type="text/css" href="/faces/rfRes/org/richfaces/skin.xcss" />
<link rel="stylesheet" type="text/css" href="/css/style.css" media="screen"/>
</header-content>
<portlet-info>
@@ -53,6 +56,9 @@
<trans-attribute>Required</trans-attribute>
</transaction>
<header-content>
+ <script src="/faces/rfRes/org/ajax4jsf/framework.pack.js" type="text/javascript" ></script>
+ <script src="/faces/rfRes/org/richfaces/ui.pack.js" type="text/javascript" ></script>
+ <link rel="stylesheet" type="text/css" href="/faces/rfRes/org/richfaces/skin.xcss" />
<link rel="stylesheet" type="text/css" href="/css/style.css" media="screen"/>
</header-content>
<portlet-info>
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/WEB-INF/portlet.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/WEB-INF/portlet.xml 2008-04-07 01:23:46 UTC (rev 10508)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/WEB-INF/portlet.xml 2008-04-07 08:53:27 UTC (rev 10509)
@@ -31,11 +31,15 @@
<description>Administration Portlet</description>
<portlet-name>AdminPortlet</portlet-name>
<display-name>Administration Portlet</display-name>
- <portlet-class>org.jboss.portal.faces.loader.FacesPortlet</portlet-class>
+ <portlet-class>javax.portlet.faces.GenericFacesPortlet</portlet-class>
<init-param>
- <name>default-view</name>
- <value>/WEB-INF/jsf/objects.xhtml</value>
+ <name>javax.portlet.faces.defaultViewId.view</name>
+ <value>/jsf/objects.xhtml</value>
</init-param>
+ <init-param>
+ <name>javax.portlet.faces.preserveActionParams</name>
+ <value>true</value>
+ </init-param>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>VIEW</portlet-mode>
@@ -49,11 +53,15 @@
<description>Dashboard Configurator Portlet</description>
<portlet-name>DashboardConfigPortlet</portlet-name>
<display-name>Dashboard Configurator Portlet</display-name>
- <portlet-class>org.jboss.portal.faces.loader.FacesPortlet</portlet-class>
+ <portlet-class>javax.portlet.faces.GenericFacesPortlet</portlet-class>
<init-param>
- <name>default-view</name>
- <value>/WEB-INF/jsf/dashboard/dashboard.xhtml</value>
+ <name>javax.portlet.faces.defaultViewId.view</name>
+ <value>/jsf/dashboard/dashboard.xhtml</value>
</init-param>
+ <init-param>
+ <name>javax.portlet.faces.preserveActionParams</name>
+ <value>true</value>
+ </init-param>
<expiration-cache>0</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/WEB-INF/web.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/WEB-INF/web.xml 2008-04-07 01:23:46 UTC (rev 10508)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/WEB-INF/web.xml 2008-04-07 08:53:27 UTC (rev 10509)
@@ -28,57 +28,84 @@
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
- <!-- MyFaces specific configuration -->
<context-param>
- <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
- <param-value>true</param-value>
- </context-param>
+ <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
+ <param-value>org.jboss.portletbridge.application.FaceletPortletViewHandler</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>javax.portlet.faces.renderPolicy</param-name>
+ <param-value>ALWAYS_DELEGATE</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>javax.portlet.faces.preserveActionParams</param-name>
+ <param-value>true</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>org.ajax4jsf.RESOURCE_URI_PREFIX</param-name>
+ <param-value>rfRes</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>org.richfaces.LoadStyleStrategy</param-name>
+ <param-value>NONE</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>org.richfaces.LoadScriptStrategy</param-name>
+ <param-value>NONE</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
+ <param-value>false</param-value>
+ </context-param>
+
+ <!-- JSF -->
+
<context-param>
- <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
- <param-value>false</param-value>
- </context-param>
- <context-param>
- <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
- <param-value>false</param-value>
- </context-param>
- <context-param>
- <param-name>org.apache.myfaces.CHECK_EXTENSIONS_FILTER</param-name>
- <param-value>false</param-value>
- </context-param>
- <context-param>
- <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
- <param-value>true</param-value>
- </context-param>
+ <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+ <param-value>.xhtml</param-value>
+ </context-param>
- <!-- Facelet configuration -->
+ <context-param>
+ <param-name>facelets.DEVELOPMENT</param-name>
+ <param-value>true</param-value>
+ </context-param>
+
<context-param>
- <param-name>facelets.DEVELOPMENT</param-name>
- <param-value>false</param-value>
- </context-param>
- <context-param>
- <param-name>facelets.SKIP_COMMENTS</param-name>
- <param-value>true</param-value>
- </context-param>
- <context-param>
<param-name>facelets.LIBRARIES</param-name>
<param-value>/WEB-INF/portal.taglib.xml</param-value>
</context-param>
- <!-- JSF configuration -->
- <context-param>
- <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
- <param-value>.xhtml</param-value>
- </context-param>
- <context-param>
- <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
- <param-value>server</param-value>
- </context-param>
+ <filter>
+ <display-name>Ajax4jsf Filter</display-name>
+ <filter-name>ajax4jsf</filter-name>
+ <filter-class>org.ajax4jsf.Filter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>ajax4jsf</filter-name>
+ <servlet-name>FacesServlet</servlet-name>
+ <dispatcher>FORWARD</dispatcher>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
+ </filter-mapping>
- <!-- The JSF servlet -->
- <servlet>
- <servlet-name>Faces Servlet</servlet-name>
- <servlet-class>org.jboss.portal.faces.loader.FacesLoaderServlet</servlet-class>
- <load-on-startup>1</load-on-startup>
- </servlet>
-
+ <servlet>
+ <servlet-name>FacesServlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>FacesServlet</servlet-name>
+ <url-pattern>/faces/*</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>10</session-timeout>
+ </session-config>
+
</web-app>
Added: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/confirm.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/confirm.xhtml (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/confirm.xhtml 2008-04-07 08:53:27 UTC (rev 10509)
@@ -0,0 +1,56 @@
+<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:jbp="http://www.jboss.org/portal"
+ xmlns:c="http://java.sun.com/jstl/core"
+ class="admin-ui">
+
+ <ui:composition template="../objectTemplate.xhtml">
+
+ <ui:param name="portalObjectScreen" value="Delete"/>
+ <ui:define name="content">
+
+ <f:subview rendered="#{empty portalobjectmgr.selectedDeletingObject}">
+ <p class="portlet-msg-error">Inconsistent state</p>
+ </f:subview>
+
+ <f:subview rendered="#{not empty portalobjectmgr.selectedDeletingObject}">
+
+
+ <div class="portlet-msg">
+ <div class="portlet-msg-icon"><h:graphicImage url="/img/msgIcon_Warning.gif" alt="/!\"/></div>
+ <div class="portlet-msg-body">
+ <h3>Delete <h:outputText value="#{portalobjectmgr.selectedObjectType}"/></h3>
+
+ <p class="portlet-msg-alert">
+ WARNING! You are about to delete the
+ <span class="objectName">#{portalobjectmgr.selectedObject.name}</span>
+ #{portalobjectmgr.selectedObject.typeName} from the
+ <c:if test="#{not empty portalobjectmgr.selectedObjectParent.name}">
+ <span class="objectName">#{portalobjectmgr.selectedObjectParent.name}</span>
+ </c:if>
+ #{portalobjectmgr.selectedObjectParent.typeName}!
+ </p>
+
+ <p class="portlet-class">Are you sure you want to delete this #{portalobjectmgr.selectedObjectType}?</p>
+
+ <h:form>
+ <h:commandButton value="Delete" action="objects" actionListener="#{portalobjectmgr.destroyObject}"
+ styleClass="portlet-form-button portlet-section-buttonrow">
+ <f:attribute name="objectId" value="#{portalobjectmgr.selectedDeletingObject.id}"/>
+ </h:commandButton>
+ <h:commandButton value="Cancel" action="objects"
+ actionListener="#{portalobjectmgr.selectParentObject}"
+ styleClass="portlet-form-button portlet-section-buttonrow"/>
+ </h:form>
+ </div>
+ </div>
+ </f:subview>
+
+ </ui:define>
+
+ </ui:composition>
+
+</div>
\ No newline at end of file
Added: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editPageErrorHandling.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editPageErrorHandling.xhtml (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editPageErrorHandling.xhtml 2008-04-07 08:53:27 UTC (rev 10509)
@@ -0,0 +1,146 @@
+<ui:composition 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">
+
+<p class="portlet-area-header">Page Error Handling</p>
+
+<div class="portlet-area-body">
+<!-- defines error handeling section -->
+<table cellpadding="0" cellspacing="0" width="100%">
+<tr>
+ <th class="portlet-section-title">Configure how the system handles errors on page level.</th>
+</tr>
+<tr>
+<td valign="top" class="portlet-section-body">
+
+
+<h:form>
+<table class="datatable full-width">
+<thead class="portlet-section-header">
+ <tr>
+ <th>Case</th>
+ <th>Inheritance</th>
+ <th>Action</th>
+ </tr>
+</thead>
+<tbody>
+<tr class="portlet-section-body">
+ <td>
+ <h:outputText value="#{properties.pageControlAccessDenied.displayName}"/>
+ </td>
+ <td>
+ <h:selectBooleanCheckbox disabled="#{!properties.pageControlAccessDenied.inheritable}"
+ onclick="submit();"
+ valueChangeListener="#{properties.pageControlAccessDenied.inherit}"
+ value="#{properties.pageControlAccessDenied.inherited}"/>inherit action
+ from parent
+ </td>
+ <td>
+ <h:selectOneMenu value="#{properties.pageControlAccessDenied.value}"
+ disabled="#{properties.pageControlAccessDenied.inherited}" onchange="submit();">
+ <f:selectItems value="#{properties.pageSelectItems}"/>
+ </h:selectOneMenu>
+ </td>
+</tr>
+<tr class="portlet-section-alternate">
+ <td>
+ <h:outputText value="#{properties.pageControlUnavailable.displayName}"/>
+ </td>
+ <td>
+ <h:selectBooleanCheckbox disabled="#{!properties.pageControlUnavailable.inheritable}"
+ onclick="submit();"
+ valueChangeListener="#{properties.pageControlUnavailable.inherit}"
+ value="#{properties.pageControlUnavailable.inherited}"/>inherit action
+ from parent
+ </td>
+ <td>
+ <h:selectOneMenu value="#{properties.pageControlUnavailable.value}"
+ disabled="#{properties.pageControlUnavailable.inherited}" onchange="submit();">
+ <f:selectItems value="#{properties.pageSelectItems}"/>
+ </h:selectOneMenu>
+ </td>
+</tr>
+<tr class="portlet-section-body">
+ <td>
+ <h:outputText value="#{properties.pageControlError.displayName}"/>
+ </td>
+ <td>
+ <h:selectBooleanCheckbox disabled="#{!properties.pageControlError.inheritable}"
+ onclick="submit();"
+ valueChangeListener="#{properties.pageControlError.inherit}"
+ value="#{properties.pageControlError.inherited}"/>inherit action from
+ parent
+ </td>
+ <td>
+ <h:selectOneMenu value="#{properties.pageControlError.value}"
+ disabled="#{properties.pageControlError.inherited}" onchange="submit();">
+ <f:selectItems value="#{properties.pageSelectItems}"/>
+ </h:selectOneMenu>
+ </td>
+</tr>
+<tr class="portlet-section-alternate">
+ <td>
+ <h:outputText value="#{properties.pageControlInternalError.displayName}"/>
+ </td>
+ <td>
+ <h:selectBooleanCheckbox disabled="#{!properties.pageControlInternalError.inheritable}"
+ onclick="submit();"
+ valueChangeListener="#{properties.pageControlInternalError.inherit}"
+ value="#{properties.pageControlInternalError.inherited}"/>inherit action
+ from parent
+ </td>
+ <td>
+ <h:selectOneMenu value="#{properties.pageControlInternalError.value}"
+ disabled="#{properties.pageControlInternalError.inherited}" onchange="submit();">
+ <f:selectItems value="#{properties.pageSelectItems}"/>
+ </h:selectOneMenu>
+ </td>
+</tr>
+<tr class="portlet-section-body">
+ <td>
+ <h:outputText value="#{properties.pageControlNotFound.displayName}"/>
+ </td>
+ <td>
+ <h:selectBooleanCheckbox disabled="#{!properties.pageControlNotFound.inheritable}"
+ onclick="submit();"
+ valueChangeListener="#{properties.pageControlNotFound.inherit}"
+ value="#{properties.pageControlNotFound.inherited}"/>inherit action from
+ parent
+ </td>
+ <td>
+ <h:selectOneMenu value="#{properties.pageControlNotFound.value}"
+ disabled="#{properties.pageControlNotFound.inherited}" onchange="submit();">
+ <f:selectItems value="#{properties.pageSelectItems}"/>
+ </h:selectOneMenu>
+ </td>
+</tr>
+<tr class="portlet-section-alternate">
+ <td>
+ <h:outputText value="#{properties.pageControlResourceURI.displayName}"/>
+ </td>
+ <td>
+ <h:selectBooleanCheckbox disabled="#{!properties.pageControlResourceURI.inheritable}"
+ onclick="submit();"
+ valueChangeListener="#{properties.pageControlResourceURI.inherit}"
+ value="#{properties.pageControlResourceURI.inherited}"/>inherit action
+ from parent
+ </td>
+ <td>
+ <h:inputText value="#{properties.pageControlResourceURI.value}" size="60"
+ disabled="#{properties.pageControlResourceURI.inherited}"/>
+ </td>
+</tr>
+</tbody>
+</table>
+<h:commandButton value="Update" styleClass="portlet-form-button portlet-section-buttonrow"/>
+</h:form>
+
+
+</td>
+</tr>
+</table>
+
+</div>
+</ui:composition>
\ No newline at end of file
Added: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editPageLayout.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editPageLayout.xhtml (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editPageLayout.xhtml 2008-04-07 08:53:27 UTC (rev 10509)
@@ -0,0 +1,172 @@
+<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:jbp="http://www.jboss.org/portal"
+ xmlns:c="http://java.sun.com/jstl/core">
+<br/>
+<table width="100%">
+<tr>
+<td valign="top" width="50%">
+ <p class="portlet-area-header">Content Definition</p>
+
+ <div class="portlet-area-body">
+
+ <table>
+ <tr>
+ <td colspan="2">Define a name for the window of content (optional):
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <h:form id="windowForm">
+ <label for="windowName">
+ <span class="portlet-form-field-label admin-label">Window Name:</span>
+ <h:inputText id="windowName" value="#{pageManager.windowName}"
+ styleClass="portlet-form-input-field"/>
+ </label>
+ <h:message for="windowName" errorClass="portlet-msg-error"/>
+ </h:form>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <hr/>
+ Select the type of content that will be added to the page:
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <h:form id="abc">
+ <label for="instanceId" class="portlet-form-field-label-container">
+ <span class="portlet-form-field-label admin-label">Content Type:</span>
+ <h:inputHidden id="windowNameCopy" value="#{pageManager.windowName}"/>
+ <h:selectOneMenu
+ id="instanceId"
+ value="#{pageManager.selectedContentType}"
+ styleClass="portlet-form-field contentType"
+ onchange="document.getElementById('abc:windowNameCopy').value = document.getElementById('windowForm:windowName').value;
+ document.getElementById('abc').submit(); ">
+ <f:selectItems value="#{pageManager.contentTypeItems}"/>
+ </h:selectOneMenu>
+ </label>
+ <h:message for="instanceId" errorClass="portlet-msg-error"/>
+ </h:form>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <hr/>
+ Select content that will be added to the page:
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" valign="top">
+ <h:form></h:form>
+ <jbp:portlet
+ portletId="#{pageManager.selectedEditorPortletId}"
+ portletInvoker="#{pageManager.portletInvoker}"
+ actionListener="#{pageManager.assignWindow}"
+ supportedModes="edit_content"
+ supportedWindowStates="normal"
+ initialMode="edit_content"
+ initialWindowState="normal"
+ renderParameters="#{pageManager.selectedRenderParameters}"
+ onClick="url.setParameter('windowName', document.getElementById('windowForm:windowName').value);"/>
+ </td>
+ </tr>
+ </table>
+
+ </div>
+
+</td>
+<td valign="top" width="50%">
+
+ <p class="portlet-area-header">Page Layout</p>
+
+ <div class="portlet-area-body">
+
+ <h:form id="layoutForm">
+ <h:message for="layoutForm" errorClass="portlet-msg-error"/>
+ <input id="blah" type="hidden" name="blah" value=""/>
+ <table width="100%">
+ <tbody>
+ <c:forEach items="#{pageManager.regionNames}" var="regionName" varStatus="status">
+ <tr>
+ <td colspan="3" class="portlet-form-field-label">
+ <hr/>
+ #{regionName} Region
+ </td>
+ </tr>
+ <tr>
+ <td valign="top">
+ <h:commandButton
+ onclick="document.getElementById('blah').value=document.getElementById('windowForm:windowName').value"
+ value="Add" id="a_#{regionName}"
+ actionListener="#{pageManager.assignWindows}"
+ styleClass="portlet-form-button layout-button"/>
+ </td>
+ <td width="100%">
+ <h:selectManyListbox
+ value="#{pageManager.assignedWindows[regionName]}"
+ size="7" styleClass="windowList portlet-form-field">
+ <f:selectItems
+ value="#{pageManager.windowItemsMap[regionName]}"/>
+ </h:selectManyListbox>
+ </td>
+ <td valign="top" width="250">
+ <h:commandButton
+ value="Up" id="u_#{regionName}"
+ actionListener="#{pageManager.assignWindows}"
+ styleClass="portlet-form-button layout-button"/><br/>
+ <h:commandButton
+ value="Down" id="d_#{regionName}"
+ actionListener="#{pageManager.assignWindows}"
+ styleClass="portlet-form-button layout-button"/>
+ <hr/>
+ <h:commandButton
+ value="Delete" id="l_#{regionName}"
+ actionListener="#{pageManager.assignWindows}"
+ styleClass="portlet-form-button layout-button"/>
+ </td>
+ </tr>
+ </c:forEach>
+ </tbody>
+ <c:if test="#{!(empty pageManager.assignedWindows['unknown'])}">
+ <tbody>
+ <tr>
+ <td colspan="2" class="portlet-form-field-label"
+ style="border-width:0px;border-top:1px dashed #d5d5d5">Unassigned
+ windows
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <div style="margin-top: 1em">
+ <h:commandButton value="Delete"
+ id="l_unknown" actionListener="#{pageManager.assignWindows}"
+ styleClass="portlet-form-button"/>
+ </div>
+ </td>
+ <td>
+ <h:selectManyListbox
+ value="#{pageManager.assignedWindows['unknown']}"
+ size="7" styleClass="windowList portlet-form-field">
+ <f:selectItems
+ value="#{pageManager.windowItemsMap['unknown']}"/>
+ </h:selectManyListbox>
+ </td>
+ </tr>
+ </tbody>
+ </c:if>
+ </table>
+ </h:form>
+
+ </div>
+
+</td>
+</tr>
+</table>
+
+</div>
\ No newline at end of file
Added: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editPortalErrorHandling.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editPortalErrorHandling.xhtml (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editPortalErrorHandling.xhtml 2008-04-07 08:53:27 UTC (rev 10509)
@@ -0,0 +1,148 @@
+<ui:composition 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">
+
+
+<p class="portlet-area-header">Portal Error Handling</p>
+
+<div class="portlet-area-body">
+
+<!-- defines error handeling section -->
+<table class="full-width">
+<tr>
+ <th class="portlet-section-title">Configure how the system handles errors on portal level.</th>
+</tr>
+<tr>
+<td valign="top" class="portlet-section-body">
+
+<h:form>
+<table class="datatable full-width">
+<thead class="portlet-section-header">
+ <tr>
+ <th>Case</th>
+ <th>Inheritance</th>
+ <th>Action</th>
+ </tr>
+</thead>
+<tbody>
+<tr class="portlet-section-body">
+ <td>
+ <h:outputText value="#{properties.portalControlAccessDenied.displayName}"/>
+ </td>
+ <td>
+ <h:selectBooleanCheckbox disabled="#{!properties.portalControlAccessDenied.inheritable}"
+ onclick="submit();"
+ valueChangeListener="#{properties.portalControlAccessDenied.inherit}"
+ value="#{properties.portalControlAccessDenied.inherited}"/>inherit
+ action from parent
+ </td>
+ <td>
+ <h:selectOneMenu value="#{properties.portalControlAccessDenied.value}"
+ disabled="#{properties.portalControlAccessDenied.inherited}"
+ onchange="submit();">
+ <f:selectItems value="#{properties.portalSelectItems}"/>
+ </h:selectOneMenu>
+ </td>
+</tr>
+<tr class="portlet-section-alternate">
+ <td>
+ <h:outputText value="#{properties.portalControlUnavailable.displayName}"/>
+ </td>
+ <td>
+ <h:selectBooleanCheckbox disabled="#{!properties.portalControlUnavailable.inheritable}"
+ onclick="submit();"
+ valueChangeListener="#{properties.portalControlUnavailable.inherit}"
+ value="#{properties.portalControlUnavailable.inherited}"/>inherit
+ action from parent
+ </td>
+ <td>
+ <h:selectOneMenu value="#{properties.portalControlUnavailable.value}"
+ disabled="#{properties.portalControlUnavailable.inherited}"
+ onchange="submit();">
+ <f:selectItems value="#{properties.portalSelectItems}"/>
+ </h:selectOneMenu>
+ </td>
+</tr>
+<tr class="portlet-section-body">
+ <td>
+ <h:outputText value="#{properties.portalControlError.displayName}"/>
+ </td>
+ <td>
+ <h:selectBooleanCheckbox disabled="#{!properties.portalControlError.inheritable}"
+ onclick="submit();"
+ valueChangeListener="#{properties.portalControlError.inherit}"
+ value="#{properties.portalControlError.inherited}"/>inherit action from
+ parent
+ </td>
+ <td>
+ <h:selectOneMenu value="#{properties.portalControlError.value}"
+ disabled="#{properties.portalControlError.inherited}" onchange="submit();">
+ <f:selectItems value="#{properties.portalSelectItems}"/>
+ </h:selectOneMenu>
+ </td>
+</tr>
+<tr class="portlet-section-alternate">
+ <td>
+ <h:outputText value="#{properties.portalControlInternalError.displayName}"/>
+ </td>
+ <td>
+ <h:selectBooleanCheckbox disabled="#{!properties.portalControlInternalError.inheritable}"
+ onclick="submit();"
+ valueChangeListener="#{properties.portalControlInternalError.inherit}"
+ value="#{properties.portalControlInternalError.inherited}"/>inherit
+ action from parent
+ </td>
+ <td>
+ <h:selectOneMenu value="#{properties.portalControlInternalError.value}"
+ disabled="#{properties.portalControlInternalError.inherited}"
+ onchange="submit();">
+ <f:selectItems value="#{properties.portalSelectItems}"/>
+ </h:selectOneMenu>
+ </td>
+</tr>
+<tr class="portlet-section-body">
+ <td>
+ <h:outputText value="#{properties.portalControlNotFound.displayName}"/>
+ </td>
+ <td>
+ <h:selectBooleanCheckbox disabled="#{!properties.portalControlNotFound.inheritable}"
+ onclick="submit();"
+ valueChangeListener="#{properties.portalControlNotFound.inherit}"
+ value="#{properties.portalControlNotFound.inherited}"/>inherit action
+ from parent
+ </td>
+ <td>
+ <h:selectOneMenu value="#{properties.portalControlNotFound.value}"
+ disabled="#{properties.portalControlNotFound.inherited}" onchange="submit();">
+ <f:selectItems value="#{properties.portalSelectItems}"/>
+ </h:selectOneMenu>
+ </td>
+</tr>
+<tr class="portlet-section-alternate">
+ <td>
+ <h:outputText value="#{properties.portalControlResourceURI.displayName}"/>
+ </td>
+ <td>
+ <h:selectBooleanCheckbox disabled="#{!properties.portalControlResourceURI.inheritable}"
+ onclick="submit();"
+ valueChangeListener="#{properties.portalControlResourceURI.inherit}"
+ value="#{properties.portalControlResourceURI.inherited}"/>inherit
+ action from parent
+ </td>
+ <td>
+ <h:inputText value="#{properties.portalControlResourceURI.value}" size="60"
+ disabled="#{properties.portalControlResourceURI.inherited}"/>
+ </td>
+</tr>
+</tbody>
+</table>
+<h:commandButton value="Update" styleClass="portlet-form-button portlet-section-buttonrow"/>
+</h:form>
+</td>
+</tr>
+</table>
+
+</div>
+</ui:composition>
\ No newline at end of file
Added: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editPreferences.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editPreferences.xhtml (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editPreferences.xhtml 2008-04-07 08:53:27 UTC (rev 10509)
@@ -0,0 +1,106 @@
+<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">
+
+<c:choose>
+ <c:when test="#{not empty prefs.entries}">
+ <h:form>
+ <table class="full-width datatable">
+ <thead class="portlet-section-header" style="text-align:left;">
+ <tr>
+ <th>Key</th>
+ <th>Name</th>
+ <th>ReadOnly</th>
+ <c:if test="#{prefs.mutable}">
+ <th>Value</th>
+ </c:if>
+ </tr>
+ </thead>
+ <tbody>
+ <c:forEach items="#{prefs.entries}" var="pref" varStatus="status">
+ <tr class="#{status.index % 2 == 0 ? 'portlet-section-body' : 'portlet-section-alternate'}">
+ <td>
+ <c:choose>
+ <c:when test="#{prefs.mutable and pref.readOnly == false}">
+ <h:commandLink
+ rendered="#{pref.readOnly == false}"
+ action="#{pref.select}">#{pref.name}</h:commandLink>
+ </c:when>
+ <c:otherwise>#{pref.name}</c:otherwise>
+ </c:choose>
+ </td>
+ <td>
+ <h:outputText value="#{pref.displayName.value}"/>
+ </td>
+ <td>
+ <h:selectBooleanCheckbox disabled="true" value="#{pref.readOnly}"/>
+ </td>
+ <c:if test="#{prefs.mutable}">
+ <td>
+ <h:outputText value="#{pref.value}"/>
+ </td>
+ </c:if>
+ </tr>
+ </c:forEach>
+ </tbody>
+ </table>
+ </h:form>
+ </c:when>
+ <c:otherwise>
+ <p>No defined preferences for this portlet.</p>
+ </c:otherwise>
+</c:choose>
+
+<c:if test="#{prefs.selectedEntry != null}">
+ <h:form style="padding: 1em 0 1em 0">
+ <fieldset style="border: 1px solid;">
+ <legend>Edit existing values</legend>
+ <table>
+ <tbody>
+ <c:forEach items="#{prefs.selectedEntry.indices}" var="index" varStatus="status">
+ <tr>
+ <td>
+ <h:outputLabel for="row_#{status.index}">
+ <h:outputText value="Value #{status.index}: " styleClass="portlet-form-field-label"/>
+ </h:outputLabel>
+ </td>
+ <td>
+ <h:inputText value="#{prefs.selectedEntry[index]}" styleClass="portlet-form-input-field"/>
+ </td>
+ <td>
+ <h:commandButton
+ id="row_#{status.index}"
+ actionListener="#{prefs.selectedEntry.deleteLine}"
+ value="Delete"
+ styleClass="portlet-form-button"/>
+ </td>
+ </tr>
+ </c:forEach>
+ <tr>
+ <td colspan="3">
+ <h:commandButton value="Update" styleClass="portlet-form-button"/>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </fieldset>
+ </h:form>
+
+ <h:form>
+ <fieldset style="border: 1px solid;">
+ <legend>Append a value</legend>
+ <h:outputLabel for="new_value">
+ <h:outputText value="New value: " styleClass="portlet-form-field-label"/>
+ </h:outputLabel>
+ <h:inputText id="new_value" value="#{prefs.selectedEntry.line}" styleClass="portlet-form-input-field"/>
+ <h:commandButton action="#{prefs.selectedEntry.appendLine}" value="Append"
+ styleClass="portlet-form-button"/>
+ </fieldset>
+ </h:form>
+
+</c:if>
+
+</div>
Added: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editProperties.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editProperties.xhtml (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editProperties.xhtml 2008-04-07 08:53:27 UTC (rev 10509)
@@ -0,0 +1,150 @@
+<ui:composition 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">
+
+<div class="portlet-area-header">Properties</div>
+<div class="portlet-area-body">
+
+<!-- divide the area body into two panes -->
+<table cellpadding="0" cellspacing="0" width="100%">
+<tr>
+<td class="align-top">
+
+ <!-- defines property creation section -->
+ <table class="full-width">
+ <tr>
+ <th class="portlet-section-title">Add a property.</th>
+ </tr>
+ <tr>
+ <td class="dotted-blue-vert-rt">
+
+ <h:form>
+ <!-- defines layout of property form -->
+ <table>
+ <tbody>
+ <f:subview id="predefined-properties" rendered="#{not empty properties.propertyItems}">
+ <tr>
+ <td class="portlet-form-field-label">
+ <h:outputLabel for="predefinedProperty" styleClass="portlet-form-field-label">Select
+ predefined property:</h:outputLabel>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <h:selectOneMenu id="predefinedProperty" value="#{properties.action.selectedProperty}">
+ <f:selectItems value="#{properties.propertyItems}"/>
+ </h:selectOneMenu>
+ </td>
+ </tr>
+ <tr>
+ <td align="center">or</td>
+ </tr>
+ </f:subview>
+ <tr>
+ <td class="portlet-form-field-label">
+ <h:outputLabel for="property" styleClass="portlet-form-field-label">Enter property
+ name:</h:outputLabel>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <h:inputText id="property" styleClass="portlet-form-input-field"
+ value="#{properties.action.otherPropertyName}"/>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <!-- ends layout of property form -->
+ <h:commandButton value="Add Property" styleClass="portlet-form-button portlet-section-buttonrow"
+ action="#{properties.action.updateProperty}"/></h:form>
+
+ </td>
+ </tr>
+ </table>
+ <!-- ends property creation section -->
+
+</td>
+<td valign="top" width="100%" style="padding-left:5px;"><!-- creates division of 2 pane area -->
+
+
+ <!-- defines property list section -->
+ <c:if test="#{properties.size != 0}">
+ <table class="full-width">
+ <tr>
+ <th class="portlet-section-title">Manage currently defined properties.</th>
+ </tr>
+ <tr>
+ <td class="portlet-section-body" valign="top">
+
+ <h:form>
+ <!-- defines layout of property table -->
+ <h:dataTable value="#{properties.entries}" width="100%" headerClass="portlet-section-header" styleClass="datatable full-width"
+ rowClasses="portlet-section-body, portlet-section-alternate" var="prop">
+ <h:column>
+ <f:facet name="header">Name</f:facet>
+ <h:outputText title="#{prop.type}" value="#{prop.displayName}"/>
+ </h:column>
+ <h:column>
+ <f:facet name="header">Description</f:facet>
+ <h:outputText>#{prop.description}</h:outputText>
+ </h:column>
+ <h:column>
+ <f:facet name="header">Inherited</f:facet>
+ <h:outputText>#{prop.inherited ? 'Yes' : 'No'}</h:outputText>
+ </h:column>
+ <h:column>
+ <f:facet name="header">Value</f:facet>
+ <h:selectBooleanCheckbox value="#{prop.value}"
+ readonly="#{prop.readOnly}"
+ rendered="#{prop.type == 'java.lang.Boolean'}"/>
+
+ <h:inputText styleClass="portlet-form-input-field" value="#{prop.value}"
+ readonly="#{prop.readOnly}"
+ rendered="#{prop.type eq 'java.lang.String' and prop.name ne 'portal.windowInitialState'}"/>
+
+ <h:selectOneMenu styleClass="portlet-form-input-field"
+ value="#{prop.value}"
+ rendered="#{prop.type eq 'java.lang.String' and prop.name eq 'portal.windowInitialState' and (!portalobjectmgr.maximizedStateExists or prop.value eq 'MAXIMIZED')}">
+ <f:selectItem itemLabel="Choose One..." itemValue=""/>
+ <f:selectItem itemLabel="Maximized" itemValue="MAXIMIZED"/>
+ <f:selectItem itemLabel="Minimized" itemValue="MINIMIZED"/>
+ <f:selectItem itemLabel="Normal" itemValue="NORMAL"/>
+ </h:selectOneMenu>
+
+ <h:selectOneMenu styleClass="portlet-form-input-field"
+ value="#{prop.value}" disabled="true"
+ rendered="#{prop.type eq 'java.lang.String' and prop.name eq 'portal.windowInitialState' and (portalobjectmgr.maximizedStateExists and prop.value ne 'MAXIMIZED')}">
+ <f:selectItem itemLabel="Minimized" itemValue="MINIMIZED"/>
+ </h:selectOneMenu>
+
+
+ </h:column>
+ <h:column>
+ <f:facet name="header">Delete</f:facet>
+ <h:commandLink action="#{properties.action.removeProperty}"
+ rendered="#{!prop.inherited}">
+ <h:outputText styleClass="actionDelete" value="Delete"/>
+ <f:param name="name" value="#{prop.name}"/>
+ </h:commandLink>
+ </h:column>
+ </h:dataTable>
+
+ <!-- ends property list -->
+ <h:commandButton value="Update" styleClass="portlet-form-button portlet-section-buttonrow"/></h:form>
+
+ </td>
+ </tr>
+ </table>
+ </c:if>
+ <!-- ends property list section -->
+
+</td>
+</tr>
+</table>
+<!-- ends area body -->
+
+</div>
+
+</ui:composition>
\ No newline at end of file
Added: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editSecurity.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editSecurity.xhtml (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editSecurity.xhtml 2008-04-07 08:53:27 UTC (rev 10509)
@@ -0,0 +1,44 @@
+<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">
+
+ <h:form>
+ <table class="datatable full-width">
+ <thead class="portlet-section-header">
+ <tr>
+ <th>Roles</th>
+ <th>Permissions</th>
+ </tr>
+ </thead>
+ <tbody>
+ <c:forEach items="#{auth.roles}" var="role" varStatus="status">
+ <tr class="#{status.index % 2 == 0 ? 'portlet-section-body' : 'portlet-section-alternate'}">
+ <td>
+ <h:outputLabel for="cars_#{status.index}">
+ Role
+ #{role == '__unchecked__' ? 'Unchecked' : (auth.roleDisplayNameMap[role] != null ? auth.roleDisplayNameMap[role] : role)}:
+ </h:outputLabel>
+ </td>
+ <td>
+ <h:selectManyCheckbox
+ id="cars_#{status.index}"
+ value="#{auth.forRole[role]}"
+ layout="lineDirection">
+ <f:selectItems value="#{auth.availableActions}"/>
+ </h:selectManyCheckbox>
+ </td>
+ </tr>
+ </c:forEach>
+ </tbody>
+ </table>
+ <br />
+ <div>
+ <h:commandButton value="Update" action="#{auth.submit}" styleClass="portlet-form-button"/>
+ <h:commandButton value="Cancel" action="#{auth.cancel}" styleClass="portlet-form-button" immediate="true"/>
+ </div>
+ </h:form>
+
+</div>
\ No newline at end of file
Added: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editTheme.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editTheme.xhtml (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editTheme.xhtml 2008-04-07 08:53:27 UTC (rev 10509)
@@ -0,0 +1,46 @@
+<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">
+
+ <h:form>
+ <table class="full-width datatable">
+ <thead class="portlet-section-header">
+ <tr>
+ <th>Name</th>
+ <th>Description</th>
+ <th>Setting</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr class="portlet-section-body">
+ <td>Layout</td>
+ <td>Name of the layout implementation used to arrange portlet windows in pages</td>
+ <td>
+ <h:selectOneMenu id="layout" value="#{theme.layoutName}">
+ <f:selectItems value="#{applicationScope.LayoutService.layoutItems}"/>
+ </h:selectOneMenu>
+ </td>
+ </tr>
+ <tr class="portlet-section-alternate">
+ <td>Theme</td>
+ <td>Name of the look and feel to use</td>
+ <td>
+ <h:selectOneMenu id="theme" value="#{theme.themeName}">
+ <f:selectItems value="#{applicationScope.ThemeService.themeItems}"/>
+ </h:selectOneMenu>
+ </td>
+ </tr>
+ <tr class="portlet-section-body">
+ <td>RenderSet</td>
+ <td>Name of the render engine to use to render pages</td>
+ <td>
+ <h:selectOneMenu id="renderSet" value="#{theme.renderSetName}">
+ <f:selectItems value="#{applicationScope.LayoutService.renderSetItems}"/>
+ </h:selectOneMenu>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <br />
+ <ui:insert name="form_submit"/>
+ </h:form>
+</div>
\ No newline at end of file
Added: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editWindowTheme.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editWindowTheme.xhtml (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editWindowTheme.xhtml 2008-04-07 08:53:27 UTC (rev 10509)
@@ -0,0 +1,48 @@
+<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">
+
+ <h:form>
+ <table class="full-width datatable">
+ <thead class="portlet-section-header">
+ <tr>
+ <th>Name</th>
+ <th>Description</th>
+ <th>Setting</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr class="portlet-section-body">
+ <td>Window Renderer</td>
+ <td>Name of the render engine to use to render windows</td>
+ <td>
+ <h:selectOneMenu id="windowRenderer" value="#{theme.windowRendererName}">
+ <f:selectItems value="#{applicationScope.LayoutService.renderSetItems}"/>
+ </h:selectOneMenu>
+ </td>
+ </tr>
+ <tr class="portlet-section-alternate">
+ <td>Decoration Renderer</td>
+ <td>Name of the render engine to use to render window decorations</td>
+ <td>
+ <h:selectOneMenu id="decorationRenderer" value="#{theme.decorationRendererName}">
+ <f:selectItems value="#{applicationScope.LayoutService.renderSetItems}"/>
+ </h:selectOneMenu>
+ </td>
+ </tr>
+ <tr>
+ <td>Portlet Renderer</td>
+ <td>Name of the render engine to use to render portlets</td>
+ <td>
+ <h:selectOneMenu id="portletRenderer" value="#{theme.portletRendererName}">
+ <f:selectItems value="#{applicationScope.LayoutService.renderSetItems}"/>
+ </h:selectOneMenu>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <ui:insert name="form_submit"/>
+ </h:form>
+</div>
\ No newline at end of file
Added: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/showPortletDetails.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/showPortletDetails.xhtml (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/showPortletDetails.xhtml 2008-04-07 08:53:27 UTC (rev 10509)
@@ -0,0 +1,119 @@
+<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">
+
+ <h:form>
+ <p class="portlet-area-header">Portlet Instance Information</p>
+ <h:panelGrid columns="3" styleClass="panelGrid-basic">
+ <f:subview id="field1">
+ <dl>
+ <dt class="portlet-form-field-label">Portlet name:</dt>
+ <dd><h:commandLink
+ action="#{portletmgr.selectPortlet}">
+ <f:param name="id" value="#{portlet.context.id}"/>
+ <f:param name="plugin" value="manager"/>
+ #{portlet.name}
+ </h:commandLink></dd>
+ </dl>
+ </f:subview>
+ <f:subview id="field2">
+ <dl>
+ <dt class="portlet-form-field-label">Portlet description:</dt>
+ <dd>#{portlet.description.value}</dd>
+ </dl>
+ </f:subview>
+ <f:subview id="field3">
+ <dl>
+ <dt class="portlet-form-field-label">Portlet title:</dt>
+ <dd>#{portlet.title.value}</dd>
+ </dl>
+ </f:subview>
+ <f:subview id="field4">
+ <dl>
+ <dt class="portlet-form-field-label">Portlet keywords:</dt>
+ <dd>#{portlet.keywords.value}</dd>
+ </dl>
+ </f:subview>
+ <f:subview id="field5" rendered="#{not empty portlet.locales}">
+ <dl>
+ <dt class="portlet-form-field-label">Portlet locales:</dt>
+ <dd><c:forEach items="#{portlet.locales}" var="locale"> #{locale} </c:forEach></dd>
+ </dl>
+ </f:subview>
+ </h:panelGrid>
+ <br/>
+
+ </h:form>
+ <f:subview id="displaynamecontainer" rendered="#{showDisplayNameEditor}">
+ <p class="portlet-area-header">Portlet Instance Display Names</p>
+ <div class="float-left third-width-pad5">
+ <h:form id="displayNameForm">
+ <h3 class="sectionTitle zero">Add Instance Display Names</h3>
+
+ <div class="portlet-area-body">
+ <h:inputText id="newName" value="#{instanceDisplayNameAction.newText}" required="true"/>
+ <h:selectOneMenu id="locales" value="#{instanceDisplayNameAction.newLocale}">
+ <f:selectItems value="#{instanceDisplayNameAction.locales}"/>
+ </h:selectOneMenu>
+ <h:commandButton value="#{instanceDisplayNameAction.newText ne null ? 'Modify' : 'Add'} Name" action="#{instanceDisplayNameAction.addDisplayName}"
+ styleClass="portlet-form-button"/>
+ </div>
+ </h:form>
+ </div>
+
+ <div class="float-left two-third-width-pad5">
+ <h:form>
+ <h3 class="sectionTitle zero">Current Instance Display Names</h3>
+
+ <div class="portlet-area-body">
+
+ <h:dataTable var="value" value="#{instanceDisplayNameAction.currentLocales}" styleClass="objectList datatable"
+ rowClasses="portlet-section-body,portlet-section-alternate"
+ columnClasses="objectNameColumn, objectActionColumn"
+ headerClass="portlet-section-header">
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Locale"/>
+ </f:facet>
+ #{value.localeDisplayName}
+ </h:column>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Display Name"/>
+ </f:facet>
+ #{value.text}
+ </h:column>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Delete"/>
+ </f:facet>
+
+ <div style="width:150px"><h:commandLink action="#{instanceDisplayNameAction.editDisplayName}">
+ <h:outputText styleClass="actionDelete" value="Delete"/>
+ <f:param name="locale" value="#{value.locale}"/>
+ <f:param name="editAction" value="delete"/>
+ </h:commandLink></div>
+ </h:column>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Rename"/>
+ </f:facet>
+
+ <div style="width:150px"><h:commandLink action="#{instanceDisplayNameAction.editDisplayName}">
+ <h:outputText styleClass="actionRename" value="Rename"/>
+ <f:param name="locale" value="#{value.locale}"/>
+ <f:param name="editAction" value="rename"/>
+ </h:commandLink></div>
+ </h:column>
+ </h:dataTable>
+
+ </div>
+ </h:form>
+
+ </div>
+
+ </f:subview>
+</div>
\ No newline at end of file
Added: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/tabContainer.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/tabContainer.xhtml (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/tabContainer.xhtml 2008-04-07 08:53:27 UTC (rev 10509)
@@ -0,0 +1,11 @@
+<ui:composition
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
+
+ <div class="tab-container">
+ <ui:insert name="tab-container-content"/>
+ <br class="clear"/>
+ </div>
+
+</ui:composition>
\ No newline at end of file
Added: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/confirmDeleteInstance.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/confirmDeleteInstance.xhtml (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/confirmDeleteInstance.xhtml 2008-04-07 08:53:27 UTC (rev 10509)
@@ -0,0 +1,51 @@
+<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:jbp="http://www.jboss.org/portal"
+ xmlns:c="http://java.sun.com/jstl/core"
+ class="admin-ui">
+
+ <ui:composition template="instancesTemplate.xhtml">
+ <ui:define name="content">
+
+ <h:form>
+ <ul class="objectpath">
+ <li class="pathItem">
+ <h:commandLink action="instances">Portlet Instances</h:commandLink>
+ </li>
+ <li class="pathSeparator"><h:graphicImage url="/img/pathSeparator.png" alt=">"/></li>
+ <li class="selected">
+ <span class="objectName">#{instancemgr.selectedInstance.id}</span> instance Delete
+ </li>
+ </ul>
+ </h:form>
+ <br/>
+
+ <div class="portlet-msg">
+ <div class="portlet-msg-icon"><h:graphicImage url="/img/msgIcon_Warning.gif" alt=""/></div>
+ <div class="portlet-msg-body">
+ <h3>Delete <span class="objectName">#{instancemgr.selectedInstance.id}</span></h3>
+
+ <p class="portlet-msg-alert">
+ WARNING! You are about to delete the
+ <span class="objectName">#{instancemgr.selectedInstance.id}</span> portlet instance causing windows
+ referencing it to not be able to display their content anymore.
+ </p>
+
+ <p class="portlet-class">Are you sure you want to delete this portlet instance?</p>
+
+ <h:form>
+ <h:commandButton value="Delete" action="instances" actionListener="#{instancemgr.deleteInstance}"
+ styleClass="portlet-form-button portlet-section-buttonrow">
+ <f:attribute name="instanceId" value="#{instancemgr.selectedInstance.id}"/>
+ </h:commandButton>
+ <h:commandButton value="Cancel" action="instances" actionListener="objects"
+ styleClass="portlet-form-button portlet-section-buttonrow"/>
+ </h:form>
+ </div>
+ </div>
+ </ui:define>
+ </ui:composition>
+</div>
\ No newline at end of file
Added: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/dashboard/dashboard.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/dashboard/dashboard.xhtml (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/dashboard/dashboard.xhtml 2008-04-07 08:53:27 UTC (rev 10509)
@@ -0,0 +1,163 @@
+<div
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:c="http://java.sun.com/jstl/core">
+
+
+<div align="center">
+ <h:message id="error" for="error" errorClass="portlet-msg-error"/>
+</div>
+
+<table class="full-width datatable">
+<tr>
+ <th class="portlet-section-header" align="center">Personal Dashboard Editor</th>
+</tr>
+<tr>
+ <td class="portlet-section-body" align="center">
+ <table width="100%">
+ <tr>
+ <td width="250">
+ <table class="bottombuttonbar">
+ <tr>
+ <td align="left" valign="top"><b>Create a New Page:</b><br/>Page name: 
+ <h:form style="padding:0;margin:0">
+ <h:inputText id="pageName" value="#{addDashboardPageAction.pageName}"
+ styleClass="portlet-form-input-field"/>
+ <h:commandButton value="Save"
+ action="#{addDashboardPageAction.execute}"
+ styleClass="portlet-form-button"/>
+ </h:form>
+ </td>
+ </tr>
+ <c:if test="#{dashboard.selectedPage.name != 'default'}">
+ <tr>
+ <td align="left" valign="top"><b>Rename this Page:</b><br/>New page name: 
+ <h:form id="renameForm" style="padding:0;margin:0">
+ <h:message for="newName"/>
+ <h:inputText id="newName" value="#{renameDashboardPageAction.newName}"
+ styleClass="portlet-form-input-field"/>
+ <h:commandButton value="Rename"
+ action="#{renameDashboardPageAction.execute}"
+ styleClass="portlet-form-button"/>
+ </h:form>
+ </td>
+ </tr>
+ </c:if>
+ </table>
+ </td>
+ <td align="left" valign="top">
+ Use this page to manage the content and appearance of your dashboard pages. <br/>
+ You can control the page titles, column layouts, page themes,
+ and add,
+ order, or remove portlets.
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+<tr>
+ <td class="portlet-section-header" align="center">Currently editing page #{dashboard.selectedPage.name}</td>
+</tr>
+<tr>
+ <td class="portlet-section-body" align="center">
+ <h:form id="page_selector_form" style="padding:0;margin:0">
+ Select: <h:selectOneMenu
+ id="pageNameSelector"
+ value="#{dashboard.selectedPageName}"
+ styleClass="portlet-form-field"
+ onchange="document.getElementById('page_selector_form').submit()">
+ <f:selectItems value="#{dashboard.pageItems}"/>
+ </h:selectOneMenu>
+ </h:form>
+ <br/>
+ </td>
+</tr>
+
+<tr>
+ <td>
+ <table width="100%">
+ <tr>
+ <td valign="top" width="250">
+ <table class="bottombuttonbar">
+ <tr>
+ <td valign="top">
+ <b>Theme and Layout</b>
+ <br/>
+ Apply a theme to your dashboard, or select the number of columns for the layout.
+ <hr/>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <h:form>
+ Choose a layout:<br/>
+ <h:selectOneMenu
+ id="layoutSelector"
+ value="#{dashboard.selectedPageLayout}"
+ styleClass="portlet-form-field">
+ <f:selectItems value="#{applicationScope.LayoutService.layoutItems}"/>
+ </h:selectOneMenu>
+ <h:commandButton value="Select" styleClass="portlet-form-button"
+ action="#{dashboard.updateLayout}"/>
+ </h:form>
+ </td>
+ </tr>
+ <tr>
+ <td height="20"></td>
+ </tr>
+ <tr>
+ <td>
+ <h:form>
+ Choose a theme:<br/>
+ <h:selectOneMenu
+ id="themeSelector"
+ value="#{dashboard.selectedPageTheme}"
+ styleClass="portlet-form-field">
+ <f:selectItems value="#{applicationScope.ThemeService.themeItems}"/>
+ </h:selectOneMenu>
+ <h:commandButton value="Select" styleClass="portlet-form-button"
+ action="#{dashboard.updateTheme}"/>
+ </h:form>
+ </td>
+ </tr>
+ <tr>
+ <td height="20"></td>
+ </tr>
+ </table>
+ </td>
+ <td>
+ <table>
+ <tr>
+ <td>
+ <div class="admin-ui">
+ <ui:include src="/jsf/common/editPageLayout.xhtml">
+ <ui:param name="pageManager" value="#{dashboard.pageManager}"/>
+ </ui:include>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+</table>
+<hr/>
+<c:if test="#{dashboard.selectePageIsDefault == false}">
+ <table width="100%">
+ <tr>
+ <td align="left">
+ <h:form style="padding:0;margin:0">
+ <h:commandButton value="Delete this Page" styleClass="portlet-form-button"
+ action="#{dashboard.destroyPage}"/>
+ <br/>
+ <font color="red">You cannot undo this action!</font>
+ </h:form>
+ </td>
+ </tr>
+ </table>
+</c:if>
+</div>
Added: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/dashboards.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/dashboards.xhtml (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/dashboards.xhtml 2008-04-07 08:53:27 UTC (rev 10509)
@@ -0,0 +1,62 @@
+<ui:composition 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"
+ template="dashboardsTemplate.xhtml">
+
+
+ <ui:define name="content">
+
+ <!-- -->
+ <div class="property-container">
+ <ui:include src="common/editProperties.xhtml">
+ <ui:param name="properties" value="#{dashboardmgr.selectedProperties}"/>
+ </ui:include>
+ </div>
+
+ <!-- -->
+ <br/>
+ <div class="property-container">
+ <ui:include src="common/editPortalErrorHandling.xhtml">
+ <ui:param name="properties" value="#{dashboardmgr.controlProperties}"/>
+ </ui:include>
+ </div>
+
+ <!-- -->
+ <br/>
+ <div class="property-container">
+ <ui:include src="common/editPageErrorHandling.xhtml">
+ <ui:param name="properties" value="#{dashboardmgr.controlProperties}"/>
+ </ui:include>
+ </div>
+
+ <!-- Separation -->
+ <br/>
+
+ <div class="property-container">
+ <p class="portlet-area-header">Dashboard theme properties</p>
+
+ <div class="portlet-area-body">
+ <table cellpadding="0" cellspacing="0" width="100%">
+ <tr>
+ <th class="portlet-section-title">Configure dashboards settings.</th>
+ </tr>
+ <tr>
+ <td valign="top" class="portlet-section-body">
+ <ui:decorate template="common/editTheme.xhtml">
+ <ui:param name="theme" value="#{dashboardmgr.theme}"/>
+ <ui:define name="form_submit">
+ <h:commandButton value="Update" actionListener="#{dashboardmgr.theme.execute}"
+ styleClass="portlet-form-button portlet-section-buttonrow"/>
+ </ui:define>
+ </ui:decorate>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </div>
+ </ui:define>
+
+
+</ui:composition>
\ No newline at end of file
Added: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/dashboardsTemplate.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/dashboardsTemplate.xhtml (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/dashboardsTemplate.xhtml 2008-04-07 08:53:27 UTC (rev 10509)
@@ -0,0 +1,35 @@
+<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:f="http://java.sun.com/jsf/core"
+ xmlns:c="http://java.sun.com/jstl/core"
+ class="admin-ui">
+
+ <!-- Common nav -->
+ <h:form>
+ <ul class="topnav">
+ <li>
+ <h:commandLink value="Portal Objects" action="objects"
+ actionListener="#{portalobjectmgr.selectRootObject}"/>
+ </li>
+ <li>
+ <h:commandLink value="Portlet Instances" action="instances"/>
+ </li>
+ <li>
+ <h:commandLink value="Portlet Definitions" action="portlets"/>
+ </li>
+ <li id="currentTab">Dashboards</li>
+ </ul>
+ </h:form>
+ <ui:decorate template="common/tabContainer.xhtml">
+ <ui:define name="tab-container-content">
+ <!-- Status message -->
+ <h:message id="status" for="status" infoClass="portlet-msg-success" errorClass="portlet-msg-error"
+ fatalClass="portlet-msg-error" warnClass="portlet-msg-alert"/>
+
+ <!-- Content -->
+ <ui:insert name="content">Content</ui:insert>
+ </ui:define>
+ </ui:decorate>
+</div>
Added: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/displayNameObject.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/displayNameObject.xhtml (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/displayNameObject.xhtml 2008-04-07 08:53:27 UTC (rev 10509)
@@ -0,0 +1,83 @@
+<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="/jsf/objectTemplate.xhtml">
+ <ui:param name="portalObjectScreen" value="Display Names"/>
+
+ <ui:define name="content">
+ <br/><br/>
+ <div class="float-left third-width-pad5">
+ <h:form id="displayNameForm">
+ <h3 class="sectionTitle zero">Add Display Names</h3>
+
+ <div class="portlet-area-body">
+ <h:inputText id="newName" value="#{addDisplayNameAction.newText}" required="true"/>
+ <h:selectOneMenu id="locales" value="#{addDisplayNameAction.newLocale}">
+ <f:selectItems value="#{addDisplayNameAction.locales}"/>
+ </h:selectOneMenu>
+ <h:commandButton value="#{addDisplayNameAction.newText ne null ? 'Modify' : 'Add'} Name" action="#{addDisplayNameAction.addDisplayName}"
+ styleClass="portlet-form-button"/>
+ </div>
+ </h:form>
+ </div>
+
+ <div class="float-left two-third-width-pad5">
+ <h:form>
+ <h3 class="sectionTitle zero">Current Display Names</h3>
+
+ <div class="portlet-area-body">
+
+ <h:dataTable var="value" value="#{addDisplayNameAction.currentLocales}" styleClass="objectList datatable"
+ rowClasses="portlet-section-body,portlet-section-alternate"
+ columnClasses="objectNameColumn, objectActionColumn"
+ headerClass="portlet-section-header">
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Locale"/>
+ </f:facet>
+ #{value.localeDisplayName}
+ </h:column>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Display Name"/>
+ </f:facet>
+ #{value.text}
+ </h:column>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Delete"/>
+ </f:facet>
+
+ <div style="width:150px"><h:commandLink action="#{addDisplayNameAction.editDisplayName}">
+ <h:outputText styleClass="actionDelete" value="Delete"/>
+ <f:param name="locale" value="#{value.locale}"/>
+ <f:param name="editAction" value="delete"/>
+ </h:commandLink></div>
+ </h:column>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Rename"/>
+ </f:facet>
+
+ <div style="width:150px"><h:commandLink action="#{addDisplayNameAction.editDisplayName}">
+ <h:outputText styleClass="actionRename" value="Rename"/>
+ <f:param name="locale" value="#{value.locale}"/>
+ <f:param name="editAction" value="rename"/>
+ </h:commandLink></div>
+ </h:column>
+ </h:dataTable>
+
+ </div>
+ </h:form>
+
+ </div>
+
+
+ <br class="clear"/>
+
+ </ui:define>
+ </ui:composition>
+</div>
Added: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editContext.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editContext.xhtml (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editContext.xhtml 2008-04-07 08:53:27 UTC (rev 10509)
@@ -0,0 +1,52 @@
+<div
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:c="http://java.sun.com/jstl/core">
+
+ <ui:composition template="objectTemplate.xhtml">
+
+ <ui:define name="content">
+ <h3 class="sectionTitle tenpx-top-bottom">
+ Manage  
+ <c:choose>
+ <c:when test="#{portalobjectmgr.selectedObject.type == PortalObject.TYPE_CONTEXT}">portals</c:when>
+ <c:otherwise><span class="objectName">#{portalobjectmgr.selectedObject.name}</span> portal</c:otherwise>
+ </c:choose>
+ </h3>
+ <h:form>
+ <h:commandLink action="editProperties" actionListener="#{portalobjectmgr.selectObject}"
+ styleClass="actionProperties">
+ <f:param name="id" value="#{portalobjectmgr.selectedObject.id}"/>
+ Properties
+ </h:commandLink>
+ </h:form>
+
+ <h3 class="sectionTitle">
+ Manage  
+ <c:choose>
+ <c:when test="#{portalobjectmgr.selectedObject.type == PortalObject.TYPE_CONTEXT}">sub-portals</c:when>
+ <c:otherwise>pages within <span class="objectName">#{portalobjectmgr.selectedObject.name}</span>
+ portal</c:otherwise>
+ </c:choose>
+ </h3>
+ <!-- Portal addition -->
+ <div class="tenpx-top-bottom">
+ <h:form>
+ <span class="portlet-font">Create a portal named: </span>
+ <h:inputText id="name" value="#{portalAction.portalName}" styleClass="portlet-form-input-field"
+ required="true"/>
+ <h:commandButton action="#{portalAction.addPortal}" value="Create portal" styleClass="portlet-form-button"/>
+ <h:message for="name" errorClass="portlet-msg-error"/>
+ </h:form>
+ </div>
+
+
+ <!-- Navigation -->
+ <ui:include src="objectNavigation.xhtml"/>
+ </ui:define>
+
+ </ui:composition>
+
+</div>
Added: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editPage.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editPage.xhtml (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editPage.xhtml 2008-04-07 08:53:27 UTC (rev 10509)
@@ -0,0 +1,76 @@
+<div
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:h="http://java.sun.com/jsf/html">
+
+ <ui:composition template="objectTemplate.xhtml">
+
+ <ui:define name="content">
+ <h3 class="sectionTitle tenpx-top-bottom">Manage <span class="objectName">#{portalobjectmgr.selectedObject.name}</span>
+ #{portalobjectmgr.selectedObject.typeName}</h3>
+
+
+
+ <h:form>
+ <h:panelGroup rendered="#{portalobjectmgr.selectedObject.type == PortalObject.TYPE_PAGE}"><h:commandLink
+ action="editPageLayout" actionListener="#{portalobjectmgr.selectObject}" styleClass="actionLayout">
+ <f:param name="id" value="#{portalobjectmgr.selectedObject.id}"/>
+ Page layout
+ </h:commandLink> | </h:panelGroup><h:commandLink action="editPageSecurity" styleClass="actionSecurity"
+ actionListener="#{portalobjectmgr.selectObject}">
+ <f:param name="id" value="#{portalobjectmgr.selectedObject.id}"/>
+ Security
+ </h:commandLink> | <h:commandLink action="editProperties" styleClass="actionProperties"
+ actionListener="#{portalobjectmgr.selectObject}">
+ <f:param name="id" value="#{portalobjectmgr.selectedObject.id}"/>
+ Properties
+ </h:commandLink> | <h:commandLink action="editPageTheme" styleClass="actionTheme"
+ actionListener="#{portalobjectmgr.selectObject}">
+ <f:param name="id" value="#{portalobjectmgr.selectedObject.id}"/>
+ Theme
+ </h:commandLink><h:panelGroup
+ rendered="#{!((portalobjectmgr.selectedObject.type == PortalObject.TYPE_PORTAL) and ((portalobjectmgr.selectedObject.name == 'admin') or (portalobjectmgr.selectedObject.name == 'template') or (portalobjectmgr.selectedObject.name == 'default')))}">
+ | <h:commandLink
+ action="renameObject" actionListener="#{portalobjectmgr.selectObject}" styleClass="actionRename">
+ <f:param name="id" value="#{portalobjectmgr.selectedObject.id}"/>
+ Rename
+ </h:commandLink></h:panelGroup>
+ <h:panelGroup
+ rendered="#{!((portalobjectmgr.selectedObject.type == PortalObject.TYPE_PORTAL) and ((portalobjectmgr.selectedObject.name == 'admin') or (portalobjectmgr.selectedObject.name == 'template') or (portalobjectmgr.selectedObject.name == 'default')))}">
+ | <h:commandLink
+ action="#{addDisplayNameAction.editDisplayNames}" actionListener="#{portalobjectmgr.selectObject}" styleClass="actionRename">
+ <f:param name="id" value="#{portalobjectmgr.selectedObject.id}" />
+ Display Names
+ </h:commandLink></h:panelGroup>
+ <h:panelGroup
+ rendered="#{!((portalobjectmgr.selectedObject.type == PortalObject.TYPE_PORTAL) and ((portalobjectmgr.selectedObject.name == 'admin') or (portalobjectmgr.selectedObject.name == 'template') or (portalobjectmgr.selectedObject.name == 'default')))}">
+ | <h:commandLink action="confirm" styleClass="actionDelete"
+ actionListener="#{portalobjectmgr.selectDeletingObject}">
+ <f:param name="id" value="#{portalobjectmgr.selectedObject.id}"/>
+ Delete
+ </h:commandLink>
+ </h:panelGroup>
+ </h:form>
+
+ <h3 class="sectionTitle">Manage sub-pages within <span class="objectName">#{portalobjectmgr.selectedObject.name}</span>
+ #{portalobjectmgr.selectedObject.typeName}</h3>
+ <!-- Sub page addition -->
+ <div class="tenpx-top-bottom">
+ <h:form>
+ <span class="portlet-font">Create a page named: </span>
+ <h:inputText id="pageName" value="#{addPageAction.pageName}" styleClass="portlet-form-input-field"
+ required="true"/>
+ <h:commandButton action="#{addPageAction.execute}" value="Create page" styleClass="portlet-form-button"/>
+ <h:message for="pageName" errorClass="portlet-msg-error"/>
+ </h:form>
+ </div>
+
+ <!-- Navigation -->
+ <ui:include src="objectNavigation.xhtml"/>
+ </ui:define>
+
+ </ui:composition>
+
+</div>
Added: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editPageLayout.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editPageLayout.xhtml (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editPageLayout.xhtml 2008-04-07 08:53:27 UTC (rev 10509)
@@ -0,0 +1,17 @@
+<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:ct="http://www.julien.com"
+ xmlns:jbp="http://www.jboss.org/portal"
+ xmlns:c="http://java.sun.com/jstl/core">
+ <ui:composition template="objectTemplate.xhtml">
+ <ui:param name="portalObjectScreen" value="Layout"/>
+ <ui:define name="content">
+ <ui:include src="common/editPageLayout.xhtml">
+ <ui:param name="pageManager" value="#{portalobjectmgr.pageManager}"/>
+ </ui:include>
+ </ui:define>
+ </ui:composition>
+</div>
Added: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editPageSecurity.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editPageSecurity.xhtml (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editPageSecurity.xhtml 2008-04-07 08:53:27 UTC (rev 10509)
@@ -0,0 +1,15 @@
+<div
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html">
+ <ui:composition template="objectTemplate.xhtml">
+ <ui:param name="portalObjectScreen" value="Security"/>
+ <ui:define name="content">
+ <h3>Please set the page permissions</h3>
+ <ui:decorate template="/jsf/common/editSecurity.xhtml">
+ <ui:param name="auth" value="#{portalobjectmgr.auth}"/>
+ </ui:decorate>
+ </ui:define>
+ </ui:composition>
+</div>
Added: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editPageTheme.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editPageTheme.xhtml (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editPageTheme.xhtml 2008-04-07 08:53:27 UTC (rev 10509)
@@ -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:f="http://java.sun.com/jsf/core">
+ <ui:composition template="objectTemplate.xhtml">
+ <ui:param name="portalObjectScreen" value="Theme"/>
+ <ui:define name="content">
+ <h3>Page theme properties</h3>
+ <ui:decorate template="common/editTheme.xhtml">
+ <ui:param name="theme" value="#{portalobjectmgr.theme}"/>
+ <ui:define name="form_submit">
+ <h:commandButton value="Update" action="objects" actionListener="#{portalobjectmgr.theme.execute}"
+ styleClass="portlet-form-button"/>
+ <h:commandButton value="Cancel" action="#{portalobjectmgr.selectObject}"
+ styleClass="portlet-form-button"/>
+ </ui:define>
+ </ui:decorate>
+ </ui:define>
+ </ui:composition>
+</div>
+
Property changes on: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editPageTheme.xhtml
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editPortalSecurity.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editPortalSecurity.xhtml (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editPortalSecurity.xhtml 2008-04-07 08:53:27 UTC (rev 10509)
@@ -0,0 +1,15 @@
+<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">
+ <ui:composition template="/jsf/objectTemplate.xhtml">
+ <ui:param name="portalObjectScreen" value="Security"/>
+ <ui:define name="content">
+ <h3>Please set the portal permissions</h3>
+ <ui:decorate template="/jsf/common/editSecurity.xhtml">
+ <ui:param name="auth" value="#{portalobjectmgr.auth}"/>
+ </ui:decorate>
+ </ui:define>
+ </ui:composition>
+</div>
Added: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editPortalTheme.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editPortalTheme.xhtml (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editPortalTheme.xhtml 2008-04-07 08:53:27 UTC (rev 10509)
@@ -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">
+ <ui:composition template="objectTemplate.xhtml">
+ <ui:param name="portalObjectScreen" value="Theme"/>
+ <ui:define name="content">
+ <h3>Portal theme properties</h3>
+
+ <p>These settings are inherited by all the pages and windows of this portal. You may override these settings by
+ selecting the appropriate value on the respective Theme settings pages.</p>
+ <br/>
+ <ui:decorate template="common/editTheme.xhtml">
+ <ui:param name="theme" value="#{portalobjectmgr.theme}"/>
+ <ui:define name="form_submit">
+ <h:commandButton value="Update" action="objects" actionListener="#{portalobjectmgr.theme.execute}"
+ styleClass="portlet-form-button"/>
+ <h:commandButton value="Cancel" action="#{portalobjectmgr.selectObject}"
+ styleClass="portlet-form-button"/>
+ </ui:define>
+ </ui:decorate>
+ </ui:define>
+ </ui:composition>
+</div>
+
Property changes on: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editPortalTheme.xhtml
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editProperties.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editProperties.xhtml (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editProperties.xhtml 2008-04-07 08:53:27 UTC (rev 10509)
@@ -0,0 +1,57 @@
+<div
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:c="http://java.sun.com/jstl/core">
+
+ <ui:composition template="objectTemplate.xhtml">
+
+ <ui:param name="portalObjectScreen" value="Properties"/>
+
+ <ui:define name="content">
+ <br/>
+ <div class="tenpx-top-bottom">
+ <p class="portlet-area-header">Event Listener Binding</p>
+
+ <div class="portlet-area-body tenpx-top-bottom">
+ <h:form>
+ <h:outputLabel for="listener" styleClass="portlet-form-field-label">
+ Choose the id of the PortalEventListener to bind to this #{portalobjectmgr.selectedObjectType}:
+ </h:outputLabel>
+ <h:selectOneMenu id="listener" value="#{portalobjectmgr.selectedObject.listener}">
+ <f:selectItems value="#{portalobjectmgr.listenerIds}"/>
+ </h:selectOneMenu>
+ <h:commandButton value="Update" styleClass="portlet-form-button"/>
+ </h:form>
+ </div>
+ </div>
+ <ui:include src="common/editProperties.xhtml">
+ <ui:param name="properties" value="#{portalobjectmgr.selectedProperties}"/>
+ </ui:include>
+
+ <br/>
+ <c:if
+ test="#{portalobjectmgr.selectedProperties.relatedObject.type == PortalObject.TYPE_CONTEXT or portalobjectmgr.selectedProperties.relatedObject.type == PortalObject.TYPE_PORTAL}">
+
+ <!-- -->
+ <ui:include src="common/editPortalErrorHandling.xhtml">
+ <ui:param name="properties" value="#{portalobjectmgr.controlProperties}"/>
+ </ui:include>
+
+ </c:if>
+
+ <br/>
+ <c:if test="#{!(portalobjectmgr.selectedProperties.relatedObject.type == PortalObject.TYPE_WINDOW)}">
+
+ <!-- Separation -->
+ <ui:include src="common/editPageErrorHandling.xhtml">
+ <ui:param name="properties" value="#{portalobjectmgr.controlProperties}"/>
+ </ui:include>
+
+ </c:if>
+
+ </ui:define>
+
+ </ui:composition>
+</div>
\ No newline at end of file
Added: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editWindow.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editWindow.xhtml (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editWindow.xhtml 2008-04-07 08:53:27 UTC (rev 10509)
@@ -0,0 +1,30 @@
+<div
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:ct="http://www.julien.com"
+ xmlns:jbp="http://www.jboss.org/portal"
+ xmlns:h="http://java.sun.com/jsf/html">
+
+ <ui:composition template="objectTemplate.xhtml">
+
+ <ui:define name="content">
+
+ <!-- -->
+ <div class="clear">
+ <h:form></h:form>
+ <jbp:portlet
+ actionListener="#{portalobjectmgr.processEvent}"
+ portletId="#{portalobjectmgr.selectedContentEditorInstance}"
+ portletInvoker="#{portalobjectmgr.portletDefinitionInvoker}"
+ renderParameters="#{portalobjectmgr.renderParameters}"
+ supportedModes="edit_content"
+ supportedWindowStates="normal"
+ initialMode="edit_content"
+ initialWindowState="normal"/>
+ </div>
+
+ </ui:define>
+
+ </ui:composition>
+
+</div>
Added: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editWindowSecurity.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editWindowSecurity.xhtml (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editWindowSecurity.xhtml 2008-04-07 08:53:27 UTC (rev 10509)
@@ -0,0 +1,13 @@
+<div
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html">
+ <ui:composition template="objectTemplate.xhtml">
+ <ui:param name="portalObjectScreen" value="Security"/>
+ <ui:define name="content">
+ <h3>Please set the permissions for the <span class="objectName">#{portalobjectmgr.selectedObject.name}</span>
+ window</h3>
+ <ui:include src="common/editSecurity.xhtml"/>
+ </ui:define>
+ </ui:composition>
+</div>
Added: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editWindowTheme.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editWindowTheme.xhtml (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editWindowTheme.xhtml 2008-04-07 08:53:27 UTC (rev 10509)
@@ -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:f="http://java.sun.com/jsf/core">
+ <ui:composition template="objectTemplate.xhtml">
+ <ui:param name="portalObjectScreen" value="Theme"/>
+ <ui:define name="content">
+ <h3>Window theme properties</h3>
+ <ui:decorate template="common/editWindowTheme.xhtml">
+ <ui:param name="theme" value="#{portalobjectmgr.theme}"/>
+ <ui:define name="form_submit">
+ <h:commandButton value="Update" action="objects" actionListener="#{portalobjectmgr.theme.execute}"
+ styleClass="portlet-form-button portlet-section-buttonrow"/>
+ <h:commandButton value="Cancel" action="#{portalobjectmgr.selectObject}"
+ styleClass="portlet-form-button portlet-section-buttonrow"/>
+ </ui:define>
+ </ui:decorate>
+ </ui:define>
+ </ui:composition>
+</div>
+
Added: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/instances.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/instances.xhtml (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/instances.xhtml 2008-04-07 08:53:27 UTC (rev 10509)
@@ -0,0 +1,153 @@
+<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:jbp="http://www.jboss.com/portal"
+ xmlns:c="http://java.sun.com/jstl/core">
+
+<ui:composition template="instancesTemplate.xhtml">
+
+<ui:define name="content">
+
+<c:if test="#{empty instancemgr.selectedPlugin}">
+ <h:form>
+ <table id="instancesTable2" class="portlet-def-table datatable">
+ <thead class="portlet-section-header">
+ <tr>
+ <th>Instance id</th>
+ <th>Instance name</th>
+ <th>Actions</th>
+ </tr>
+ </thead>
+ <tbody>
+ <c:forEach items="#{instancemgr.selectedInstances}" var="instance" varStatus="status">
+ <tr
+ class="#{instance.id == instancemgr.selectedId ? 'portlet-section-selected' : (status.index % 2 == 0 ? 'portlet-section-body' : 'portlet-section-alternate')}">
+ <td>
+ <img src="#{instance.portlet.smallIconLocation}" align="middle" style="margin:0 4px 0 0"/>
+ <h:commandLink action="#{instancemgr.selectInstance}">
+ <h:outputText value="#{instance.id}"/>
+ <f:param name="id" value="#{instance.id}"/>
+ <f:param name="plugin" value="info"/>
+ </h:commandLink>
+ </td>
+ <td>
+ <h:outputText value="#{instance.displayName}"/>
+ </td>
+ <td><h:commandLink action="#{instancemgr.selectInstance}" styleClass="actionSecurity">
+ <f:param name="id" value="#{instance.id}"/>
+ <f:param name="plugin" value="security"/>
+ Security
+ </h:commandLink> | <h:panelGroup
+ rendered="#{! empty(instancemgr.selectedInstancesPrefs[instance.id])}"><h:commandLink
+ action="#{instancemgr.selectInstance}" styleClass="actionPreferences">
+ <f:param name="id" value="#{instance.id}"/>
+ <f:param name="plugin" value="preferences"/>
+ Preferences
+ </h:commandLink> | </h:panelGroup><h:commandLink action="confirmDeleteInstance"
+ styleClass="actionDelete"
+ actionListener="#{instancemgr.selectInstance}">
+ <f:param name="id" value="#{instance.id}"/>
+ Delete
+ </h:commandLink>
+ </td>
+ </tr>
+ </c:forEach>
+ </tbody>
+ </table>
+ <ul class="pagination property-container">
+ <c:if test="#{instancemgr.instanceCount > instancemgr.paginationSize}">
+ <c:forEach begin="0" end="#{(instancemgr.instanceCount - 1)/ instancemgr.paginationSize}" step="1"
+ var="index">
+ <li class="#{index == (instancemgr.selectedFrom / instancemgr.paginationSize)? 'selected' : ''}">
+ <h:commandLink action="#{instancemgr.selectFrom}">
+ <f:param name="from" value="#{index * instancemgr.paginationSize}"/>
+ <h:outputText value="#{index * instancemgr.paginationSize}"/>
+ </h:commandLink>
+ </li>
+ </c:forEach>
+ </c:if>
+ </ul>
+ </h:form>
+</c:if>
+
+
+<c:if test="#{instancemgr.selectedPlugin == 'info'}">
+ <!-- Path nav -->
+ <h:form>
+ <ul class="objectpath">
+ <li class="pathItem">
+ <h:commandLink action="#{instancemgr.selectInstance}">Portlet Instances</h:commandLink>
+ </li>
+ <li class="pathSeparator"><h:graphicImage url="/img/pathSeparator.png" alt=">"/></li>
+ <li class="selected">
+ <span class="objectName">#{instancemgr.selectedInstance.id}</span> portlet details
+ </li>
+ </ul>
+ </h:form>
+ <br/>
+ <c:choose>
+ <c:when test="#{instancemgr.selectedInstance.portlet != null}">
+ <ui:include src="common/showPortletDetails.xhtml">
+ <ui:param name="portlet" value="#{instancemgr.selectedInstance.portlet}"/>
+ <ui:param name="portletmgr" value="#{portletmgr}"/>
+ <ui:param name="showDisplayNameEditor" value="true"/>
+ </ui:include>
+ </c:when>
+ <c:otherwise>
+ The associated portlet is not available.
+ </c:otherwise>
+ </c:choose>
+</c:if>
+
+<c:if test="#{instancemgr.selectedPlugin == 'preferences'}">
+ <!-- Path nav -->
+ <h:form>
+ <ul class="objectpath">
+ <li class="pathItem">
+ <h:commandLink action="#{instancemgr.selectInstance}">Portlet Instances</h:commandLink>
+ </li>
+ <li class="pathSeparator"><h:graphicImage url="/img/pathSeparator.png" alt=">"/></li>
+ <li class="selected">
+ <span class="objectName">#{instancemgr.selectedInstance.id}</span> preferences
+ </li>
+ </ul>
+ </h:form>
+ <br/>
+ <div class="property-container">
+ <ui:include src="common/editPreferences.xhtml">
+ <ui:param name="prefs" value="#{instancemgr.selectedPrefs}"/>
+ </ui:include>
+ <br />
+ <h:form>
+ <h:commandButton value="Save" action="#{instancemgr.updatePrefs}" styleClass="portlet-form-button"/>
+ <h:commandButton value="Cancel" action="#{instancemgr.cancelPrefs}" styleClass="portlet-form-button"/>
+ </h:form>
+ </div>
+</c:if>
+
+<c:if test="#{instancemgr.selectedPlugin == 'security'}">
+ <!-- Path nav -->
+ <h:form>
+ <ul class="objectpath">
+ <li class="pathItem">
+ <h:commandLink action="#{instancemgr.selectInstance}">Portlet Instances</h:commandLink>
+ </li>
+ <li class="pathSeparator"><h:graphicImage url="/img/pathSeparator.png" alt=">"/></li>
+ <li class="selected">
+ <span class="objectName">#{instancemgr.selectedInstance.id}</span> security settings
+ </li>
+ </ul>
+ </h:form>
+ <br/>
+ <div class="property-container">
+ <ui:decorate template="/jsf/common/editSecurity.xhtml">
+ <ui:param name="auth" value="#{instancemgr.auth}"/>
+ </ui:decorate>
+ </div>
+</c:if>
+
+</ui:define>
+</ui:composition>
+</div>
Property changes on: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/instances.xhtml
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/instancesTemplate.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/instancesTemplate.xhtml (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/instancesTemplate.xhtml 2008-04-07 08:53:27 UTC (rev 10509)
@@ -0,0 +1,33 @@
+<div
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ class="admin-ui">
+
+ <!-- Common nav -->
+ <h:form>
+ <ul class="topnav">
+ <li>
+ <h:commandLink value="Portal Objects" action="objects"
+ actionListener="#{portalobjectmgr.selectRootObject}"/>
+ </li>
+ <li id="currentTab">Portlet Instances</li>
+ <li>
+ <h:commandLink value="Portlet Definitions" action="portlets"/>
+ </li>
+ <li>
+ <h:commandLink value="Dashboards" action="dashboards"/>
+ </li>
+ </ul>
+ </h:form>
+ <ui:decorate template="common/tabContainer.xhtml">
+ <ui:define name="tab-container-content">
+ <!-- Status message -->
+ <h:message id="status" for="status" infoClass="portlet-msg-success" errorClass="portlet-msg-error"
+ fatalClass="portlet-msg-error" warnClass="portlet-msg-alert"/>
+
+ <!-- Content -->
+ <ui:insert name="content">Content</ui:insert>
+ </ui:define>
+ </ui:decorate>
+</div>
Added: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/objectNavigation.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/objectNavigation.xhtml (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/objectNavigation.xhtml 2008-04-07 08:53:27 UTC (rev 10509)
@@ -0,0 +1,197 @@
+<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:fn="http://java.sun.com/jsp/jstl/functions"
+ xmlns:pfc="http://www.jboss.com/portal/facelet/common"
+ xmlns:c="http://java.sun.com/jstl/core">
+
+<h:form>
+
+<c:if test="#{not empty portalobjectmgr.selectedObject.portals}">
+ <h:dataTable var="object" value="#{portalobjectmgr.selectedObject.portals}" styleClass="objectList datatable"
+ rowClasses="portlet-section-body,portlet-section-alternate"
+ columnClasses="objectNameColumn, objectActionColumn"
+ headerClass="portlet-section-header">
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Portal"/>
+ </f:facet>
+ <h:commandLink action="#{portalobjectmgr.selectObject}">#{object.name}
+ <f:param name="id" value="#{object.id}"/>
+ </h:commandLink>
+ </h:column>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Actions"/>
+ </f:facet>
+ <h:commandLink action="editPortalSecurity" actionListener="#{portalobjectmgr.selectObject}"
+ styleClass="actionSecurity">
+ <f:param name="id" value="#{object.id}"/>
+ Security
+ </h:commandLink> | <h:commandLink action="editProperties" styleClass="actionProperties"
+ actionListener="#{portalobjectmgr.selectObject}">
+ <f:param name="id" value="#{object.id}"/>
+ Properties
+ </h:commandLink> | <h:commandLink action="editPortalTheme" styleClass="actionTheme"
+ actionListener="#{portalobjectmgr.selectObject}">
+ <f:param name="id" value="#{object.id}"/>
+ Theme
+ </h:commandLink>
+ <h:panelGroup
+ rendered="#{(object.name != 'admin') and (object.name != 'template')}">
+ | <h:commandLink action="renameObject" actionListener="#{portalobjectmgr.selectObject}"
+ styleClass="actionRename">
+ <h:outputText value="Rename"/>
+ <f:param name="id" value="#{object.id}"/>
+ </h:commandLink>
+ </h:panelGroup>
+ <h:panelGroup
+ rendered="#{(object.name != 'admin') and (object.name != 'template') and (not object.default)}">
+ | <h:commandLink action="confirm" styleClass="actionDelete"
+ actionListener="#{portalobjectmgr.selectDeletingObject}">
+ <f:param name="id" value="#{object.id}"/>
+ Delete
+ </h:commandLink>
+ </h:panelGroup>
+ <h:panelGroup rendered="#{not object.default}"> | <h:commandLink styleClass="actionMakeDefault"
+ action="#{portalobjectmgr.makeObjectDefault}">
+ <f:param name="id" value="#{object.id}"/>
+ Make Default
+ </h:commandLink>
+ </h:panelGroup>
+ <h:panelGroup rendered="#{object.default}"> | <h:outputText styleClass="actionDefault"
+ value="Default"/></h:panelGroup>
+ </h:column>
+ </h:dataTable>
+</c:if>
+
+<c:if test="#{not empty portalobjectmgr.selectedObject.pages}">
+ <h:dataTable var="object" value="#{portalobjectmgr.selectedObject.pages}" styleClass="objectList datatable"
+ columnClasses="objectNameColumn, objectActionColumn"
+ rowClasses="portlet-section-body,portlet-section-alternate"
+ headerClass="portlet-section-header">
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Page"/>
+ </f:facet>
+ <h:commandLink action="#{portalobjectmgr.selectObject}">#{object.name}
+ <f:param name="id" value="#{object.id}"/>
+ </h:commandLink>
+ </h:column>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Actions"/>
+ </f:facet>
+ <h:commandLink action="editPageLayout" actionListener="#{portalobjectmgr.selectObject}"
+ styleClass="actionLayout">
+ <f:param name="id" value="#{object.id}"/>
+ Page layout
+ </h:commandLink> | <h:commandLink action="editPageSecurity" styleClass="actionSecurity"
+ actionListener="#{portalobjectmgr.selectObject}">
+ <f:param name="id" value="#{object.id}"/>
+ Security
+ </h:commandLink> | <h:commandLink action="editProperties" styleClass="actionProperties"
+ actionListener="#{portalobjectmgr.selectObject}">
+ <f:param name="id" value="#{object.id}"/>
+ Properties
+ </h:commandLink> | <h:commandLink action="editPageTheme" styleClass="actionTheme"
+ actionListener="#{portalobjectmgr.selectObject}">
+ <f:param name="id" value="#{object.id}"/>
+ Theme
+ </h:commandLink> | <h:commandLink action="renameObject" styleClass="actionRename"
+ actionListener="#{portalobjectmgr.selectObject}">
+ <f:param name="id" value="#{object.id}"/>
+ Rename
+ </h:commandLink> | <h:commandLink action="#{addDisplayNameAction.editDisplayNames}" styleClass="actionRename"
+ actionListener="#{portalobjectmgr.selectObject}">
+ <f:param name="id" value="#{object.id}"/>
+ Display Names
+ </h:commandLink> |<h:commandLink action="confirm" styleClass="actionDelete"
+ actionListener="#{portalobjectmgr.selectDeletingObject}">
+ <f:param name="id" value="#{object.id}"/>
+ Delete
+ </h:commandLink>
+ <h:panelGroup rendered="#{not object.default}"> | <h:commandLink styleClass="actionMakeDefault"
+ action="#{portalobjectmgr.makeObjectDefault}">
+ <f:param name="id" value="#{object.id}"/>
+ Make Default
+ </h:commandLink>
+ </h:panelGroup>
+ <h:panelGroup rendered="#{object.default}"> | <h:outputText styleClass="actionDefault"
+ value="Default"/></h:panelGroup>
+ </h:column>
+ </h:dataTable>
+</c:if>
+
+<c:if test="#{not empty portalobjectmgr.selectedObject.windows}">
+ <h3 class="sectionTitle">Manage windows within <span class="objectName">#{portalobjectmgr.selectedObject.name}</span>
+ #{portalobjectmgr.selectedObject.typeName}</h3>
+
+ <ui:param name="maximizedStateExists" value="#{portalobjectmgr.selectedObject.maximizedStateExists}"/>
+
+ <h:dataTable var="object" value="#{portalobjectmgr.selectedObject.windows}" styleClass="objectList datatable"
+ rowClasses="portlet-section-body,portlet-section-alternate"
+ columnClasses="objectNameColumn, objectActionColumn"
+ headerClass="portlet-section-header">
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Window"/>
+ </f:facet>
+
+ <h:graphicImage
+ title="#{object.declaredProperties['portal.windowInitialState'] eq 'MINIMIZED' ? 'This window is set to a minimized state.' : 'This window defaults to a normal state.'}"
+ rendered="#{!maximizedStateExists}"
+ value="#{object.declaredProperties['portal.windowInitialState'] eq 'MINIMIZED' ? '/img/min-icon.gif' : '/img/norm-icon.gif' }"
+ styleClass="windowStateIcon"
+ alt=""/>
+
+ <h:graphicImage
+ title="#{object.declaredProperties['portal.windowInitialState'] eq 'MAXIMIZED' ? 'This window is set to a maximized state.' : 'This window defaults to a minimized state because one window within this page is set to maximized.'}"
+ rendered="#{maximizedStateExists}"
+ value="#{object.declaredProperties['portal.windowInitialState'] eq 'MAXIMIZED' ? '/img/max-icon.gif' : '/img/min-icon.gif'}"
+ styleClass="windowStateIcon"
+ alt=""/>
+
+
+ <!-- disable edit window for content type widget until JBPORTAL-1561 is fixed -->
+ <h:outputText value="#{object.name}"
+ rendered="#{fn:startsWith(object.declaredProperties['portal.windowContentType'], 'widget/')}"/>
+
+ <h:commandLink action="#{portalobjectmgr.selectObject}"
+ rendered="#{! fn:startsWith(object.declaredProperties['portal.windowContentType'], 'widget/')}">
+ <h:outputText value="#{object.name}"/>
+ <f:param name="id" value="#{object.id}"/>
+ </h:commandLink>
+
+
+ </h:column>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Actions"/>
+ </f:facet>
+ <h:commandLink action="editWindowTheme" actionListener="#{portalobjectmgr.selectObject}"
+ styleClass="actionTheme">
+ <f:param name="id" value="#{object.id}"/>
+ Theme
+ </h:commandLink> | <h:commandLink action="editProperties" styleClass="actionProperties"
+ actionListener="#{portalobjectmgr.selectObject}">
+ <f:param name="id" value="#{object.id}"/>
+ <f:param name="maximizedStateExists" value="#{portalobjectmgr.selectedObject.maximizedStateExists}"/>
+ Properties
+ </h:commandLink> | <h:commandLink action="renameObject" styleClass="actionRename"
+ actionListener="#{portalobjectmgr.selectObject}">
+ <f:param name="id" value="#{object.id}"/>
+ Rename
+ </h:commandLink> | <h:commandLink action="confirm" actionListener="#{portalobjectmgr.selectDeletingObject}"
+ styleClass="actionDelete">
+ <f:param name="id" value="#{object.id}"/>
+ Delete
+ </h:commandLink>
+ </h:column>
+ </h:dataTable>
+</c:if>
+</h:form>
+
+</div>
Added: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/objectTemplate.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/objectTemplate.xhtml (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/objectTemplate.xhtml 2008-04-07 08:53:27 UTC (rev 10509)
@@ -0,0 +1,69 @@
+<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:f="http://java.sun.com/jsf/core"
+ xmlns:fn="http://java.sun.com/jsp/jstl/functions"
+ xmlns:c="http://java.sun.com/jstl/core"
+ class="admin-ui">
+
+ <!-- Common nav -->
+ <h:form>
+ <ul class="topnav">
+ <li id="currentTab">Portal Objects</li>
+ <li>
+ <h:commandLink value="Portlet Instances" action="instances"/>
+ </li>
+ <li>
+ <h:commandLink value="Portlet Definitions" action="portlets"/>
+ </li>
+ <li>
+ <h:commandLink value="Dashboards" action="dashboards"/>
+ </li>
+ </ul>
+ </h:form>
+ <ui:decorate template="common/tabContainer.xhtml">
+ <ui:define name="tab-container-content">
+ <!-- Path nav -->
+ <h:form>
+ <ul class="objectpath">
+ <c:forEach items="#{portalobjectmgr.selectedObjectPath}" var="node">
+ <c:if test="#{node.type != PortalObject.TYPE_CONTEXT}">
+ <li class="pathSeparator"><h:graphicImage url="/img/pathSeparator.png" alt=">"/></li>
+ </c:if>
+ <li class="#{node.id == portalobjectmgr.selectedObject.id ? 'selected' : 'pathItem'}">
+ <c:choose>
+ <c:when test="#{fn:startsWith(node.declaredProperties['portal.windowContentType'], 'widget/')}">
+ <!-- If window is of contentType widget -->
+ <h:panelGroup rendered="#{fn:startsWith(node.declaredProperties['portal.windowContentType'], 'widget/')}">
+ <span class="objectName">#{node.name}</span> #{node.typeName}
+ </h:panelGroup>
+ </c:when>
+ <c:otherwise>
+ <h:commandLink action="#{portalobjectmgr.selectObject}">
+ <f:param name="id" value="#{node.id}"/>
+ <c:choose>
+ <c:when test="#{node.type == PortalObject.TYPE_CONTEXT}">Portals</c:when>
+ <c:otherwise><span class="objectName">#{node.name}</span> #{node.typeName}</c:otherwise>
+ </c:choose>
+ </h:commandLink>
+ </c:otherwise>
+ </c:choose>
+ <h:outputText value=" #{portalObjectScreen}"
+ rendered="#{portalObjectScreen != null and node.id == portalobjectmgr.selectedObject.id}"/>
+ </li>
+ </c:forEach>
+ </ul>
+ </h:form>
+
+ <!-- Status message -->
+ <h:message id="status" for="status" infoClass="portlet-msg-success" errorClass="portlet-msg-error"
+ fatalClass="portlet-msg-error" warnClass="portlet-msg-alert"/>
+
+ <!-- Content -->
+ <div class="property-container">
+ <ui:insert name="content">Content</ui:insert>
+ </div>
+ </ui:define>
+ </ui:decorate>
+</div>
Added: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/objects.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/objects.xhtml (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/objects.xhtml 2008-04-07 08:53:27 UTC (rev 10509)
@@ -0,0 +1,28 @@
+<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 == PortalObject.TYPE_CONTEXT}">
+ <ui:include src="editContext.xhtml"/>
+ </c:when>
+ <c:when test="#{portalobjectmgr.selectedObject.type == PortalObject.TYPE_PORTAL}">
+ <ui:include src="editPage.xhtml"/>
+ </c:when>
+ <c:when test="#{portalobjectmgr.selectedObject.type == PortalObject.TYPE_PAGE}">
+ <ui:include src="editPage.xhtml"/>
+ </c:when>
+ <c:when test="#{portalobjectmgr.selectedObject.type == PortalObject.TYPE_WINDOW}">
+ <ui:include src="editWindow.xhtml"/>
+ </c:when>
+ <c:otherwise>FIXME</c:otherwise>
+ </c:choose>
+
+ <h:form>
+ <p style="text-align: right"><h:commandLink action="#{newWindowWizard.reset}">Switch to wizard
+ mode</h:commandLink></p>
+ </h:form>
+
+</div>
Added: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/portlets.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/portlets.xhtml (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/portlets.xhtml 2008-04-07 08:53:27 UTC (rev 10509)
@@ -0,0 +1,161 @@
+<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:jbp="http://www.jboss.com/portal"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:pfc="http://www.jboss.com/portal/facelet/common"
+ xmlns:portlet="http://java.sun.com/portlet">
+
+<ui:composition template="portletsTemplate.xhtml">
+
+<ui:define name="content">
+
+<c:if test="#{empty portletmgr.selectedPlugin}">
+ <div class="provider-menu-container">
+ <h:form>
+ <h:outputLabel for="menu">
+ <h:outputText value="View portlets provided by the portlet provider named: "
+ 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="View portlets" styleClass="portlet-form-button"/>
+ </h:form>
+ </div>
+ <h:form>
+
+ <table class="portlet-def-table datatable">
+ <thead class="portlet-section-header">
+ <tr>
+ <th>Portlet name</th>
+ <th>Description</th>
+ <th>Remote</th>
+ <th>Remotable</th>
+ <th>Actions</th>
+ </tr>
+ </thead>
+ <tbody>
+ <c:forEach items="#{portletmgr.selectedPortlets}" var="portlet" varStatus="status">
+ <tr
+ class="#{portlet.context.id == portletmgr.selectedPortlet.context.id ? 'portlet-section-selected' : (status.index % 2 == 0 ? 'portlet-section-body' : 'portlet-section-alternate')}">
+ <td>
+ <img src="#{portlet.smallIconLocation}" align="middle" style="margin:0 4px 0 0"/>
+ <h:commandLink
+ action="#{portletmgr.selectPortlet}"
+ title="#{portlet.context.id}">
+ <f:param name="id" value="#{portlet.context.id}"/>
+ <f:param name="plugin" value="manager"/>
+ #{portlet.name}
+ </h:commandLink>
+ </td>
+ <td>#{portlet.description.value}</td>
+ <td><h:selectBooleanCheckbox disabled="true" value="#{portlet.remote}"/></td>
+ <td><h:selectBooleanCheckbox disabled="true" value="#{portlet.remotable}"/></td>
+ <td>
+ <h:panelGroup rendered="#{!empty portlet.info.preferences.keys}">
+ <h:commandLink action="#{portletmgr.selectPortlet}" styleClass="actionPreferences">
+ <f:param name="id" value="#{portlet.context.id}"/>
+ <f:param name="plugin" value="preferences"/>
+ Preferences
+ </h:commandLink> | </h:panelGroup>
+ <h:commandLink action="#{portletmgr.selectPortlet}" styleClass="actionCreateInstance">
+ <f:param name="id" value="#{portlet.context.id}"/>
+ <f:param name="plugin" value="createInstance"/>
+ Create instance
+ </h:commandLink>
+ </td>
+ </tr>
+ </c:forEach>
+ </tbody>
+ </table>
+ <ul class="pagination property-container">
+ <c:if test="#{portletmgr.portletCount > portletmgr.paginationSize}">
+ <c:forEach begin="0" end="#{(portletmgr.portletCount - 1) / portletmgr.paginationSize}" step="1"
+ var="index">
+ <li class="#{index == (portletmgr.selectedFrom / portletmgr.paginationSize)? 'selected' : ''}">
+ <h:commandLink action="#{portletmgr.selectFrom}">
+ <f:param name="from" value="#{index * portletmgr.paginationSize}"/>
+ #{index * portletmgr.paginationSize}
+ </h:commandLink>
+ </li>
+ </c:forEach>
+ </c:if>
+ </ul>
+ </h:form>
+</c:if>
+
+<c:if test="#{portletmgr.selectedPlugin == 'manager'}">
+ <!-- Path nav -->
+ <h:form>
+ <ul class="objectpath">
+ <li class="pathItem">
+ <h:commandLink action="#{portletmgr.selectPortlet}">Portlet Definitions</h:commandLink>
+ </li>
+ <li class="pathSeparator"><h:graphicImage url="/img/pathSeparator.png" alt=">"/></li>
+ <li class="selected">
+ <span class="objectName">#{portletmgr.selectedPortlet.name}</span> details
+ </li>
+ </ul>
+ </h:form>
+ <br/>
+ <ui:include src="common/showPortletDetails.xhtml">
+ <ui:param name="portlet" value="#{portletmgr.selectedPortlet}"/>
+ <ui:param name="showDisplayNameEditor" value="false"/>
+ </ui:include>
+</c:if>
+
+<c:if test="#{portletmgr.selectedPlugin == 'preferences'}">
+ <!-- Path nav -->
+ <h:form>
+ <ul class="objectpath">
+ <li class="pathItem">
+ <h:commandLink action="#{portletmgr.selectPortlet}">Portlet Definitions</h:commandLink>
+ </li>
+ <li class="pathSeparator"><h:graphicImage url="/img/pathSeparator.png" alt=">"/></li>
+ <li class="selected">
+ <span class="objectName">#{portletmgr.selectedPortlet.name}</span> preferences
+ </li>
+ </ul>
+ </h:form>
+ <br/>
+ <div class="property-container">
+ <ui:include src="common/editPreferences.xhtml">
+ <ui:param name="prefs" value="#{portletmgr.selectedPreferences}"/>
+ </ui:include>
+ </div>
+</c:if>
+
+<c:if test="#{portletmgr.selectedPlugin == 'createInstance'}">
+ <!-- Path nav -->
+ <h:form>
+ <ul class="objectpath">
+ <li class="pathItem">
+ <h:commandLink action="#{portletmgr.selectPortlet}">Portlet Definitions</h:commandLink>
+ </li>
+ <li class="pathSeparator"><h:graphicImage url="/img/pathSeparator.png" alt=">"/></li>
+ <li class="selected">
+ <span class="objectName">#{portletmgr.selectedPortlet.name}</span> instance creation
+ </li>
+ </ul>
+ </h:form>
+ <br/>
+ <div class="property-container">
+ <h:form id="add_instance_form" styleClass="createObjectForm">
+ <span class="portlet-font">Create an instance named: </span>
+ <h:inputText id="instanceId" value="#{createInstanceAction.instanceId}" styleClass="portlet-form-input-field"
+ required="true"/>
+ <br />
+ <h:commandButton action="#{createInstanceAction.execute}" value="Create instance"
+ styleClass="portlet-form-button"/>
+ <h:message for="instanceId" errorClass="portlet-msg-error"/>
+ </h:form>
+ </div>
+</c:if>
+
+</ui:define>
+</ui:composition>
+</div>
Property changes on: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/portlets.xhtml
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/portletsTemplate.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/portletsTemplate.xhtml (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/portletsTemplate.xhtml 2008-04-07 08:53:27 UTC (rev 10509)
@@ -0,0 +1,33 @@
+<div
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ class="admin-ui">
+
+ <!-- Common nav -->
+ <h:form>
+ <ul class="topnav">
+ <li>
+ <h:commandLink value="Portal Objects" action="objects"
+ actionListener="#{portalobjectmgr.selectRootObject}"/>
+ </li>
+ <li>
+ <h:commandLink value="Portlet Instances" action="instances"/>
+ </li>
+ <li id="currentTab">Portlet Definitions</li>
+ <li>
+ <h:commandLink value="Dashboards" action="dashboards"/>
+ </li>
+ </ul>
+ </h:form>
+ <ui:decorate template="common/tabContainer.xhtml">
+ <ui:define name="tab-container-content">
+ <!-- Status message -->
+ <h:message id="status" for="status" infoClass="portlet-msg-success" errorClass="portlet-msg-error"
+ fatalClass="portlet-msg-error" warnClass="portlet-msg-alert"/>
+
+ <!-- Content -->
+ <ui:insert name="content">Content</ui:insert>
+ </ui:define>
+ </ui:decorate>
+</div>
Added: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/renameObject.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/renameObject.xhtml (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/renameObject.xhtml 2008-04-07 08:53:27 UTC (rev 10509)
@@ -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:f="http://java.sun.com/jsf/core"
+ xmlns:c="http://java.sun.com/jstl/core">
+ <ui:composition template="/jsf/objectTemplate.xhtml">
+ <ui:param name="portalObjectScreen" value="Rename"/>
+ <ui:define name="content">
+ <h3>Rename #{portalobjectmgr.selectedObjectType}</h3>
+ <h:form id="renameForm">
+ <h:message for="newName"/>
+
+ <p>Rename the <span class="objectName">#{portalobjectmgr.selectedObject.name}</span>
+ #{portalobjectmgr.selectedObjectType} to:
+ <h:inputText id="newName" value="#{renameAction.newName}"/>
+ <h:commandButton value="Rename" action="#{renameAction.execute}" styleClass="portlet-form-button"/>
+ </p>
+ </h:form>
+ </ui:define>
+ </ui:composition>
+</div>
Added: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/newWindowTpl.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/newWindowTpl.xhtml (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/newWindowTpl.xhtml 2008-04-07 08:53:27 UTC (rev 10509)
@@ -0,0 +1,203 @@
+<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:f="http://java.sun.com/jsf/core"
+ xmlns:c="http://java.sun.com/jstl/core"
+ class="admin-ui">
+
+<link rel="stylesheet" type="text/css" href="/portal-admin/css/style.css" media="screen"/>
+
+<div class="wizard-tab-container">
+<ul class="objectpath">
+ <li class="selected">Adding a new Portlet</li>
+</ul>
+
+<div class="property-container">
+<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>
+ <c:choose>
+ <c:when test="#{newWindowWizard.enabled[0]}">
+ <h:form><h:commandLink action="#{newWindowWizard.goTo}">
+ <f:param name="step" value="0"/>
+
+ <div class="wizardStepBox">
+ <p class="stepNumber">Step 1</p>
+
+ <p class="stepText">Select Portlet</p>
+ </div>
+ </h:commandLink></h:form>
+ </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: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>
+ <c:choose>
+ <c:when test="#{newWindowWizard.enabled[1]}">
+ <h:form><h:commandLink action="#{newWindowWizard.goTo}">
+ <f:param name="step" value="1"/>
+
+ <div class="wizardStepBox">
+ <p class="stepNumber">Step 2</p>
+
+ <p class="stepText">Select Portal</p>
+ </div>
+ </h:commandLink></h:form>
+ </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: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>
+ <c:choose>
+ <c:when test="#{newWindowWizard.enabled[2]}">
+ <h:form><h:commandLink action="#{newWindowWizard.goTo}">
+ <f:param name="step" value="2"/>
+
+ <div class="wizardStepBox">
+ <p class="stepNumber">Step 3</p>
+
+ <p class="stepText">Select Page</p>
+ </div>
+ </h:commandLink></h:form>
+ </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: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>
+ <c:choose>
+ <c:when test="#{newWindowWizard.enabled[3]}">
+ <h:form><h:commandLink action="#{newWindowWizard.goTo}">
+ <f:param name="step" value="3"/>
+
+ <div class="wizardStepBox">
+ <p class="stepNumber">Step 4</p>
+
+ <p class="stepText">Select Region</p>
+ </div>
+ </h:commandLink></h:form>
+ </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: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>
+ <c:choose>
+ <c:when test="#{newWindowWizard.enabled[4]}">
+ <h:form><h:commandLink action="#{newWindowWizard.goTo}">
+ <f:param name="step" value="4"/>
+
+ <div class="wizardStepBox">
+ <p class="stepNumber">Step 5</p>
+
+ <p class="stepText">Confirm</p>
+ </div>
+ </h:commandLink></h:form>
+ </c:when>
+ <c:otherwise>
+ <div class="wizardStepBox">
+ <p class="stepNumber">Step 5</p>
+
+ <p class="stepText">Confirm</p>
+ </div>
+ </c:otherwise>
+ </c:choose>
+ </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
+ rendered="#{newWindowWizard.currentStep lt 4 and newWindowWizard.enabled[newWindowWizard.currentStep + 1]}"
+ value="Next" action="#{newWindowWizard.next}" styleClass="portlet-form-button"/>
+ </h:form>
+</div>
+
+<h:form>
+ <p style="text-align: right;"><h:commandLink action="advancedMode">Switch to advanced mode</h:commandLink></p>
+</h:form>
+</div>
+</div>
+
+</div>
\ No newline at end of file
Added: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/newWindowWizardConfirm.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/newWindowWizardConfirm.xhtml (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/newWindowWizardConfirm.xhtml 2008-04-07 08:53:27 UTC (rev 10509)
@@ -0,0 +1,38 @@
+<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><b>Portlet:</b></td>
+ <td>#{newWindowWizard.selectedPortlet.name}</td>
+ </tr>
+ <tr>
+ <td><b>Portal:</b></td>
+ <td>#{newWindowWizard.selectedPortal.name}</td>
+ </tr>
+ <tr>
+ <td><b>Page:</b></td>
+ <td>#{newWindowWizard.selectedPage.name}</td>
+ </tr>
+ <tr>
+ <td><b>Region:</b></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: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/selectPage.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/selectPage.xhtml (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/selectPage.xhtml 2008-04-07 08:53:27 UTC (rev 10509)
@@ -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">
+
+ <table class="datatable full-width">
+ <tbody class="portlet-section-header">
+ <tr>
+ <th>Page</th>
+ <th></th>
+ </tr>
+ </tbody>
+ <tbody>
+ <h:form>
+ <h:commandLink action="#{newWindowWizard.up}"
+ rendered="#{newWindowWizard.selectedParentPage.type != PortalObject.TYPE_PORTAL}">
+ <h:outputText value="Up"/>
+ <f:param name="id" value="#{newWindowWizard.selectedParentPageId}"/>
+ </h:commandLink>
+ <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>
+ </h:form>
+ </tbody>
+ </table>
+ </ui:define>
+ </ui:composition>
+</div>
\ No newline at end of file
Added: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/selectPortal.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/selectPortal.xhtml (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/selectPortal.xhtml 2008-04-07 08:53:27 UTC (rev 10509)
@@ -0,0 +1,36 @@
+<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 class="full-width datatable">
+
+ <tbody class="portlet-section-header">
+ <tr>
+ <th>Portal</th>
+ </tr>
+ </tbody>
+ <tbody>
+ <h:form>
+ <c:forEach items="#{newWindowWizard.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>
+ </h:form>
+ </tbody>
+
+ </table>
+ </ui:define>
+ </ui:composition>
+</div>
\ No newline at end of file
Added: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/selectPortlet.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/selectPortlet.xhtml (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/selectPortlet.xhtml 2008-04-07 08:53:27 UTC (rev 10509)
@@ -0,0 +1,55 @@
+<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 class="full-width datatable">
+ <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 title="#{portlet.description.value}">
+ <h:commandLink action="#{newWindowWizard.selectPortlet}">
+ <h:outputText>#{portlet.name}</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 property-container">
+ <c:forEach begin="0" end="#{(portletmgr.portletCount - 1)/portletmgr.paginationSize}" step="1"
+ var="index">
+ <li class="#{index == portletmgr.selectedFrom ? 'selected' : ''}">
+ <h:commandLink action="#{portletmgr.selectFrom}">
+ <f:param name="from" value="#{index * portletmgr.paginationSize}"/>
+ <h:outputText value="#{index * portletmgr.paginationSize}"/>
+ </h:commandLink>
+ </li>
+ </c:forEach>
+ </ul>
+ </h:form>
+
+ </ui:define>
+ </ui:composition>
+</div>
\ No newline at end of file
Added: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/selectRegion.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/selectRegion.xhtml (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/selectRegion.xhtml 2008-04-07 08:53:27 UTC (rev 10509)
@@ -0,0 +1,37 @@
+<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 class="full-width datatable">
+
+ <tbody class="portlet-section-header">
+ <tr>
+ <th>Portal</th>
+ </tr>
+ </tbody>
+ <tbody>
+ <h:form>
+ <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>
+ </h:form>
+ </tbody>
+ </table>
+
+ </ui:define>
+ </ui:composition>
+</div>
\ No newline at end of file
Modified: branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/JSFInvocation.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/JSFInvocation.java 2008-04-07 01:23:46 UTC (rev 10508)
+++ branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/JSFInvocation.java 2008-04-07 08:53:27 UTC (rev 10509)
@@ -121,8 +121,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");
18 years
JBoss Portal SVN: r10508 - docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: mmcallis
Date: 2008-04-06 21:23:46 -0400 (Sun, 06 Apr 2008)
New Revision: 10508
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/clustering.xml
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configuration.xml
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/installation.xml
Log:
using "sh run.sh" instead of "./run.sh", otherwise
an extra step (adding execute permissions) is required
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/clustering.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/clustering.xml 2008-04-04 23:52:53 UTC (rev 10507)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/clustering.xml 2008-04-07 01:23:46 UTC (rev 10508)
@@ -313,11 +313,11 @@
<para>Finally we can start both servers, open two shells and execute :
<programlisting><![CDATA[
>cd $JBOSS_HOME/bin
->./run.sh -c ports-01
+>sh run.sh -c ports-01
]]></programlisting>
<programlisting><![CDATA[
>cd $JBOSS_HOME/bin
->./run.sh -c ports-02
+>sh run.sh -c ports-02
]]></programlisting>
</para>
</sect1>
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configuration.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configuration.xml 2008-04-04 23:52:53 UTC (rev 10507)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configuration.xml 2008-04-07 01:23:46 UTC (rev 10508)
@@ -270,7 +270,7 @@
</para>
<para>
<screen>
-./run.sh -Dportal.kernel.no_proxies=false
+sh run.sh -Dportal.kernel.no_proxies=false
</screen>
</para>
<para>
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/installation.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/installation.xml 2008-04-04 23:52:53 UTC (rev 10507)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/installation.xml 2008-04-07 01:23:46 UTC (rev 10508)
@@ -25,7 +25,7 @@
</listitem>
<listitem>
<para>
- <emphasis role="bold">Start the server:</emphasis> change into the <filename>JBOSS_PORTAL_INSTALLATION_DIRECTORY/bin/</filename> directory. On Microsoft Windows, execute <command>run.bat</command>. On Linux, run the <command>./run.sh</command> command. To specify a configuration to use, for example, the default configuration, append the <command> -c default</command> option to the <command>run.bat</command> or <command>./run.sh</command> commands.
+ <emphasis role="bold">Start the server:</emphasis> change into the <filename>JBOSS_PORTAL_INSTALLATION_DIRECTORY/bin/</filename> directory. On Microsoft Windows, execute <command>run.bat</command>. On Linux, run the <command>sh run.sh</command> command. To specify a configuration to use, for example, the default configuration, append the <command> -c default</command> option to the <command>run.bat</command> or <command>sh run.sh</command> commands.
</para>
</listitem>
<listitem>
@@ -161,7 +161,7 @@
</listitem>
<listitem>
<para>
- <emphasis role="bold">Start the server:</emphasis> change into the <filename>$JBOSS_HOME/bin/</filename> directory. On Microsoft Windows, execute <command>run.bat</command>. On Linux, run the <command>./run.sh</command> command. To specify a configuration to use, for example, the default configuration, append the <command> -c default</command> option to the <command>run.bat</command> or <command>./run.sh</command> commands.
+ <emphasis role="bold">Start the server:</emphasis> change into the <filename>$JBOSS_HOME/bin/</filename> directory. On Microsoft Windows, execute <command>run.bat</command>. On Linux, run the <command>sh run.sh</command> command. To specify a configuration to use, for example, the default configuration, append the <command> -c default</command> option to the <command>run.bat</command> or <command>sh run.sh</command> commands.
</para>
</listitem>
<listitem>
@@ -456,7 +456,7 @@
</listitem>
<listitem>
<para>
- <emphasis role="bold">Start the server:</emphasis> change into the <filename>$JBOSS_HOME/bin/</filename> directory. On Microsoft Windows, execute <command>run.bat</command>. On Linux, run the <command>./run.sh</command> command. To specify a configuration to use, for example, the default configuration, append the <command> -c default</command> option to the <command>run.bat</command> or <command>./run.sh</command> commands.
+ <emphasis role="bold">Start the server:</emphasis> change into the <filename>$JBOSS_HOME/bin/</filename> directory. On Microsoft Windows, execute <command>run.bat</command>. On Linux, run the <command>sh run.sh</command> command. To specify a configuration to use, for example, the default configuration, append the <command> -c default</command> option to the <command>run.bat</command> or <command>sh run.sh</command> commands.
</para>
</listitem>
<listitem>
18 years