gatein SVN: r4775 - in components/pc/trunk: api and 12 other directories.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-10-22 12:32:04 -0400 (Fri, 22 Oct 2010)
New Revision: 4775
Modified:
components/pc/trunk/api/pom.xml
components/pc/trunk/bridge/pom.xml
components/pc/trunk/controller/pom.xml
components/pc/trunk/docs/pom.xml
components/pc/trunk/docs/user-guide/pom.xml
components/pc/trunk/federation/pom.xml
components/pc/trunk/jsr168api/pom.xml
components/pc/trunk/management/pom.xml
components/pc/trunk/mc/pom.xml
components/pc/trunk/pom.xml
components/pc/trunk/portal/pom.xml
components/pc/trunk/portlet/pom.xml
components/pc/trunk/samples/pom.xml
components/pc/trunk/test/pom.xml
Log:
[maven-release-plugin] prepare for next development iteration
Modified: components/pc/trunk/api/pom.xml
===================================================================
--- components/pc/trunk/api/pom.xml 2010-10-22 16:31:43 UTC (rev 4774)
+++ components/pc/trunk/api/pom.xml 2010-10-22 16:32:04 UTC (rev 4775)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-CR01</version>
+ <version>2.2.0-CR02-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.gatein.pc</groupId>
Modified: components/pc/trunk/bridge/pom.xml
===================================================================
--- components/pc/trunk/bridge/pom.xml 2010-10-22 16:31:43 UTC (rev 4774)
+++ components/pc/trunk/bridge/pom.xml 2010-10-22 16:32:04 UTC (rev 4775)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-CR01</version>
+ <version>2.2.0-CR02-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-bridge</artifactId>
Modified: components/pc/trunk/controller/pom.xml
===================================================================
--- components/pc/trunk/controller/pom.xml 2010-10-22 16:31:43 UTC (rev 4774)
+++ components/pc/trunk/controller/pom.xml 2010-10-22 16:32:04 UTC (rev 4775)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-CR01</version>
+ <version>2.2.0-CR02-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-controller</artifactId>
Modified: components/pc/trunk/docs/pom.xml
===================================================================
--- components/pc/trunk/docs/pom.xml 2010-10-22 16:31:43 UTC (rev 4774)
+++ components/pc/trunk/docs/pom.xml 2010-10-22 16:32:04 UTC (rev 4775)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-CR01</version>
+ <version>2.2.0-CR02-SNAPSHOT</version>
</parent>
<artifactId>docs-aggregator</artifactId>
<packaging>pom</packaging>
Modified: components/pc/trunk/docs/user-guide/pom.xml
===================================================================
--- components/pc/trunk/docs/user-guide/pom.xml 2010-10-22 16:31:43 UTC (rev 4774)
+++ components/pc/trunk/docs/user-guide/pom.xml 2010-10-22 16:32:04 UTC (rev 4775)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-CR01</version>
+ <version>2.2.0-CR02-SNAPSHOT</version>
</parent>
<groupId>org.gatein.pc</groupId>
<artifactId>user-guide-${translation}</artifactId>
Modified: components/pc/trunk/federation/pom.xml
===================================================================
--- components/pc/trunk/federation/pom.xml 2010-10-22 16:31:43 UTC (rev 4774)
+++ components/pc/trunk/federation/pom.xml 2010-10-22 16:32:04 UTC (rev 4775)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-CR01</version>
+ <version>2.2.0-CR02-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-federation</artifactId>
Modified: components/pc/trunk/jsr168api/pom.xml
===================================================================
--- components/pc/trunk/jsr168api/pom.xml 2010-10-22 16:31:43 UTC (rev 4774)
+++ components/pc/trunk/jsr168api/pom.xml 2010-10-22 16:32:04 UTC (rev 4775)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-CR01</version>
+ <version>2.2.0-CR02-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-jsr168api</artifactId>
Modified: components/pc/trunk/management/pom.xml
===================================================================
--- components/pc/trunk/management/pom.xml 2010-10-22 16:31:43 UTC (rev 4774)
+++ components/pc/trunk/management/pom.xml 2010-10-22 16:32:04 UTC (rev 4775)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-CR01</version>
+ <version>2.2.0-CR02-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-management</artifactId>
Modified: components/pc/trunk/mc/pom.xml
===================================================================
--- components/pc/trunk/mc/pom.xml 2010-10-22 16:31:43 UTC (rev 4774)
+++ components/pc/trunk/mc/pom.xml 2010-10-22 16:32:04 UTC (rev 4775)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-CR01</version>
+ <version>2.2.0-CR02-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-mc</artifactId>
Modified: components/pc/trunk/pom.xml
===================================================================
--- components/pc/trunk/pom.xml 2010-10-22 16:31:43 UTC (rev 4774)
+++ components/pc/trunk/pom.xml 2010-10-22 16:32:04 UTC (rev 4775)
@@ -29,7 +29,7 @@
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-CR01</version>
+ <version>2.2.0-CR02-SNAPSHOT</version>
<packaging>pom</packaging>
<parent>
@@ -39,9 +39,9 @@
</parent>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/gatein/components/pc/tags/2.2.0-CR01</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/gatein/components/pc/tags/2.2.0-CR01</developerConnection>
- <url>http://fisheye.jboss.org/browse/gatein/components/pc/tags/2.2.0-CR01</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/gatein/components/pc/trunk</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/gatein/components/pc/trunk</developerConnection>
+ <url>http://fisheye.jboss.org/browse/gatein/components/pc/trunk</url>
</scm>
<properties>
Modified: components/pc/trunk/portal/pom.xml
===================================================================
--- components/pc/trunk/portal/pom.xml 2010-10-22 16:31:43 UTC (rev 4774)
+++ components/pc/trunk/portal/pom.xml 2010-10-22 16:32:04 UTC (rev 4775)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-CR01</version>
+ <version>2.2.0-CR02-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-portal</artifactId>
Modified: components/pc/trunk/portlet/pom.xml
===================================================================
--- components/pc/trunk/portlet/pom.xml 2010-10-22 16:31:43 UTC (rev 4774)
+++ components/pc/trunk/portlet/pom.xml 2010-10-22 16:32:04 UTC (rev 4775)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-CR01</version>
+ <version>2.2.0-CR02-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-portlet</artifactId>
Modified: components/pc/trunk/samples/pom.xml
===================================================================
--- components/pc/trunk/samples/pom.xml 2010-10-22 16:31:43 UTC (rev 4774)
+++ components/pc/trunk/samples/pom.xml 2010-10-22 16:32:04 UTC (rev 4775)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-CR01</version>
+ <version>2.2.0-CR02-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-samples</artifactId>
Modified: components/pc/trunk/test/pom.xml
===================================================================
--- components/pc/trunk/test/pom.xml 2010-10-22 16:31:43 UTC (rev 4774)
+++ components/pc/trunk/test/pom.xml 2010-10-22 16:32:04 UTC (rev 4775)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-CR01</version>
+ <version>2.2.0-CR02-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-test</artifactId>
14 years, 2 months
gatein SVN: r4774 - components/pc/tags.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-10-22 12:31:43 -0400 (Fri, 22 Oct 2010)
New Revision: 4774
Added:
components/pc/tags/2.2.0-CR01/
Log:
[maven-scm] copy for tag 2.2.0-CR01
Copied: components/pc/tags/2.2.0-CR01 (from rev 4773, components/pc/trunk)
14 years, 2 months
gatein SVN: r4773 - in components/pc/trunk: api and 12 other directories.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-10-22 12:31:20 -0400 (Fri, 22 Oct 2010)
New Revision: 4773
Modified:
components/pc/trunk/api/pom.xml
components/pc/trunk/bridge/pom.xml
components/pc/trunk/controller/pom.xml
components/pc/trunk/docs/pom.xml
components/pc/trunk/docs/user-guide/pom.xml
components/pc/trunk/federation/pom.xml
components/pc/trunk/jsr168api/pom.xml
components/pc/trunk/management/pom.xml
components/pc/trunk/mc/pom.xml
components/pc/trunk/pom.xml
components/pc/trunk/portal/pom.xml
components/pc/trunk/portlet/pom.xml
components/pc/trunk/samples/pom.xml
components/pc/trunk/test/pom.xml
Log:
[maven-release-plugin] prepare release 2.2.0-CR01
Modified: components/pc/trunk/api/pom.xml
===================================================================
--- components/pc/trunk/api/pom.xml 2010-10-22 15:31:45 UTC (rev 4772)
+++ components/pc/trunk/api/pom.xml 2010-10-22 16:31:20 UTC (rev 4773)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-CR01-SNAPSHOT</version>
+ <version>2.2.0-CR01</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.gatein.pc</groupId>
Modified: components/pc/trunk/bridge/pom.xml
===================================================================
--- components/pc/trunk/bridge/pom.xml 2010-10-22 15:31:45 UTC (rev 4772)
+++ components/pc/trunk/bridge/pom.xml 2010-10-22 16:31:20 UTC (rev 4773)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-CR01-SNAPSHOT</version>
+ <version>2.2.0-CR01</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-bridge</artifactId>
Modified: components/pc/trunk/controller/pom.xml
===================================================================
--- components/pc/trunk/controller/pom.xml 2010-10-22 15:31:45 UTC (rev 4772)
+++ components/pc/trunk/controller/pom.xml 2010-10-22 16:31:20 UTC (rev 4773)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-CR01-SNAPSHOT</version>
+ <version>2.2.0-CR01</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-controller</artifactId>
Modified: components/pc/trunk/docs/pom.xml
===================================================================
--- components/pc/trunk/docs/pom.xml 2010-10-22 15:31:45 UTC (rev 4772)
+++ components/pc/trunk/docs/pom.xml 2010-10-22 16:31:20 UTC (rev 4773)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-CR01-SNAPSHOT</version>
+ <version>2.2.0-CR01</version>
</parent>
<artifactId>docs-aggregator</artifactId>
<packaging>pom</packaging>
Modified: components/pc/trunk/docs/user-guide/pom.xml
===================================================================
--- components/pc/trunk/docs/user-guide/pom.xml 2010-10-22 15:31:45 UTC (rev 4772)
+++ components/pc/trunk/docs/user-guide/pom.xml 2010-10-22 16:31:20 UTC (rev 4773)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-CR01-SNAPSHOT</version>
+ <version>2.2.0-CR01</version>
</parent>
<groupId>org.gatein.pc</groupId>
<artifactId>user-guide-${translation}</artifactId>
Modified: components/pc/trunk/federation/pom.xml
===================================================================
--- components/pc/trunk/federation/pom.xml 2010-10-22 15:31:45 UTC (rev 4772)
+++ components/pc/trunk/federation/pom.xml 2010-10-22 16:31:20 UTC (rev 4773)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-CR01-SNAPSHOT</version>
+ <version>2.2.0-CR01</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-federation</artifactId>
Modified: components/pc/trunk/jsr168api/pom.xml
===================================================================
--- components/pc/trunk/jsr168api/pom.xml 2010-10-22 15:31:45 UTC (rev 4772)
+++ components/pc/trunk/jsr168api/pom.xml 2010-10-22 16:31:20 UTC (rev 4773)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-CR01-SNAPSHOT</version>
+ <version>2.2.0-CR01</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-jsr168api</artifactId>
Modified: components/pc/trunk/management/pom.xml
===================================================================
--- components/pc/trunk/management/pom.xml 2010-10-22 15:31:45 UTC (rev 4772)
+++ components/pc/trunk/management/pom.xml 2010-10-22 16:31:20 UTC (rev 4773)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-CR01-SNAPSHOT</version>
+ <version>2.2.0-CR01</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-management</artifactId>
Modified: components/pc/trunk/mc/pom.xml
===================================================================
--- components/pc/trunk/mc/pom.xml 2010-10-22 15:31:45 UTC (rev 4772)
+++ components/pc/trunk/mc/pom.xml 2010-10-22 16:31:20 UTC (rev 4773)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-CR01-SNAPSHOT</version>
+ <version>2.2.0-CR01</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-mc</artifactId>
Modified: components/pc/trunk/pom.xml
===================================================================
--- components/pc/trunk/pom.xml 2010-10-22 15:31:45 UTC (rev 4772)
+++ components/pc/trunk/pom.xml 2010-10-22 16:31:20 UTC (rev 4773)
@@ -29,7 +29,7 @@
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-CR01-SNAPSHOT</version>
+ <version>2.2.0-CR01</version>
<packaging>pom</packaging>
<parent>
@@ -39,9 +39,9 @@
</parent>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/gatein/components/pc/trunk</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/gatein/components/pc/trunk</developerConnection>
- <url>http://fisheye.jboss.org/browse/gatein/components/pc/trunk</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/gatein/components/pc/tags/2.2.0-CR01</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/gatein/components/pc/tags/2.2.0-CR01</developerConnection>
+ <url>http://fisheye.jboss.org/browse/gatein/components/pc/tags/2.2.0-CR01</url>
</scm>
<properties>
Modified: components/pc/trunk/portal/pom.xml
===================================================================
--- components/pc/trunk/portal/pom.xml 2010-10-22 15:31:45 UTC (rev 4772)
+++ components/pc/trunk/portal/pom.xml 2010-10-22 16:31:20 UTC (rev 4773)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-CR01-SNAPSHOT</version>
+ <version>2.2.0-CR01</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-portal</artifactId>
Modified: components/pc/trunk/portlet/pom.xml
===================================================================
--- components/pc/trunk/portlet/pom.xml 2010-10-22 15:31:45 UTC (rev 4772)
+++ components/pc/trunk/portlet/pom.xml 2010-10-22 16:31:20 UTC (rev 4773)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-CR01-SNAPSHOT</version>
+ <version>2.2.0-CR01</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-portlet</artifactId>
Modified: components/pc/trunk/samples/pom.xml
===================================================================
--- components/pc/trunk/samples/pom.xml 2010-10-22 15:31:45 UTC (rev 4772)
+++ components/pc/trunk/samples/pom.xml 2010-10-22 16:31:20 UTC (rev 4773)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-CR01-SNAPSHOT</version>
+ <version>2.2.0-CR01</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-samples</artifactId>
Modified: components/pc/trunk/test/pom.xml
===================================================================
--- components/pc/trunk/test/pom.xml 2010-10-22 15:31:45 UTC (rev 4772)
+++ components/pc/trunk/test/pom.xml 2010-10-22 16:31:20 UTC (rev 4773)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-CR01-SNAPSHOT</version>
+ <version>2.2.0-CR01</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-test</artifactId>
14 years, 2 months
gatein SVN: r4772 - in epp/portal/branches/EPP_5_1_Branch: component/pc/src/main/java/org/exoplatform/portal/pc and 2 other directories.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-10-22 11:31:45 -0400 (Fri, 22 Oct 2010)
New Revision: 4772
Added:
epp/portal/branches/EPP_5_1_Branch/component/wsrp/src/main/java/org/gatein/portal/wsrp/MOPConsumerStructureProvider.java
Removed:
epp/portal/branches/EPP_5_1_Branch/component/wsrp/src/main/java/org/gatein/portal/wsrp/MOPPortalStructureProvider.java
Modified:
epp/portal/branches/EPP_5_1_Branch/component/pc/src/main/java/org/exoplatform/portal/pc/ExoKernelIntegration.java
epp/portal/branches/EPP_5_1_Branch/component/wsrp/src/main/java/org/gatein/portal/wsrp/WSRPServiceIntegration.java
epp/portal/branches/EPP_5_1_Branch/pom.xml
epp/portal/branches/EPP_5_1_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortlet.java
epp/portal/branches/EPP_5_1_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java
Log:
JBEPP-557: WSRP update
Modified: epp/portal/branches/EPP_5_1_Branch/component/pc/src/main/java/org/exoplatform/portal/pc/ExoKernelIntegration.java
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/component/pc/src/main/java/org/exoplatform/portal/pc/ExoKernelIntegration.java 2010-10-22 14:58:50 UTC (rev 4771)
+++ epp/portal/branches/EPP_5_1_Branch/component/pc/src/main/java/org/exoplatform/portal/pc/ExoKernelIntegration.java 2010-10-22 15:31:45 UTC (rev 4772)
@@ -159,4 +159,9 @@
portletApplicationRegistry.stop();
}
}
+
+ public PortletApplicationDeployer getPortletApplicationRegistry()
+ {
+ return portletApplicationRegistry;
+ }
}
Copied: epp/portal/branches/EPP_5_1_Branch/component/wsrp/src/main/java/org/gatein/portal/wsrp/MOPConsumerStructureProvider.java (from rev 4643, portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/MOPConsumerStructureProvider.java)
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/component/wsrp/src/main/java/org/gatein/portal/wsrp/MOPConsumerStructureProvider.java (rev 0)
+++ epp/portal/branches/EPP_5_1_Branch/component/wsrp/src/main/java/org/gatein/portal/wsrp/MOPConsumerStructureProvider.java 2010-10-22 15:31:45 UTC (rev 4772)
@@ -0,0 +1,214 @@
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2010, 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.gatein.portal.wsrp;
+
+import org.exoplatform.container.ExoContainer;
+import org.exoplatform.portal.mop.Described;
+import org.exoplatform.portal.pom.config.POMSession;
+import org.exoplatform.portal.pom.config.POMSessionManager;
+import org.exoplatform.portal.pom.data.PageKey;
+import org.exoplatform.portal.pom.spi.wsrp.WSRP;
+import org.gatein.common.util.ParameterValidation;
+import org.gatein.mop.api.content.Customization;
+import org.gatein.mop.api.workspace.ObjectType;
+import org.gatein.mop.api.workspace.Page;
+import org.gatein.mop.api.workspace.Site;
+import org.gatein.mop.api.workspace.Workspace;
+import org.gatein.mop.api.workspace.ui.UIComponent;
+import org.gatein.mop.api.workspace.ui.UIContainer;
+import org.gatein.mop.api.workspace.ui.UIWindow;
+import org.gatein.pc.api.PortletContext;
+import org.gatein.pc.api.PortletStateType;
+import org.gatein.pc.api.StatefulPortletContext;
+import org.gatein.wsrp.api.context.ConsumerStructureProvider;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public class MOPConsumerStructureProvider implements ConsumerStructureProvider
+{
+ private final POMSessionManager pomManager;
+ private Map<String, PageInfo> pageInfos;
+ private Map<String, String> windowIdToUUIDs;
+
+ public MOPConsumerStructureProvider(ExoContainer container)
+ {
+ pomManager = (POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
+ windowIdToUUIDs = new HashMap<String, String>();
+ }
+
+ public List<String> getPageIdentifiers()
+ {
+ if (pageInfos == null)
+ {
+ POMSession session = pomManager.getSession();
+ Workspace workspace = session.getWorkspace();
+ Collection<Site> sites = workspace.getSites(ObjectType.PORTAL_SITE);
+
+ pageInfos = new HashMap<String, PageInfo>();
+ for (Site site : sites)
+ {
+ Page page = site.getRootPage().getChild("pages");
+ if (page != null)
+ {
+ processPage(page, true);
+ }
+ }
+ }
+
+ LinkedList<String> identifiers = new LinkedList<String>(pageInfos.keySet());
+ Collections.sort(identifiers);
+ return identifiers;
+ }
+
+ private void processPage(Page page, boolean ignoreCurrent)
+ {
+ if (!ignoreCurrent)
+ {
+ Described described = page.adapt(Described.class);
+ PageInfo pageInfo = new PageInfo(page.getObjectId());
+ pageInfos.put(described.getName(), pageInfo);
+ UIContainer container = page.getRootComponent();
+ processContainer(container, pageInfo);
+ }
+
+ Collection<Page> children = page.getChildren();
+ if (ParameterValidation.existsAndIsNotEmpty(children))
+ {
+ for (Page child : children)
+ {
+ processPage(child, false);
+ }
+ }
+ }
+
+ public List<String> getWindowIdentifiersFor(String pageId)
+ {
+ PageInfo pageInfo = pageInfos.get(pageId);
+ ParameterValidation.throwIllegalArgExceptionIfNull(pageInfo, "PageInfo for " + pageId);
+
+ return pageInfo.getChildrenWindows();
+ }
+
+ private void processContainer(UIContainer container, PageInfo pageInfo)
+ {
+ List<UIComponent> components = container.getComponents();
+ for (UIComponent component : components)
+ {
+ ObjectType<? extends UIComponent> type = component.getObjectType();
+ if (ObjectType.WINDOW.equals(type))
+ {
+ Described described = component.adapt(Described.class);
+ String name = described.getName();
+ windowIdToUUIDs.put(name, component.getObjectId());
+ pageInfo.addWindow(name);
+ }
+ else if (ObjectType.CONTAINER.equals(type))
+ {
+ processContainer((UIContainer)component, pageInfo);
+ }
+ else
+ {
+ // ignore
+ }
+ }
+ }
+
+ public void assignPortletToWindow(PortletContext portletContext, String windowId, String pageId)
+ {
+ String uuid = windowIdToUUIDs.get(windowId);
+ ParameterValidation.throwIllegalArgExceptionIfNull(uuid, "UUID for " + windowId);
+
+ // get the window
+ POMSession session = pomManager.getSession();
+ UIWindow window = session.findObjectById(ObjectType.WINDOW, uuid);
+
+ // construct the new customization state
+ WSRP wsrp = new WSRP();
+ String portletId = portletContext.getId();
+ wsrp.setPortletId(portletId);
+ if (portletContext instanceof StatefulPortletContext)
+ {
+ StatefulPortletContext context = (StatefulPortletContext)portletContext;
+ if (PortletStateType.OPAQUE.equals(context.getType()))
+ {
+ wsrp.setState((byte[])context.getState());
+ }
+ else
+ {
+ throw new IllegalArgumentException("Don't know how to deal with state: " + context.getState());
+ }
+ }
+
+ // destroy existing customization as otherwise re-customizing will fail
+ Customization<?> customization = window.getCustomization();
+ customization.destroy();
+
+ // and re-customize
+ window.customize(WSRP.CONTENT_TYPE, portletId, wsrp);
+
+ // mark page for cache invalidation otherwise DataCache will use the previous customization id when trying to set
+ // the portlet state in UIPortlet.setState and will not find it resulting in an error
+ Page page = window.getPage();
+ session.scheduleForEviction(new PageKey("portal", page.getSite().getName(), page.getName()));
+
+ // save
+ session.close(true);
+ }
+
+ private static class PageInfo
+ {
+ private String uuid;
+ private List<String> childrenWindows;
+
+ private PageInfo(String uuid)
+ {
+ this.uuid = uuid;
+ childrenWindows = new LinkedList<String>();
+ }
+
+ public String getUUID()
+ {
+ return uuid;
+ }
+
+ public List<String> getChildrenWindows()
+ {
+ return childrenWindows;
+ }
+
+ public void addWindow(String windowName)
+ {
+ childrenWindows.add(windowName);
+ }
+ }
+}
Deleted: epp/portal/branches/EPP_5_1_Branch/component/wsrp/src/main/java/org/gatein/portal/wsrp/MOPPortalStructureProvider.java
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/component/wsrp/src/main/java/org/gatein/portal/wsrp/MOPPortalStructureProvider.java 2010-10-22 14:58:50 UTC (rev 4771)
+++ epp/portal/branches/EPP_5_1_Branch/component/wsrp/src/main/java/org/gatein/portal/wsrp/MOPPortalStructureProvider.java 2010-10-22 15:31:45 UTC (rev 4772)
@@ -1,214 +0,0 @@
-/*
- * JBoss, a division of Red Hat
- * Copyright 2010, 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.gatein.portal.wsrp;
-
-import org.exoplatform.container.ExoContainer;
-import org.exoplatform.portal.mop.Described;
-import org.exoplatform.portal.pom.config.POMSession;
-import org.exoplatform.portal.pom.config.POMSessionManager;
-import org.exoplatform.portal.pom.data.PageKey;
-import org.exoplatform.portal.pom.spi.wsrp.WSRP;
-import org.gatein.common.util.ParameterValidation;
-import org.gatein.mop.api.content.Customization;
-import org.gatein.mop.api.workspace.ObjectType;
-import org.gatein.mop.api.workspace.Page;
-import org.gatein.mop.api.workspace.Site;
-import org.gatein.mop.api.workspace.Workspace;
-import org.gatein.mop.api.workspace.ui.UIComponent;
-import org.gatein.mop.api.workspace.ui.UIContainer;
-import org.gatein.mop.api.workspace.ui.UIWindow;
-import org.gatein.pc.api.PortletContext;
-import org.gatein.pc.api.PortletStateType;
-import org.gatein.pc.api.StatefulPortletContext;
-import org.gatein.wsrp.api.context.ConsumerStructureProvider;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-/**
- * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
- * @version $Revision$
- */
-public class MOPPortalStructureProvider implements ConsumerStructureProvider
-{
- private final POMSessionManager pomManager;
- private Map<String, PageInfo> pageInfos;
- private Map<String, String> windowIdToUUIDs;
-
- public MOPPortalStructureProvider(ExoContainer container)
- {
- pomManager = (POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
- windowIdToUUIDs = new HashMap<String, String>();
- }
-
- public List<String> getPageIdentifiers()
- {
- if (pageInfos == null)
- {
- POMSession session = pomManager.getSession();
- Workspace workspace = session.getWorkspace();
- Collection<Site> sites = workspace.getSites(ObjectType.PORTAL_SITE);
-
- pageInfos = new HashMap<String, PageInfo>();
- for (Site site : sites)
- {
- Page page = site.getRootPage().getChild("pages");
- if (page != null)
- {
- processPage(page, true);
- }
- }
- }
-
- LinkedList<String> identifiers = new LinkedList<String>(pageInfos.keySet());
- Collections.sort(identifiers);
- return identifiers;
- }
-
- private void processPage(Page page, boolean ignoreCurrent)
- {
- if (!ignoreCurrent)
- {
- Described described = page.adapt(Described.class);
- PageInfo pageInfo = new PageInfo(page.getObjectId());
- pageInfos.put(described.getName(), pageInfo);
- UIContainer container = page.getRootComponent();
- processContainer(container, pageInfo);
- }
-
- Collection<Page> children = page.getChildren();
- if (ParameterValidation.existsAndIsNotEmpty(children))
- {
- for (Page child : children)
- {
- processPage(child, false);
- }
- }
- }
-
- public List<String> getWindowIdentifiersFor(String pageId)
- {
- PageInfo pageInfo = pageInfos.get(pageId);
- ParameterValidation.throwIllegalArgExceptionIfNull(pageInfo, "PageInfo for " + pageId);
-
- return pageInfo.getChildrenWindows();
- }
-
- private void processContainer(UIContainer container, PageInfo pageInfo)
- {
- List<UIComponent> components = container.getComponents();
- for (UIComponent component : components)
- {
- ObjectType<? extends UIComponent> type = component.getObjectType();
- if (ObjectType.WINDOW.equals(type))
- {
- Described described = component.adapt(Described.class);
- String name = described.getName();
- windowIdToUUIDs.put(name, component.getObjectId());
- pageInfo.addWindow(name);
- }
- else if (ObjectType.CONTAINER.equals(type))
- {
- processContainer((UIContainer)component, pageInfo);
- }
- else
- {
- // ignore
- }
- }
- }
-
- public void assignPortletToWindow(PortletContext portletContext, String windowId, String pageId)
- {
- String uuid = windowIdToUUIDs.get(windowId);
- ParameterValidation.throwIllegalArgExceptionIfNull(uuid, "UUID for " + windowId);
-
- // get the window
- POMSession session = pomManager.getSession();
- UIWindow window = session.findObjectById(ObjectType.WINDOW, uuid);
-
- // construct the new customization state
- WSRP wsrp = new WSRP();
- String portletId = portletContext.getId();
- wsrp.setPortletId(portletId);
- if (portletContext instanceof StatefulPortletContext)
- {
- StatefulPortletContext context = (StatefulPortletContext)portletContext;
- if (PortletStateType.OPAQUE.equals(context.getType()))
- {
- wsrp.setState((byte[])context.getState());
- }
- else
- {
- throw new IllegalArgumentException("Don't know how to deal with state: " + context.getState());
- }
- }
-
- // destroy existing customization as otherwise re-customizing will fail
- Customization<?> customization = window.getCustomization();
- customization.destroy();
-
- // and re-customize
- window.customize(WSRP.CONTENT_TYPE, portletId, wsrp);
-
- // mark page for cache invalidation otherwise DataCache will use the previous customization id when trying to set
- // the portlet state in UIPortlet.setState and will not find it resulting in an error
- Page page = window.getPage();
- session.scheduleForEviction(new PageKey("portal", page.getSite().getName(), page.getName()));
-
- // save
- session.close(true);
- }
-
- private static class PageInfo
- {
- private String uuid;
- private List<String> childrenWindows;
-
- private PageInfo(String uuid)
- {
- this.uuid = uuid;
- childrenWindows = new LinkedList<String>();
- }
-
- public String getUUID()
- {
- return uuid;
- }
-
- public List<String> getChildrenWindows()
- {
- return childrenWindows;
- }
-
- public void addWindow(String windowName)
- {
- childrenWindows.add(windowName);
- }
- }
-}
Modified: epp/portal/branches/EPP_5_1_Branch/component/wsrp/src/main/java/org/gatein/portal/wsrp/WSRPServiceIntegration.java
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/component/wsrp/src/main/java/org/gatein/portal/wsrp/WSRPServiceIntegration.java 2010-10-22 14:58:50 UTC (rev 4771)
+++ epp/portal/branches/EPP_5_1_Branch/component/wsrp/src/main/java/org/gatein/portal/wsrp/WSRPServiceIntegration.java 2010-10-22 15:31:45 UTC (rev 4772)
@@ -27,12 +27,15 @@
import org.exoplatform.container.ExoContainerContext;
import org.exoplatform.container.configuration.ConfigurationManager;
import org.exoplatform.container.xml.InitParams;
+import org.exoplatform.portal.pc.ExoKernelIntegration;
import org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator;
import org.exoplatform.services.listener.ListenerService;
import org.gatein.common.logging.Logger;
import org.gatein.common.logging.LoggerFactory;
import org.gatein.pc.api.PortletInvoker;
import org.gatein.pc.federation.FederatingPortletInvoker;
+import org.gatein.pc.portlet.PortletInvokerInterceptor;
+import org.gatein.pc.portlet.aspects.EventPayloadInterceptor;
import org.gatein.pc.portlet.container.ContainerPortletInvoker;
import org.gatein.pc.portlet.impl.state.StateConverterV0;
import org.gatein.pc.portlet.impl.state.StateManagementPolicyService;
@@ -58,6 +61,7 @@
import org.gatein.wsrp.consumer.migration.MigrationService;
import org.gatein.wsrp.consumer.registry.ActivatingNullInvokerHandler;
import org.gatein.wsrp.consumer.registry.ConsumerRegistry;
+import org.gatein.wsrp.payload.WSRPEventPayloadInterceptor;
import org.gatein.wsrp.producer.ProducerHolder;
import org.gatein.wsrp.producer.WSRPPortletInvoker;
import org.gatein.wsrp.producer.WSRPProducer;
@@ -85,11 +89,12 @@
private ConsumerRegistry consumerRegistry;
private ExoContainer container;
+ private final ExoKernelIntegration exoKernelIntegration;
private final boolean bypass;
private static final String WSRP_ADMIN_GUI_CONTEXT_PATH = "/wsrp-admin-gui";
public WSRPServiceIntegration(ExoContainerContext context, InitParams params, ConfigurationManager configurationManager,
- org.exoplatform.portal.pc.ExoKernelIntegration pc, NodeHierarchyCreator nhc) throws Exception
+ ExoKernelIntegration pc, NodeHierarchyCreator nhc) throws Exception
{
// IMPORTANT: even though PC ExoKernelIntegration and NodeHierarchyCreator is not used anywhere in the code, it's still needed for pico
// to properly make sure that this service is started after the PC one. Yes, Pico is crap. :/
@@ -114,6 +119,8 @@
container = context.getContainer();
+ exoKernelIntegration = pc;
+
bypass = false;
}
else
@@ -124,6 +131,7 @@
producerConfigLocation = null;
consumersConfigLocation = null;
configurationIS = null;
+ exoKernelIntegration = null;
bypass = true;
}
}
@@ -177,6 +185,39 @@
ContainerPortletInvoker containerPortletInvoker =
(ContainerPortletInvoker)container.getComponentInstanceOfType(ContainerPortletInvoker.class);
+ // iterate over the container stack so that we can insert the WSRP-specific event payload interceptor
+ PortletInvokerInterceptor previous = containerPortletInvoker;
+ PortletInvokerInterceptor next = previous;
+ do
+ {
+ PortletInvoker invoker = previous.getNext();
+ if (invoker instanceof EventPayloadInterceptor)
+ {
+ // create a new WSRPEventPayloadInterceptor and make its next one the current event payload invoker
+ WSRPEventPayloadInterceptor eventPayloadInterceptor = new WSRPEventPayloadInterceptor();
+ eventPayloadInterceptor.setNext(invoker);
+
+ // replace the current event payload interceptor by the WSRP-specific one
+ previous.setNext(eventPayloadInterceptor);
+
+ // we're done
+ break;
+ }
+ else
+ {
+ previous = next;
+ if (invoker instanceof PortletInvokerInterceptor)
+ {
+ next = (PortletInvokerInterceptor)invoker;
+ }
+ else
+ {
+ next = null;
+ }
+ }
+ }
+ while (next != null);
+
// The producer persistence manager
PortletStatePersistenceManager producerPersistenceManager;
try
@@ -201,17 +242,18 @@
producerPortletInvoker.setPersistenceManager(producerPersistenceManager);
producerPortletInvoker.setStateManagementPolicy(producerStateManagementPolicy);
producerPortletInvoker.setStateConverter(producerStateConverter);
-
+
WSRPPortletInvoker wsrpPortletInvoker = new WSRPPortletInvoker();
wsrpPortletInvoker.setNext(producerPortletInvoker);
wsrpPortletInvoker.setRegistrationManager(registrationManager);
-
+
// create and wire WSRP producer
producer = ProducerHolder.getProducer(true);
producer.setPortletInvoker(wsrpPortletInvoker);
producer.setRegistrationManager(registrationManager);
producer.setConfigurationService(producerConfigurationService);
+ exoKernelIntegration.getPortletApplicationRegistry().addListener(producer);
producer.start();
}
@@ -238,7 +280,7 @@
// migration service
MigrationService migrationService = new JCRMigrationService(container);
- migrationService.setStructureProvider(new MOPPortalStructureProvider(container));
+ migrationService.setStructureProvider(new MOPConsumerStructureProvider(container));
consumerRegistry.setMigrationService(migrationService);
consumerRegistry.start();
Modified: epp/portal/branches/EPP_5_1_Branch/pom.xml
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/pom.xml 2010-10-22 14:58:50 UTC (rev 4771)
+++ epp/portal/branches/EPP_5_1_Branch/pom.xml 2010-10-22 15:31:45 UTC (rev 4772)
@@ -46,9 +46,9 @@
<nl.captcha.simplecaptcha.version>1.1.1-GA-Patch01</nl.captcha.simplecaptcha.version>
<org.gatein.common.version>2.0.3-GA</org.gatein.common.version>
<org.gatein.wci.version>2.0.2-GA</org.gatein.wci.version>
- <org.gatein.pc.version>2.2.0-Beta05</org.gatein.pc.version>
+ <org.gatein.pc.version>2.2.0-Beta06</org.gatein.pc.version>
<org.picketlink.idm>1.1.6.GA</org.picketlink.idm>
- <org.gatein.wsrp.version>2.0.0-Beta01</org.gatein.wsrp.version>
+ <org.gatein.wsrp.version>2.0.0-Beta03</org.gatein.wsrp.version>
<org.gatein.mop.version>1.0.3-GA</org.gatein.mop.version>
<org.slf4j.version>1.5.6</org.slf4j.version>
<rhino.version>1.6R5</rhino.version>
Modified: epp/portal/branches/EPP_5_1_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortlet.java
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortlet.java 2010-10-22 14:58:50 UTC (rev 4771)
+++ epp/portal/branches/EPP_5_1_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortlet.java 2010-10-22 15:31:45 UTC (rev 4772)
@@ -50,6 +50,7 @@
import org.exoplatform.webui.event.Event.Phase;
import org.gatein.common.i18n.LocalizedString;
import org.gatein.common.net.media.MediaType;
+import org.gatein.common.util.ParameterValidation;
import org.gatein.pc.api.Mode;
import org.gatein.pc.api.NoSuchPortletException;
import org.gatein.pc.api.PortletContext;
@@ -78,6 +79,11 @@
import org.gatein.pc.portlet.impl.spi.AbstractServerContext;
import org.gatein.pc.portlet.impl.spi.AbstractWindowContext;
+import javax.portlet.PortletMode;
+import javax.portlet.WindowState;
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletRequest;
+import javax.xml.namespace.QName;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
@@ -88,16 +94,10 @@
import java.util.List;
import java.util.Locale;
import java.util.Map;
+import java.util.Map.Entry;
import java.util.Set;
import java.util.UUID;
-import java.util.Map.Entry;
-import javax.portlet.PortletMode;
-import javax.portlet.WindowState;
-import javax.servlet.http.Cookie;
-import javax.servlet.http.HttpServletRequest;
-import javax.xml.namespace.QName;
-
/** May 19, 2006 */
@ComponentConfig(lifecycle = UIPortletLifecycle.class, template = "system:/groovy/portal/webui/application/UIPortlet.gtmpl", events = {
@EventConfig(listeners = RenderActionListener.class),
@@ -114,6 +114,10 @@
protected static final Log log = ExoLogger.getLogger("portal:UIPortlet");
static final public String DEFAULT_THEME = "Default:DefaultTheme::Vista:VistaTheme::Mac:MacTheme";
+ private static final String WSRP_URL = "wsrp-url";
+ private static final String WSRP_PREFER_OPERATION = "wsrp-preferOperation";
+ private static final String WSRP_REQUIRES_REWRITE = "wsrp-requiresRewrite";
+ private static final String WSRP_NAVIGATIONAL_VALUES = "wsrp-navigationalValues";
/** . */
private String storageId;
@@ -161,9 +165,9 @@
private StateString navigationalState;
- /** A field storing localized value of javax.portlet.title **/
+ /** A field storing localized value of javax.portlet.title * */
private String configuredTitle;
-
+
public UIPortlet()
{
// That value will be overriden when it is mapped onto a data storage
@@ -395,19 +399,17 @@
}
else
{
- String value = null;
- if (displayName != null)
+ RequestContext i = PortalRequestContext.getCurrentInstance();
+ Locale locale = i.getLocale();
+ String value = displayName.getString(locale, true);
+
+ if (ParameterValidation.isNullOrEmpty(value))
{
- RequestContext i = PortalRequestContext.getCurrentInstance();
- Locale locale = i.getLocale();
- value = displayName.getString(locale, true);
- }
- if (value == null || value.length() == 0)
- {
org.gatein.pc.api.Portlet portlet = getProducedOfferedPortlet();
PortletInfo info = portlet.getInfo();
value = info.getName();
}
+
return value;
}
}
@@ -435,11 +437,9 @@
}
Set<ModeInfo> modes = portlet.getInfo().getCapabilities().getModes(MediaType.create("text/html"));
- Iterator<ModeInfo> modeIter = modes.iterator();
- while (modeIter.hasNext())
+ for (ModeInfo mode : modes)
{
- ModeInfo info = modeIter.next();
- supportModes.add(info.getModeName());
+ supportModes.add(mode.getModeName());
}
if (supportModes.size() > 0)
@@ -485,16 +485,21 @@
supportedProcessingEvents_ = new ArrayList<QName>(consumedEvents.keySet());
}
- for (Iterator<QName> iter = supportedProcessingEvents_.iterator(); iter.hasNext();)
+ for (QName eventName : supportedProcessingEvents_)
{
- QName eventName = iter.next();
if (eventName.equals(name))
{
- log.info("The Portlet " + producerOfferedPortletContext + " supports comsuming the event : " + name);
+ if (log.isDebugEnabled())
+ {
+ log.debug("The Portlet " + producerOfferedPortletContext + " supports comsuming the event : " + name);
+ }
return true;
}
}
- log.info("The portlet " + producerOfferedPortletContext + " doesn't support consuming the event : " + name);
+ if (log.isDebugEnabled())
+ {
+ log.debug("The portlet " + producerOfferedPortletContext + " doesn't support consuming the event : " + name);
+ }
return false;
}
@@ -521,16 +526,21 @@
supportedPublishingEvents_ = new ArrayList<QName>(producedEvents.keySet());
}
- for (Iterator<QName> iter = supportedPublishingEvents_.iterator(); iter.hasNext();)
+ for (QName eventName : supportedPublishingEvents_)
{
- QName eventName = iter.next();
if (eventName.equals(name))
{
- log.info("The Portlet " + producerOfferedPortletContext + " supports producing the event : " + name);
+ if (log.isDebugEnabled())
+ {
+ log.debug("The Portlet " + producerOfferedPortletContext + " supports producing the event : " + name);
+ }
return true;
}
}
- log.info("The portlet " + producerOfferedPortletContext + " doesn't support producing the event : " + name);
+ if (log.isDebugEnabled())
+ {
+ log.debug("The portlet " + producerOfferedPortletContext + " doesn't support producing the event : " + name);
+ }
return false;
}
@@ -654,7 +664,7 @@
Map<String, String[]> publicParams = uiPortal.getPublicParameters();
Set<String> allPublicParamsNames = publicParams.keySet();
List<String> supportedPublicParamNames = getPublicRenderParamNames();
-
+
for (String oneOfAllParams : allPublicParamsNames)
{
if (supportedPublicParamNames.contains(oneOfAllParams))
@@ -662,14 +672,14 @@
publicParamsMap.put(oneOfAllParams, publicParams.get(oneOfAllParams));
}
}
-
+
// Handle exposed portal contextual properties
ContextualPropertyManager propertyManager = this.getApplicationComponent(ContextualPropertyManager.class);
Map<QName, String[]> exposedPortalState = propertyManager.getProperties(this);
- for(QName prpQName : exposedPortalState.keySet())
+ for (QName prpQName : exposedPortalState.keySet())
{
String prpId = supportsPublicParam(prpQName);
- if(prpId != null)
+ if (prpId != null)
{
publicParamsMap.put(prpId, exposedPortalState.get(prpQName));
}
@@ -704,7 +714,6 @@
if (type.equals(ActionInvocation.class))
{
ActionInvocation actionInvocation = new ActionInvocation(pic);
- actionInvocation.setForm(allParams);
actionInvocation.setRequestContext(new AbstractRequestContext(servletRequest));
String interactionState =
@@ -712,8 +721,12 @@
if (interactionState != null)
{
actionInvocation.setInteractionState(StateString.create(interactionState));
+ // remove the interaction state from remaining params
+ allParams.remove(ExoPortletInvocationContext.INTERACTION_STATE_PARAM_NAME);
}
+ actionInvocation.setForm(allParams);
+
invocation = type.cast(actionInvocation);
}
else if (type.equals(ResourceInvocation.class))
@@ -722,23 +735,49 @@
resourceInvocation.setRequestContext(new AbstractRequestContext(servletRequest));
String resourceId = servletRequest.getParameter(Constants.RESOURCE_ID_PARAMETER);
- if (resourceId != null)
+ if (!ParameterValidation.isNullOrEmpty(resourceId))
{
resourceInvocation.setResourceId(resourceId);
}
String cachability = servletRequest.getParameter(Constants.CACHELEVEL_PARAMETER);
- if (cachability != null)
+ if (!ParameterValidation.isNullOrEmpty(cachability))
{
- resourceInvocation.setCacheLevel(CacheLevel.valueOf(cachability));
+ // we need to convert the given value to upper case as it might come from WSRP in lower case
+ resourceInvocation.setCacheLevel(CacheLevel.create(cachability.toUpperCase(Locale.ENGLISH)));
}
String resourceState = servletRequest.getParameter(ExoPortletInvocationContext.RESOURCE_STATE_PARAM_NAME);
- if (resourceState != null)
+ if (!ParameterValidation.isNullOrEmpty(resourceState))
{
resourceInvocation.setResourceState(StateString.create(resourceState));
}
+ // remove the resource state from remaining params
+ allParams.remove(ExoPortletInvocationContext.RESOURCE_STATE_PARAM_NAME);
+ // deal with WSRP-specific parameters: add them to the invocation attributes if they exist and remove them from form params
+ String url = servletRequest.getParameter(WSRP_URL);
+ if (!ParameterValidation.isNullOrEmpty(url))
+ {
+ resourceInvocation.setAttribute(WSRP_URL, url);
+ }
+ allParams.remove(WSRP_URL);
+
+ String preferOperation = servletRequest.getParameter(WSRP_PREFER_OPERATION);
+ if (!ParameterValidation.isNullOrEmpty(preferOperation))
+ {
+ resourceInvocation.setAttribute(WSRP_PREFER_OPERATION, preferOperation);
+ }
+ allParams.remove(WSRP_PREFER_OPERATION);
+
+ String requiresRewrite = servletRequest.getParameter(WSRP_REQUIRES_REWRITE);
+ if (!ParameterValidation.isNullOrEmpty(requiresRewrite))
+ {
+ resourceInvocation.setAttribute(WSRP_REQUIRES_REWRITE, requiresRewrite);
+ }
+ allParams.remove(WSRP_REQUIRES_REWRITE);
+ // End WSRP-specific parameters handling
+
resourceInvocation.setForm(allParams);
invocation = type.cast(resourceInvocation);
@@ -759,9 +798,19 @@
// Navigational state
invocation.setNavigationalState(navigationalState);
- // Public navigational state
+ // Public navigational state
invocation.setPublicNavigationalState(this.getPublicParameters());
+ // WSRP-specific public navigational state handling needed when we have a URL coming from template
+ String navigationalValues = servletRequest.getParameter(WSRP_NAVIGATIONAL_VALUES);
+ if(!ParameterValidation.isNullOrEmpty(navigationalValues))
+ {
+ // add to the invocation attributes so that it can be retrieved and used by the WSRP component
+ invocation.setAttribute(WSRP_NAVIGATIONAL_VALUES, navigationalValues);
+ }
+ allParams.remove(WSRP_NAVIGATIONAL_VALUES);
+ // End WSRP-specific public navigational state handling
+
// Mode
invocation.setMode(Mode.create(getCurrentPortletMode().toString()));
@@ -770,7 +819,7 @@
StatefulPortletContext<C> preferencesPortletContext = getPortletContext();
if (preferencesPortletContext == null)
- {
+ {
return null;
}
@@ -859,22 +908,24 @@
ModelAdapter<S, C> adapter = ModelAdapter.getAdapter(state.getApplicationType());
PortletContext producerOfferedPortletContext = adapter.getProducerOfferedPortletContext(applicationId);
org.gatein.pc.api.Portlet producedOfferedPortlet;
-
+
try
{
- producedOfferedPortlet = portletInvoker.getPortlet(producerOfferedPortletContext);
+ producedOfferedPortlet = portletInvoker.getPortlet(producerOfferedPortletContext);
}
catch (NoSuchPortletException nspe)
{
- producedOfferedPortlet = null;
- nspe.printStackTrace();
+ producedOfferedPortlet = null;
+ nspe.printStackTrace();
}
-
+
this.adapter = adapter;
this.producerOfferedPortletContext = producerOfferedPortletContext;
this.producedOfferedPortlet = producedOfferedPortlet;
this.applicationId = applicationId;
- } catch(NoSuchDataException de){
+ }
+ catch (NoSuchDataException de)
+ {
log.error(de.getMessage());
throw de;
}
@@ -966,37 +1017,38 @@
{
this.navigationalState = navigationalState;
}
-
+
protected void setConfiguredTitle(String _configuredTitle)
{
- this.configuredTitle = _configuredTitle;
+ this.configuredTitle = _configuredTitle;
}
-
+
/**
* Returns the title showed on the InfoBar. The title is computed in following manner.
- *
- * 1. First, the method getTitle(), inherited from UIPortalComponent is called. The getTitle() returns
- * what users set in the PortletSetting tab, the current method returns call result if it is not null.
- *
+ * <p/>
+ * 1. First, the method getTitle(), inherited from UIPortalComponent is called. The getTitle() returns what users set
+ * in the PortletSetting tab, the current method returns call result if it is not null.
+ * <p/>
* 2. configuredTitle, which is the localized value of javax.portlet.title is returned if it is not null.
- *
- * 3. If the method does not terminate at neither (1) nor (2), the configured display name is returned.
+ * <p/>
+ * 3. If the method does not terminate at neither (1) nor (2), the configured display name is returned.
+ *
* @return
*/
public String getDisplayTitle()
{
- String displayedTitle = getTitle();
- if(displayedTitle != null && displayedTitle.trim().length() > 0)
- {
- return displayedTitle;
- }
-
- if(configuredTitle != null)
- {
- return configuredTitle;
- }
-
- return getDisplayName();
-
+ String displayedTitle = getTitle();
+ if (displayedTitle != null && displayedTitle.trim().length() > 0)
+ {
+ return displayedTitle;
+ }
+
+ if (configuredTitle != null)
+ {
+ return configuredTitle;
+ }
+
+ return getDisplayName();
+
}
}
\ No newline at end of file
Modified: epp/portal/branches/EPP_5_1_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java 2010-10-22 14:58:50 UTC (rev 4771)
+++ epp/portal/branches/EPP_5_1_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java 2010-10-22 15:31:45 UTC (rev 4772)
@@ -1,5 +1,9 @@
-/**
- * Copyright (C) 2009 eXo Platform SAS.
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2010, 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
@@ -59,7 +63,6 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.xml.namespace.QName;
-
import java.io.IOException;
import java.io.OutputStream;
import java.io.Serializable;
@@ -97,10 +100,19 @@
HttpServletRequest request = prcontext.getRequest();
setupPublicRenderParams(uiPortlet, request.getParameterMap());
+ // set the navigational state
+ String navState = prcontext.getRequestParameter(ExoPortletInvocationContext.NAVIGATIONAL_STATE_PARAM_NAME);
+ if (navState != null)
+ {
+ uiPortlet.setNavigationalState(ParametersStateString.create(navState));
+ }
+
//
ActionInvocation actionInvocation = uiPortlet.create(ActionInvocation.class, prcontext);
if (actionInvocation == null)
+ {
return;
+ }
//
PortletInvocationResponse portletResponse = uiPortlet.invoke(actionInvocation);
@@ -131,7 +143,7 @@
uiPortlet.update((C)wsrp);
}
}
-
+
if (portletResponse instanceof UpdateNavigationalStateResponse)
{
handleUpdateNavigationalStateResponse((UpdateNavigationalStateResponse)portletResponse, uiPortlet, prcontext);
@@ -151,17 +163,17 @@
else
{
throw new Exception("Unexpected response type [" + portletResponse + "]. Expected an UpdateNavigationResponse" +
- ", a HTTPRedirectionResponse or an ErrorResponse.");
+ ", a HTTPRedirectionResponse or an ErrorResponse.");
}
}
-
-
+
+
private void handleRedirectionResponse(HTTPRedirectionResponse redirectionResponse, HttpServletResponse response) throws IOException
{
String redirectionURL = redirectionResponse.getLocation();
response.sendRedirect(redirectionURL);
}
-
+
private void handleUpdateNavigationalStateResponse(UpdateNavigationalStateResponse navStateResponse, UIPortlet<S, C> uiPortlet, PortalRequestContext prcontext) throws Exception
{
/*
@@ -187,7 +199,10 @@
//
StateString navigationalState = navStateResponse.getNavigationalState();
- uiPortlet.setNavigationalState(navigationalState);
+ if (navigationalState != null)
+ {
+ uiPortlet.setNavigationalState(navigationalState);
+ }
// update the public render parameters with the changes from the invocation
setupPublicRenderParams(uiPortlet, navStateResponse.getPublicNavigationalStateUpdates());
@@ -248,12 +263,12 @@
}
}
-
+
private void handleErrorResponse(ErrorResponse response) throws Exception
{
- throw (Exception)response.getCause();
+ throw (Exception)response.getCause();
}
-
+
private void handleSecurityResponse(SecurityResponse response) throws Exception
{
if (response instanceof SecurityErrorResponse)
@@ -344,14 +359,26 @@
{
UIPortlet<S, C> uiPortlet = event.getSource();
log.trace("Serve Resource for portlet: " + uiPortlet.getPortletContext());
+ String resourceId = null;
+
try
{
PortalRequestContext context = (PortalRequestContext)event.getRequestContext();
HttpServletResponse response = context.getResponse();
+ //Set the NavigationalState
+ String navState = context.getRequestParameter(ExoPortletInvocationContext.NAVIGATIONAL_STATE_PARAM_NAME);
+ if (navState != null)
+ {
+ uiPortlet.setNavigationalState(ParametersStateString.create(navState));
+ }
+
//
ResourceInvocation resourceInvocation = uiPortlet.create(ResourceInvocation.class, context);
+ // set the resourceId to be used in case of a problem
+ resourceId = resourceInvocation.getResourceId();
+
//
PortletInvocationResponse portletResponse = uiPortlet.invoke(resourceInvocation);
@@ -408,29 +435,29 @@
response.setContentType(contentType);
if (piResponse.getBytes() != null)
{
- OutputStream stream = response.getOutputStream();
- stream.write(piResponse.getBytes());
+ OutputStream stream = response.getOutputStream();
+ stream.write(piResponse.getBytes());
}
else
{
- if (piResponse.getChars() != null)
- {
- log.error("Received a content type of " + contentType + " but it contains no bytes of data. Chars were unexpectantly returned instead : " + piResponse.getChars());
- }
- else
- {
- log.error("Received a content type of " + contentType + " but it contains no bytes of data.");
- }
+ if (piResponse.getChars() != null)
+ {
+ log.error("Received a content type of " + contentType + " but it contains no bytes of data. Chars were unexpectantly returned instead : " + piResponse.getChars());
+ }
+ else
+ {
+ log.error("Received a content type of " + contentType + " but it contains no bytes of data.");
+ }
}
-
-
+
+
}
context.getResponse().flushBuffer();
}
catch (Exception e)
{
- log.error("Problem while serving resource for the portlet: " + uiPortlet.getPortletContext().getId(), e);
+ log.error("Problem while serving resource " + (resourceId != null ? resourceId : "") + " for the portlet: " + uiPortlet.getPortletContext().getId(), e);
}
finally
{
@@ -509,7 +536,7 @@
* ProcessEventsActionListener once again
*/
public static <S, C extends Serializable, I> List<javax.portlet.Event> processEvent(UIPortlet<S, C> uiPortlet,
- javax.portlet.Event event)
+ javax.portlet.Event event)
{
log.trace("Process Event: " + event.getName() + " for portlet: " + uiPortlet.getState());
try
@@ -567,8 +594,12 @@
// update the portlet with the next mode to display
PortletMode mode = new PortletMode(getPortletModeOrDefault(navResponse));
setNextMode(uiPortlet, mode);
-
- uiPortlet.setNavigationalState(navResponse.getNavigationalState());
+
+ StateString navState = navResponse.getNavigationalState();
+ if (navState != null)
+ {
+ uiPortlet.setNavigationalState(navResponse.getNavigationalState());
+ }
setupPublicRenderParams(uiPortlet, navResponse.getPublicNavigationalStateUpdates());
//TODO: (mwringe) add this to the UpdateNavigationStateResponse.Event class instead of here
@@ -790,11 +821,11 @@
}
else if (portletMode.equals(PortletMode.VIEW.toString()))
{
- uiPortlet.setCurrentPortletMode(PortletMode.VIEW);
+ uiPortlet.setCurrentPortletMode(PortletMode.VIEW);
}
else
{
- PortletMode customMode = new PortletMode(portletMode);
+ PortletMode customMode = new PortletMode(portletMode);
uiPortlet.setCurrentPortletMode(customMode);
}
event.getRequestContext().addUIComponentToUpdateByAjax(uiPortlet);
14 years, 2 months
gatein SVN: r4771 - epp/portal/branches/EPP_5_1_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-10-22 10:58:50 -0400 (Fri, 22 Oct 2010)
New Revision: 4771
Modified:
epp/portal/branches/EPP_5_1_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/portal-configuration.xml
Log:
JBEPP-556: Performance Improvements
GTNPORTAL-1578: problem with MOPSessionManager cache configuration - cluster profile
Modified: epp/portal/branches/EPP_5_1_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/portal-configuration.xml
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/portal-configuration.xml 2010-10-22 14:46:43 UTC (rev 4770)
+++ epp/portal/branches/EPP_5_1_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/portal-configuration.xml 2010-10-22 14:58:50 UTC (rev 4771)
@@ -314,8 +314,11 @@
<string>MOPSessionManager</string>
</field>
<field name="expirationTimeout">
- <long>600</long>
+ <long>600000</long>
</field>
+ <field name="maxNodes">
+ <int>5000</int>
+ </field>
<field name="distributed">
<boolean>true</boolean>
</field>
14 years, 2 months
gatein SVN: r4770 - epp/portal/branches/EPP_5_1_Branch.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-10-22 10:46:43 -0400 (Fri, 22 Oct 2010)
New Revision: 4770
Modified:
epp/portal/branches/EPP_5_1_Branch/pom.xml
Log:
JBEPP-463: Upgrade eXo JCR to 1.12.5
Modified: epp/portal/branches/EPP_5_1_Branch/pom.xml
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/pom.xml 2010-10-22 14:44:39 UTC (rev 4769)
+++ epp/portal/branches/EPP_5_1_Branch/pom.xml 2010-10-22 14:46:43 UTC (rev 4770)
@@ -37,10 +37,10 @@
<name>GateIn - Portal</name>
<properties>
- <org.exoplatform.kernel.version>2.2.4-GA</org.exoplatform.kernel.version>
- <org.exoplatform.core.version>2.3.4-GA</org.exoplatform.core.version>
- <org.exoplatform.ws.version>2.1.4-GA</org.exoplatform.ws.version>
- <org.exoplatform.jcr.version>1.12.4-GA</org.exoplatform.jcr.version>
+ <org.exoplatform.kernel.version>2.2.5-GA</org.exoplatform.kernel.version>
+ <org.exoplatform.core.version>2.3.5-GA</org.exoplatform.core.version>
+ <org.exoplatform.ws.version>2.1.5-GA</org.exoplatform.ws.version>
+ <org.exoplatform.jcr.version>1.12.5-GA</org.exoplatform.jcr.version>
<org.jibx.version>1.2.1</org.jibx.version>
<org.shindig.version>1.0-r790473-Patch04</org.shindig.version>
<nl.captcha.simplecaptcha.version>1.1.1-GA-Patch01</nl.captcha.simplecaptcha.version>
14 years, 2 months
gatein SVN: r4769 - in epp/portal/branches/EPP_5_1_Branch: web/eXoResources/src/main/webapp/javascript/eXo/gadget and 5 other directories.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-10-22 10:44:39 -0400 (Fri, 22 Oct 2010)
New Revision: 4769
Modified:
epp/portal/branches/EPP_5_1_Branch/.classpath
epp/portal/branches/EPP_5_1_Branch/web/eXoResources/src/main/webapp/javascript/eXo/gadget/Gadgets.js
epp/portal/branches/EPP_5_1_Branch/web/eXoResources/src/main/webapp/javascript/eXo/gadget/UIGadget.js
epp/portal/branches/EPP_5_1_Branch/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js
epp/portal/branches/EPP_5_1_Branch/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIDashboard.js
epp/portal/branches/EPP_5_1_Branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties
epp/portal/branches/EPP_5_1_Branch/webui/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIDashboard.java
epp/portal/branches/EPP_5_1_Branch/webui/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIDashboardContainer.java
epp/portal/branches/EPP_5_1_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java
Log:
JBEPP-554: Can't add a gadget when using Google Chrome 6 on Windows
Modified: epp/portal/branches/EPP_5_1_Branch/.classpath
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/.classpath 2010-10-22 11:50:10 UTC (rev 4768)
+++ epp/portal/branches/EPP_5_1_Branch/.classpath 2010-10-22 14:44:39 UTC (rev 4769)
@@ -10,6 +10,7 @@
<classpathentry excluding="**" kind="src" output="component/test/jcr/target/test-classes" path="component/test/jcr/src/test/resources"/>
<classpathentry kind="src" output="component/identity/target/classes" path="component/identity/src/main/java"/>
<classpathentry kind="src" output="component/identity/target/test-classes" path="component/identity/src/test/java"/>
+ <classpathentry excluding="**" kind="src" output="component/identity/target/test-classes" path="component/identity/src/test/resources"/>
<classpathentry kind="src" output="component/test/organization/target/classes" path="component/test/organization/src/main/java"/>
<classpathentry excluding="**" kind="src" output="component/test/organization/target/classes" path="component/test/organization/src/main/resources"/>
<classpathentry kind="src" output="component/test/organization/target/test-classes" path="component/test/organization/src/test/java"/>
@@ -18,44 +19,57 @@
<classpathentry excluding="**" kind="src" output="component/common/target/test-classes" path="component/common/src/test/resources"/>
<classpathentry kind="src" output="component/resources/target/classes" path="component/resources/src/main/java"/>
<classpathentry kind="src" output="component/resources/target/test-classes" path="component/resources/src/test/java"/>
+ <classpathentry excluding="**" kind="src" output="component/resources/target/test-classes" path="component/resources/src/test/resources"/>
<classpathentry kind="src" output="component/pc/target/classes" path="component/pc/src/main/java"/>
<classpathentry kind="src" output="component/pc/target/test-classes" path="component/pc/src/test/java"/>
<classpathentry excluding="**" kind="src" output="component/pc/target/test-classes" path="component/pc/src/test/resources"/>
- <classpathentry kind="src" output="component/xml-parser/target/classes" path="component/xml-parser/src/main/java"/>
- <classpathentry kind="src" output="component/xml-parser/target/test-classes" path="component/xml-parser/src/test/java"/>
- <classpathentry excluding="**" kind="src" output="component/xml-parser/target/test-classes" path="component/xml-parser/src/test/resources"/>
+ <classpathentry kind="src" output="component/portal/target/classes" path="component/portal/src/main/java"/>
+ <classpathentry kind="src" output="component/portal/target/test-classes" path="component/portal/src/test/java"/>
+ <classpathentry excluding="**" kind="src" output="component/portal/target/test-classes" path="component/portal/src/test/resources"/>
<classpathentry kind="src" output="component/wsrp/target/classes" path="component/wsrp/src/main/java"/>
<classpathentry kind="src" output="component/wsrp/target/test-classes" path="component/wsrp/src/test/java"/>
<classpathentry excluding="**" kind="src" output="component/wsrp/target/test-classes" path="component/wsrp/src/test/resources"/>
+ <classpathentry kind="src" output="component/application-registry/target/classes" path="component/application-registry/src/main/java"/>
+ <classpathentry kind="src" output="component/application-registry/target/test-classes" path="component/application-registry/src/test/java"/>
+ <classpathentry excluding="**" kind="src" output="component/application-registry/target/test-classes" path="component/application-registry/src/test/resources"/>
+ <classpathentry kind="src" output="component/web/target/classes" path="component/web/src/main/java"/>
+ <classpathentry kind="src" output="component/web/target/test-classes" path="component/web/src/test/java"/>
+ <classpathentry excluding="**" kind="src" output="component/web/target/test-classes" path="component/web/src/test/resources"/>
+ <classpathentry kind="src" output="component/web/resources/target/classes" path="component/web/resources/src/main/java"/>
+ <classpathentry kind="src" output="component/web/resources/target/test-classes" path="component/web/resources/src/test/java"/>
+ <classpathentry excluding="**" kind="src" output="component/web/resources/target/test-classes" path="component/web/resources/src/test/resources"/>
+ <classpathentry kind="src" output="component/web/controller/target/classes" path="component/web/controller/src/main/java"/>
+ <classpathentry kind="src" output="component/web/security/target/classes" path="component/web/security/src/main/java"/>
+ <classpathentry kind="src" output="component/web/server/target/classes" path="component/web/server/src/main/java"/>
+ <classpathentry kind="src" output="component/web/api/target/classes" path="component/web/api/src/main/java"/>
+ <classpathentry kind="src" output="component/web/api/target/test-classes" path="component/web/api/src/test/java"/>
+ <classpathentry excluding="**" kind="src" output="component/web/api/target/test-classes" path="component/web/api/src/test/resources"/>
<classpathentry kind="src" output="component/scripting/target/classes" path="component/scripting/src/main/java"/>
<classpathentry kind="src" output="component/scripting/target/test-classes" path="component/scripting/src/test/java"/>
<classpathentry excluding="**" kind="src" output="component/scripting/target/test-classes" path="component/scripting/src/test/resources"/>
- <classpathentry kind="src" output="component/web/target/classes" path="component/web/src/main/java"/>
- <classpathentry kind="src" output="component/web/target/test-classes" path="component/web/src/test/java"/>
- <classpathentry excluding="**" kind="src" output="component/web/target/test-classes" path="component/web/src/test/resources"/>
- <classpathentry kind="src" output="component/portal/target/classes" path="component/portal/src/main/java"/>
- <classpathentry kind="src" output="component/portal/target/test-classes" path="component/portal/src/test/java"/>
- <classpathentry excluding="**" kind="src" output="component/portal/target/test-classes" path="component/portal/src/test/resources"/>
- <classpathentry kind="src" output="component/application-registry/target/classes" path="component/application-registry/src/main/java"/>
- <classpathentry kind="src" output="component/application-registry/target/test-classes" path="component/application-registry/src/test/java"/>
+ <classpathentry kind="src" output="component/management/target/classes" path="component/management/src/main/java"/>
+ <classpathentry kind="src" output="component/management/target/test-classes" path="component/management/src/test/java"/>
+ <classpathentry excluding="**" kind="src" output="component/management/target/test-classes" path="component/management/src/test/resources"/>
+ <classpathentry kind="src" output="gadgets/core/target/classes" path="gadgets/core/src/main/java"/>
+ <classpathentry kind="src" output="webui/framework/target/classes" path="webui/framework/src/main/java"/>
+ <classpathentry kind="src" output="webui/portlet/target/classes" path="webui/portlet/src/main/java"/>
<classpathentry kind="src" output="webui/core/target/classes" path="webui/core/src/main/java"/>
<classpathentry kind="src" output="webui/core/target/test-classes" path="webui/core/src/test/java"/>
+ <classpathentry excluding="**" kind="src" output="webui/core/target/test-classes" path="webui/core/src/test/resources"/>
<classpathentry kind="src" output="webui/eXo/target/classes" path="webui/eXo/src/main/java"/>
- <classpathentry kind="src" output="gadgets/core/target/classes" path="gadgets/core/src/main/java"/>
<classpathentry kind="src" output="webui/portal/target/classes" path="webui/portal/src/main/java"/>
- <classpathentry kind="src" output="component/dashboard/target/classes" path="component/dashboard/src/main/java"/>
- <classpathentry excluding="**" kind="src" output="component/dashboard/target/classes" path="component/dashboard/src/main/resources"/>
<classpathentry kind="src" output="gadgets/eXoGadgets/target/classes" path="gadgets/eXoGadgets/src/main/java"/>
+ <classpathentry kind="src" output="webui/dashboard/target/classes" path="webui/dashboard/src/main/java"/>
+ <classpathentry excluding="**" kind="src" output="webui/dashboard/target/classes" path="webui/dashboard/src/main/resources"/>
<classpathentry kind="src" output="portlet/dashboard/target/classes" path="portlet/dashboard/src/main/java"/>
<classpathentry kind="src" output="portlet/exoadmin/target/classes" path="portlet/exoadmin/src/main/java"/>
<classpathentry kind="src" output="portlet/web/target/classes" path="portlet/web/src/main/java"/>
- <classpathentry excluding="**" kind="src" output="server/tomcat/patch/target/classes" path="server/tomcat/patch/src/main/tomcat"/>
- <classpathentry kind="src" output="server/tomcat/plugin/target/classes" path="server/tomcat/plugin/src/main/java"/>
<classpathentry kind="src" output="server/jboss/plugin/target/classes" path="server/jboss/plugin/src/main/java"/>
<classpathentry kind="src" output="examples/extension/config/target/classes" path="examples/extension/config/src/main/java"/>
<classpathentry kind="src" output="examples/extension/jar/target/classes" path="examples/extension/jar/src/main/java"/>
<classpathentry kind="src" output="examples/portal/config/target/classes" path="examples/portal/config/src/main/java"/>
<classpathentry kind="src" output="examples/portal/jar/target/classes" path="examples/portal/jar/src/main/java"/>
+ <classpathentry kind="src" output="examples/portlets/api/target/classes" path="examples/portlets/api/src/main/java"/>
<classpathentry kind="src" output="examples/portlets/jsfhellouser/target/classes" path="examples/portlets/jsfhellouser/src/main/java"/>
<classpathentry kind="src" output="examples/portlets/jsfhellouser/target/test-classes" path="examples/portlets/jsfhellouser/src/test/java"/>
<classpathentry excluding="**" kind="src" output="examples/portlets/jsfhellouser/target/test-classes" path="examples/portlets/jsfhellouser/src/test/resources"/>
@@ -65,6 +79,12 @@
<classpathentry kind="src" output="examples/portlets/simplesthelloworld/target/classes" path="examples/portlets/simplesthelloworld/src/main/java"/>
<classpathentry kind="src" output="examples/portlets/simplesthelloworld/target/test-classes" path="examples/portlets/simplesthelloworld/src/test/java"/>
<classpathentry excluding="**" kind="src" output="examples/portlets/simplesthelloworld/target/test-classes" path="examples/portlets/simplesthelloworld/src/test/resources"/>
+ <classpathentry kind="src" output="examples/portlets/struts-jpetstore/target/classes" path="examples/portlets/struts-jpetstore/src/main/java"/>
+ <classpathentry excluding="**" kind="src" output="examples/portlets/struts-jpetstore/target/classes" path="examples/portlets/struts-jpetstore/src/main/resources"/>
+ <classpathentry kind="src" output="examples/portlets/struts-jpetstore/target/test-classes" path="examples/portlets/struts-jpetstore/src/test/java"/>
+ <classpathentry excluding="**" kind="src" output="examples/portlets/struts-jpetstore/target/test-classes" path="examples/portlets/struts-jpetstore/src/test/resources"/>
+ <classpathentry kind="src" output="testsuite/selenium-snifftests/target/classes" path="testsuite/selenium-snifftests/src/main/java"/>
+ <classpathentry kind="src" output="testsuite/webuibasedsamples/target/classes" path="testsuite/webuibasedsamples/src/main/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
Modified: epp/portal/branches/EPP_5_1_Branch/web/eXoResources/src/main/webapp/javascript/eXo/gadget/Gadgets.js
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/web/eXoResources/src/main/webapp/javascript/eXo/gadget/Gadgets.js 2010-10-22 11:50:10 UTC (rev 4768)
+++ epp/portal/branches/EPP_5_1_Branch/web/eXoResources/src/main/webapp/javascript/eXo/gadget/Gadgets.js 2010-10-22 14:44:39 UTC (rev 4769)
@@ -674,11 +674,9 @@
el.type = "checkbox";
el.name = prefix + att;
el.id = elID;
- if (userPrefs[att] && userPrefs[att] == "true") {
- el.checked = userPrefs[att];
- } else {
- if(prefs[att].default == "true")
- el.checked = true;
+ if ((userPrefs[att] && userPrefs[att] == "true") ||
+ prefs[att]["default"] == "true") {
+ el.checked = true;
}
attEl.appendChild(el);
}
Modified: epp/portal/branches/EPP_5_1_Branch/web/eXoResources/src/main/webapp/javascript/eXo/gadget/UIGadget.js
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/web/eXoResources/src/main/webapp/javascript/eXo/gadget/UIGadget.js 2010-10-22 11:50:10 UTC (rev 4768)
+++ epp/portal/branches/EPP_5_1_Branch/web/eXoResources/src/main/webapp/javascript/eXo/gadget/UIGadget.js 2010-10-22 14:44:39 UTC (rev 4769)
@@ -244,7 +244,7 @@
href += "&op=MinimizeGadget";
href += "&minimized=" + minimized;
href += "&objectId=" + uiGadget.id + "&ajaxRequest=true";
- ajaxAsyncGetRequest(href);
+ ajaxGet(href);
if (uiGadget.minimizeCallback) uiGadget.minimizeCallback(portletFrag.parentNode.id);
},
/**
@@ -294,7 +294,7 @@
var uiDashboardCont = DOMUtil.findAncestorByClass(uiGadget, "UIDashboardContainer");
if(uiDashboardCont) {
- ajaxAsyncGetRequest(href);
+ ajaxGet(href);
DOMUtil.removeElement(uiGadget);
if(!DOMUtil.findFirstDescendantByClass(uiDashboardCont, "div", "UIGadget")) {
DOMUtil.findFirstDescendantByClass(uiDashboardCont, "div", "NoGadget").style.display = "block";
Modified: epp/portal/branches/EPP_5_1_Branch/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js 2010-10-22 11:50:10 UTC (rev 4768)
+++ epp/portal/branches/EPP_5_1_Branch/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js 2010-10-22 14:44:39 UTC (rev 4769)
@@ -515,7 +515,7 @@
}
}
}
- if(response.blocksToUpdate == undefined) {
+ if(response.blocksToUpdate == undefined && temp.innerHTML !== "") {
if(confirm(eXo.i18n.I18NMessage.getMessage("SessionTimeout"))) instance.ajaxTimeout(request) ;
}
//Handle the portal responses
Modified: epp/portal/branches/EPP_5_1_Branch/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIDashboard.js
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIDashboard.js 2010-10-22 11:50:10 UTC (rev 4768)
+++ epp/portal/branches/EPP_5_1_Branch/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIDashboard.js 2010-10-22 14:44:39 UTC (rev 4769)
@@ -233,7 +233,7 @@
{name: "objectId", value: dragObj.id}
];
var url = uiDashboardUtil.createRequest(compId, 'MoveGadget', params);
- ajaxAsyncGetRequest(url);
+ ajaxGet(url);
}
}
}
Modified: epp/portal/branches/EPP_5_1_Branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties 2010-10-22 11:50:10 UTC (rev 4768)
+++ epp/portal/branches/EPP_5_1_Branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties 2010-10-22 14:44:39 UTC (rev 4769)
@@ -1249,6 +1249,7 @@
UIDashboard.msg.addGadget=Drag your gadgets here.
UIDashboard.msg.notUrl=The url is invalid. Please enter a correct url of a gadget xml or of an RSS feed.
UIDashboard.msg.ApplicationNotExisted=This application is not exist or may be deleted.
+UIDashboard.msg.StaleData=Some stale data are on your dashboard, it will be refreshed now
################################################################################
# org.exoplatform.webui.organization.account.UIUserSelector
Modified: epp/portal/branches/EPP_5_1_Branch/webui/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIDashboard.java
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/webui/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIDashboard.java 2010-10-22 11:50:10 UTC (rev 4768)
+++ epp/portal/branches/EPP_5_1_Branch/webui/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIDashboard.java 2010-10-22 14:44:39 UTC (rev 4769)
@@ -31,7 +31,9 @@
import org.exoplatform.webui.config.annotation.ComponentConfigs;
import org.exoplatform.webui.config.annotation.EventConfig;
import org.exoplatform.webui.core.UIContainer;
+import org.exoplatform.webui.core.UIPopupMessages;
import org.exoplatform.webui.core.UIPopupWindow;
+import org.exoplatform.webui.core.UIPortletApplication;
import org.exoplatform.webui.event.Event;
import org.exoplatform.webui.event.EventListener;
@@ -62,6 +64,26 @@
addChild(UIDashboardContainer.class, null, null);
}
+ @Override
+ public void processRender(WebuiRequestContext context) throws Exception
+ {
+ UIGadget uiGadget = this.getMaximizedGadget();
+ if (uiGadget != null)
+ {
+ UIPopupMessages uiPopupMessages = getAncestorOfType(UIPortletApplication.class).getUIPopupMessages();
+ for (ApplicationMessage msg : uiPopupMessages.getErrors())
+ {
+ if (msg.getMessageKey().equals("UIDashboard.msg.ApplicationNotExisted"))
+ {
+ this.setMaximizedGadget(null);
+ break;
+ }
+ }
+ }
+
+ super.processRender(context);
+ }
+
public void setColumns(int num) throws Exception
{
getChild(UIDashboardContainer.class).setColumns(num);
@@ -152,9 +174,13 @@
else
{
uiGadget.getProperties().setProperty("minimized", minimized);
+ uiDashboardCont.save();
+ if (uiDashboard.getAncestorOfType(UIPortletApplication.class).getUIPopupMessages().hasMessage())
+ {
+ return;
+ }
+ Util.getPortalRequestContext().setResponseComplete(true);
}
- uiDashboardCont.save();
- context.addUIComponentToUpdateByAjax(uiGadget);
}
}
@@ -178,13 +204,16 @@
context.addUIComponentToUpdateByAjax(uiDashboard);
return;
}
-
- //TODO nguyenanhkien2a(a)gmail.com
- //We need to expand unminimized state of uiGadget to view all body of gadget, not just a title with no content
+
+ // TODO nguyenanhkien2a(a)gmail.xn--com-gla
+ // We need to expand unminimized state of uiGadget to view all body of
+ // gadget, not just a title with no content
uiGadget.getProperties().setProperty("minimized", "false");
uiDashboardCont.save();
-
- if (maximize.equals("maximize"))
+
+ UIPortletApplication uiDashboarPortlet = uiDashboard.getAncestorOfType(UIPortletApplication.class);
+ if (maximize.equals("maximize")
+ && !uiDashboarPortlet.getUIPopupMessages().hasMessage())
{
uiGadget.setView(UIGadget.CANVAS_VIEW);
uiDashboard.setMaximizedGadget(uiGadget);
Modified: epp/portal/branches/EPP_5_1_Branch/webui/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIDashboardContainer.java
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/webui/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIDashboardContainer.java 2010-10-22 11:50:10 UTC (rev 4768)
+++ epp/portal/branches/EPP_5_1_Branch/webui/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIDashboardContainer.java 2010-10-22 14:44:39 UTC (rev 4769)
@@ -22,6 +22,7 @@
import org.exoplatform.application.registry.Application;
import org.exoplatform.application.registry.ApplicationRegistryService;
import org.exoplatform.portal.config.DataStorage;
+import org.exoplatform.portal.config.StaleModelException;
import org.exoplatform.portal.config.model.Container;
import org.exoplatform.portal.config.model.Dashboard;
import org.exoplatform.portal.config.model.TransientApplicationState;
@@ -30,6 +31,7 @@
import org.exoplatform.portal.webui.application.UIPortlet;
import org.exoplatform.portal.webui.container.UIContainer;
import org.exoplatform.portal.webui.util.PortalDataMapper;
+import org.exoplatform.portal.webui.util.Util;
import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.web.application.RequestContext;
import org.exoplatform.webui.application.WebuiRequestContext;
@@ -40,6 +42,8 @@
import org.exoplatform.webui.config.annotation.ParamConfig;
import org.exoplatform.webui.core.UIApplication;
import org.exoplatform.webui.core.UIComponent;
+import org.exoplatform.webui.core.UIPopupMessages;
+import org.exoplatform.webui.core.UIPortletApplication;
import org.exoplatform.webui.core.model.SelectItemOption;
import org.exoplatform.webui.event.Event;
import org.exoplatform.webui.event.EventListener;
@@ -47,6 +51,8 @@
import org.jibx.runtime.IBindingFactory;
import org.jibx.runtime.IUnmarshallingContext;
+import com.sun.mail.imap.protocol.UIDSet;
+
import java.io.ByteArrayInputStream;
import java.util.ArrayList;
import java.util.List;
@@ -148,7 +154,7 @@
uiRoot.getChildren().clear();
// Assemble the dashboard
- PortalDataMapper.toUIContainer(uiRoot, dashboard);
+ PortalDataMapper.toUIContainer(uiRoot, dashboard);
}
//
@@ -478,7 +484,15 @@
DataStorage service = getApplicationComponent(DataStorage.class);
// Save
- service.saveDashboard(dashboard);
+ try
+ {
+ service.saveDashboard(dashboard);
+ }
+ catch (StaleModelException e)
+ {
+ getAncestorOfType(UIPortletApplication.class).addMessage(
+ new ApplicationMessage("UIDashboard.msg.StaleData", null, ApplicationMessage.ERROR));
+ }
}
}
@@ -532,7 +546,11 @@
uiDashboardContainer.moveUIGadget(objectId, col, row);
uiDashboardContainer.save();
- event.getRequestContext().setResponseComplete(true);
+ if (uiDashboard.getAncestorOfType(UIPortletApplication.class).getUIPopupMessages().hasMessage())
+ {
+ return;
+ }
+ Util.getPortalRequestContext().setResponseComplete(true);
}
}
@@ -552,15 +570,18 @@
UIDashboardContainer uiDashboardContainer = uiDashboard.getChild(UIDashboardContainer.class);
uiDashboardContainer.removeUIGadget(objectId);
boolean isMaximized = false;
- if (uiDashboard.getMaximizedGadget() != null && uiDashboard.getMaximizedGadget().getId().equals(objectId))
+ if (uiDashboard.getMaximizedGadget() != null &&
+ uiDashboard.getMaximizedGadget().getId().equals(objectId))
{
uiDashboard.setMaximizedGadget(null);
isMaximized = true;
}
uiDashboardContainer.save();
- if (!isMaximized)
+ UIPopupMessages uiPopupMessages =
+ uiDashboard.getAncestorOfType(UIPortletApplication.class).getUIPopupMessages();
+ if (!isMaximized && !uiPopupMessages.hasMessage())
{
- context.setResponseComplete(true);
+ Util.getPortalRequestContext().setResponseComplete(true);
}
}
}
Modified: epp/portal/branches/EPP_5_1_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java 2010-10-22 11:50:10 UTC (rev 4768)
+++ epp/portal/branches/EPP_5_1_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java 2010-10-22 14:44:39 UTC (rev 4769)
@@ -379,10 +379,13 @@
WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
//
- try{
+ try
+ {
uiGadget.addUserPref(event.getRequestContext().getRequestParameter("userPref"));
- Util.getPortalRequestContext().setFullRender(true);
- } catch(Exception e){
+ Util.getPortalRequestContext().setResponseComplete(true);
+ }
+ catch(Exception e)
+ {
UIPortletApplication uiPortlet = uiGadget.getAncestorOfType(UIPortletApplication.class);
context.addUIComponentToUpdateByAjax(uiPortlet);
throw new MessageException(new ApplicationMessage("UIDashboard.msg.ApplicationNotExisted", null, ApplicationMessage.ERROR));
14 years, 2 months
gatein SVN: r4768 - in epp/portal/branches/EPP_5_1_Branch: web/eXoResources/src/main/webapp/javascript/eXo/gadget and 1 other directories.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-10-22 07:50:10 -0400 (Fri, 22 Oct 2010)
New Revision: 4768
Modified:
epp/portal/branches/EPP_5_1_Branch/gadgets/eXoGadgets/src/main/webapp/gadgets/Todo/Todo.xml
epp/portal/branches/EPP_5_1_Branch/web/eXoResources/src/main/webapp/javascript/eXo/gadget/Gadgets.js
epp/portal/branches/EPP_5_1_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java
Log:
JBEPP-571: Lose UserPreference when drag and drop ToDo Gadget in Dashboard
Modified: epp/portal/branches/EPP_5_1_Branch/gadgets/eXoGadgets/src/main/webapp/gadgets/Todo/Todo.xml
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/gadgets/eXoGadgets/src/main/webapp/gadgets/Todo/Todo.xml 2010-10-22 11:48:34 UTC (rev 4767)
+++ epp/portal/branches/EPP_5_1_Branch/gadgets/eXoGadgets/src/main/webapp/gadgets/Todo/Todo.xml 2010-10-22 11:50:10 UTC (rev 4768)
@@ -175,11 +175,11 @@
if(inputList[i].value != null && inputList[i].value != "") {
var tmp = inputList[i].value;
var numTask = tmp.substring(0, tmp.indexOf('.'));
- var contentTask = tmp.substring(tmp.indexOf('.'), tmp.length);
+ var contentTask = tmp.substring(tmp.indexOf('.') + 1, tmp.length);
if(parseInt(numTask) != parseInt(inputList[i].id)) {
numTask = inputList[i].id;
}
- inputList[i].value = numTask+contentTask;
+ inputList[i].value = numTask + "." + contentTask;
}
}
}
Modified: epp/portal/branches/EPP_5_1_Branch/web/eXoResources/src/main/webapp/javascript/eXo/gadget/Gadgets.js
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/web/eXoResources/src/main/webapp/javascript/eXo/gadget/Gadgets.js 2010-10-22 11:48:34 UTC (rev 4767)
+++ epp/portal/branches/EPP_5_1_Branch/web/eXoResources/src/main/webapp/javascript/eXo/gadget/Gadgets.js 2010-10-22 11:50:10 UTC (rev 4768)
@@ -764,16 +764,26 @@
}
}
this.setUserPrefs(prefs);
- this.refresh();
};
+gadgets.IfrGadget.prototype.setUserPrefs = function(newUserPrefs) {
+ gadgets.IfrGadget.superClass_.setUserPrefs.call(this, newUserPrefs);
+ this.refresh();
+};
+
+gadgets.IfrGadget.prototype.setUserPref = function(name, value) {
+ gadgets.IfrGadget.superClass_.setUserPref.call(this, name, value);
+ this.refresh();
+};
+
gadgets.IfrGadget.prototype.handleCancelUserPrefs = function() {
this.hideUserPrefsDialog();
};
gadgets.IfrGadget.prototype.refresh = function() {
var iframeId = this.getIframeId();
- document.getElementById(iframeId).src = this.getIframeUrl();
+ if (document.getElementById(iframeId))
+ document.getElementById(iframeId).src = this.getIframeUrl();
};
Modified: epp/portal/branches/EPP_5_1_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java 2010-10-22 11:48:34 UTC (rev 4767)
+++ epp/portal/branches/EPP_5_1_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java 2010-10-22 11:50:10 UTC (rev 4768)
@@ -376,12 +376,13 @@
public void execute(Event<UIGadget> event) throws Exception
{
UIGadget uiGadget = event.getSource();
-
+ WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
+
//
try{
uiGadget.addUserPref(event.getRequestContext().getRequestParameter("userPref"));
- } catch(Exception e){
- WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
+ Util.getPortalRequestContext().setFullRender(true);
+ } catch(Exception e){
UIPortletApplication uiPortlet = uiGadget.getAncestorOfType(UIPortletApplication.class);
context.addUIComponentToUpdateByAjax(uiPortlet);
throw new MessageException(new ApplicationMessage("UIDashboard.msg.ApplicationNotExisted", null, ApplicationMessage.ERROR));
14 years, 2 months
gatein SVN: r4767 - portal/branches.
by do-not-reply@jboss.org
Author: trong.tran
Date: 2010-10-22 07:48:34 -0400 (Fri, 22 Oct 2010)
New Revision: 4767
Removed:
portal/branches/branch-GTNPORTAL-1537/
Log:
Remove the branch as its work has been merged into trunk
14 years, 2 months
gatein SVN: r4766 - in portal/trunk: portlet/dashboard/src/main/webapp/groovy/gadget/webui/component and 22 other directories.
by do-not-reply@jboss.org
Author: trong.tran
Date: 2010-10-22 07:45:25 -0400 (Fri, 22 Oct 2010)
New Revision: 4766
Added:
portal/trunk/server/jboss/patch-ear/src/main/jboss/server/default/deploy/jbossweb.sar/server.xml
Modified:
portal/trunk/portlet/dashboard/src/main/java/org/exoplatform/gadget/webui/component/UIGadgetPortlet.java
portal/trunk/portlet/dashboard/src/main/webapp/groovy/gadget/webui/component/UIGadgetViewMode.gtmpl
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIPermissionForm.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIAccountEditInputSet.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIListUsers.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIOrganizationPortlet.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIUserInfo.java
portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF/classes/locale/portlet/exoadmin/OrganizationPortlet_en.properties
portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF/portlet.xml
portal/trunk/server/tomcat/patch/src/main/tomcat/conf/server.xml
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/gadget/Gadgets.js
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/gadget/UIGadget.js
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalDragDrop.js
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortalNavigation.js
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UICalendar.js
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIDashboard.js
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties
portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/application/UIGadget.gtmpl
portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/application/UIPortlet.gtmpl
portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UIContainer.gtmpl
portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UITableAutofitColumnContainer.gtmpl
portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UITableColumnContainer.gtmpl
portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UIToolbarContainer.gtmpl
portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/portal/UIPortalComposer.gtmpl
portal/trunk/web/portal/src/main/webapp/groovy/webui/core/UITree.gtmpl
portal/trunk/web/rest/src/main/webapp/WEB-INF/web.xml
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormDateTimeInput.java
portal/trunk/webui/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIDashboard.java
portal/trunk/webui/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIDashboardContainer.java
portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/core/lifecycle/WebuiBindingContext.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletForm.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/container/UIContainerForm.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageForm.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageNodeForm.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java
Log:
GTNPORTAL-1537 Merge the works from branch into trunk
Modified: portal/trunk/portlet/dashboard/src/main/java/org/exoplatform/gadget/webui/component/UIGadgetPortlet.java
===================================================================
--- portal/trunk/portlet/dashboard/src/main/java/org/exoplatform/gadget/webui/component/UIGadgetPortlet.java 2010-10-22 10:27:10 UTC (rev 4765)
+++ portal/trunk/portlet/dashboard/src/main/java/org/exoplatform/gadget/webui/component/UIGadgetPortlet.java 2010-10-22 11:45:25 UTC (rev 4766)
@@ -75,6 +75,14 @@
{
return GadgetUtil.reproduceUrl(gadget.getUrl(), gadget.isLocal());
}
+ else
+ {
+ if (log.isWarnEnabled())
+ {
+ log.warn("The local gadget '" + gadgetName + "' was not found, nothing rendered");
+ }
+ return null;
+ }
}
catch (Exception e)
{
@@ -94,6 +102,11 @@
uiApplication.addMessage(new ApplicationMessage("UIGadgetPortlet.msg.url-invalid", null));
}
+ return getMetadata(url);
+ }
+
+ public String getMetadata(String url)
+ {
String metadata_ = GadgetUtil.fetchGagdetMetadata(url);
try
{
Modified: portal/trunk/portlet/dashboard/src/main/webapp/groovy/gadget/webui/component/UIGadgetViewMode.gtmpl
===================================================================
--- portal/trunk/portlet/dashboard/src/main/webapp/groovy/gadget/webui/component/UIGadgetViewMode.gtmpl 2010-10-22 10:27:10 UTC (rev 4765)
+++ portal/trunk/portlet/dashboard/src/main/webapp/groovy/gadget/webui/component/UIGadgetViewMode.gtmpl 2010-10-22 11:45:25 UTC (rev 4766)
@@ -5,19 +5,23 @@
import org.exoplatform.webui.application.portlet.PortletRequestContext;
def hostName = GadgetUtil.getRelGadgetServerUrl();
- def rcontext = _ctx.getRequestContext() ;
- def windowId = rcontext.getWindowId();
- def id = uicomponent.getId() + "-" + windowId ;
- def url = uicomponent.getParent().getUrl();
- def metadata = uicomponent.getParent().getMetadata();
- def userPref = null;//uicomponent.getUserPref() ;
- JavascriptManager jsmanager = rcontext.getJavascriptManager();
- jsmanager.importJavascript("eXo.gadget.UIGadget") ;
- jsmanager.addCustomizedOnLoadScript("eXo.gadget.UIGadget.createGadget('$url','$id', $metadata, $userPref, 'canvas', '$hostName');") ;
- java.util.Map<String, String> metadataMap = GadgetUtil.getMapMetadata(url) ;
- String height = "auto" ;
- if(metadataMap.containsKey("height") && Integer.parseInt(metadataMap.get("height")) > 0)
- height = (Integer.parseInt(metadataMap.get("height")) + 10) + "px" ;
+ def rcontext = _ctx.getRequestContext() ;
+ def windowId = rcontext.getWindowId();
+ def id = uicomponent.getId() + "-" + windowId ;
+ def url = uicomponent.getParent().getUrl();
+ def height = "auto" ;
+
+ if(url != null) {
+ def metadata = uicomponent.getParent().getMetadata(url);
+ def userPref = null;
+ JavascriptManager jsmanager = rcontext.getJavascriptManager();
+ jsmanager.importJavascript("eXo.gadget.UIGadget") ;
+ jsmanager.addCustomizedOnLoadScript("eXo.gadget.UIGadget.createGadget('$url','$id', $metadata, $userPref, 'canvas', '$hostName');") ;
+ java.util.Map<String, String> metadataMap = GadgetUtil.getMapMetadata(url) ;
+
+ if(metadataMap.containsKey("height") && Integer.parseInt(metadataMap.get("height")) > 0)
+ height = (Integer.parseInt(metadataMap.get("height")) + 10) + "px" ;
+ }
%>
<div class="UIGadgetViewMode" id="$id" style="height: <%=height%>;"></div>
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIPermissionForm.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIPermissionForm.java 2010-10-22 10:27:10 UTC (rev 4765)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIPermissionForm.java 2010-10-22 11:45:25 UTC (rev 4766)
@@ -20,6 +20,7 @@
package org.exoplatform.applicationregistry.webui.component;
import org.exoplatform.application.registry.Application;
+import org.exoplatform.application.registry.ApplicationCategory;
import org.exoplatform.application.registry.ApplicationRegistryService;
import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.webui.application.WebuiRequestContext;
@@ -95,7 +96,9 @@
service.update(application_);
Application selectedApplication = getApplication();
UIApplicationOrganizer uiApplicationOrganizer = getAncestorOfType(UIApplicationOrganizer.class);
+ ApplicationCategory selectedCategory = uiApplicationOrganizer.getSelectedCategory();
uiApplicationOrganizer.reload();
+ uiApplicationOrganizer.setSelectedCategory(selectedCategory);
uiApplicationOrganizer.setSelectedApplication(selectedApplication);
}
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIAccountEditInputSet.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIAccountEditInputSet.java 2010-10-22 10:27:10 UTC (rev 4765)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIAccountEditInputSet.java 2010-10-22 11:45:25 UTC (rev 4766)
@@ -110,26 +110,23 @@
WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
UIApplication uiApp = context.getUIApplication();
String username = getUIStringInput(USERNAME).getValue();
- User user = service.getUserHandler().findUserByName(username);
- String oldEmail = user.getEmail();
+ User user = service.getUserHandler().findUserByName(username);
if (user == null)
{
uiApp.addMessage(new ApplicationMessage("UIAccountInputSet.msg.user-is-deleted", null, ApplicationMessage.WARNING));
UIUserInfo userInfo = getParent();
if (userInfo != null)
{
- UIUserManagement userManagement = userInfo.getParent();
- UIListUsers listUser = userManagement.getChild(UIListUsers.class);
UIAccountEditInputSet accountInput = userInfo.getChild(UIAccountEditInputSet.class);
UIUserProfileInputSet userProfile = userInfo.getChild(UIUserProfileInputSet.class);
userInfo.setRenderSibling(UIListUsers.class);
- listUser.search(new Query());
accountInput.reset();
userProfile.reset();
context.setProcessRender(true);
}
return false;
}
+ String oldEmail = user.getEmail();
invokeSetBindingField(user);
if (isChangePassword())
{
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIListUsers.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIListUsers.java 2010-10-22 10:27:10 UTC (rev 4765)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIListUsers.java 2010-10-22 11:45:25 UTC (rev 4766)
@@ -91,7 +91,6 @@
grid_.configure(USER_NAME, USER_BEAN_FIELD, USER_ACTION);
grid_.getUIPageIterator().setId("UIListUsersIterator");
grid_.getUIPageIterator().setParent(this);
- search(new Query());
}
/**
@@ -117,18 +116,12 @@
public String getUserSelected()
{
return userSelected_;
- }
+ }
public void search(Query query) throws Exception
{
lastQuery_ = query;
- grid_.getUIPageIterator().setPageList(new FindUsersPageList(query, 10));
- UIPageIterator pageIterator = grid_.getUIPageIterator();
- if (pageIterator.getAvailable() == 0)
- {
- UIApplication uiApp = Util.getPortalRequestContext().getUIApplication();
- uiApp.addMessage(new ApplicationMessage("UISearchForm.msg.empty", null));
- }
+ grid_.getUIPageIterator().setPageList(new FindUsersPageList(query, 10));
}
public void quickSearch(UIFormInputSet quickSearchInput) throws Exception
@@ -137,29 +130,33 @@
UIFormStringInput input = (UIFormStringInput)quickSearchInput.getChild(0);
UIFormSelectBox select = (UIFormSelectBox)quickSearchInput.getChild(1);
String name = input.getValue();
- if (name == null || name.equals(""))
+ if (name != null && !name.equals(""))
{
- search(new Query());
- return;
- }
- if (name.indexOf("*") < 0)
+ if (name.indexOf("*") < 0)
+ {
+ if (name.charAt(0) != '*')
+ name = "*" + name;
+ if (name.charAt(name.length() - 1) != '*')
+ name += "*";
+ }
+ name = name.replace('?', '_');
+ String selectBoxValue = select.getValue();
+ if (selectBoxValue.equals(USER_NAME))
+ query.setUserName(name);
+ if (selectBoxValue.equals(LAST_NAME))
+ query.setLastName(name);
+ if (selectBoxValue.equals(FIRST_NAME))
+ query.setFirstName(name);
+ if (selectBoxValue.equals(EMAIL))
+ query.setEmail(name);
+ }
+ search(query);
+
+ if (getChild(UIGrid.class).getUIPageIterator().getAvailable() == 0)
{
- if (name.charAt(0) != '*')
- name = "*" + name;
- if (name.charAt(name.length() - 1) != '*')
- name += "*";
+ UIApplication uiApp = Util.getPortalRequestContext().getUIApplication();
+ uiApp.addMessage(new ApplicationMessage("UISearchForm.msg.empty", null));
}
- name = name.replace('?', '_');
- String selectBoxValue = select.getValue();
- if (selectBoxValue.equals(USER_NAME))
- query.setUserName(name);
- if (selectBoxValue.equals(LAST_NAME))
- query.setLastName(name);
- if (selectBoxValue.equals(FIRST_NAME))
- query.setFirstName(name);
- if (selectBoxValue.equals(EMAIL))
- query.setEmail(name);
- search(query);
}
@SuppressWarnings("unused")
@@ -176,7 +173,9 @@
OrganizationService service = uiListUsers.getApplicationComponent(OrganizationService.class);
if (service.getUserHandler().findUserByName(username) == null)
{
- uiListUsers.search(new Query());
+ UIApplication uiApplication = event.getRequestContext().getUIApplication();
+ uiApplication.addMessage(new ApplicationMessage("UIListUsers.msg.user-is-deleted",
+ null, ApplicationMessage.WARNING));
return;
}
uiListUsers.setRendered(false);
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIOrganizationPortlet.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIOrganizationPortlet.java 2010-10-22 10:27:10 UTC (rev 4765)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIOrganizationPortlet.java 2010-10-22 11:45:25 UTC (rev 4766)
@@ -70,8 +70,10 @@
{
public void execute(Event<UIOrganizationPortlet> event) throws Exception
{
- UIListUsers uiListUsers = event.getSource().findFirstComponentOfType(UIListUsers.class);
- uiListUsers.search(new Query());
+ //Actually we don't need to do anything here
+ //UIListUsers will have the lasteast data in it's processRender method
+// UIListUsers uiListUsers = event.getSource().findFirstComponentOfType(UIListUsers.class);
+// uiListUsers.search(new Query());
}
}
}
\ No newline at end of file
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIUserInfo.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIUserInfo.java 2010-10-22 10:27:10 UTC (rev 4765)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIUserInfo.java 2010-10-22 11:45:25 UTC (rev 4766)
@@ -143,12 +143,9 @@
Util.getPortalRequestContext().setFullRender(true);
}
- UIUserManagement userManagement = uiUserInfo.getParent();
- UIListUsers listUser = userManagement.getChild(UIListUsers.class);
UIAccountEditInputSet accountInput = uiUserInfo.getChild(UIAccountEditInputSet.class);
UIUserProfileInputSet userProfile = uiUserInfo.getChild(UIUserProfileInputSet.class);
uiUserInfo.setRenderSibling(UIListUsers.class);
- listUser.search(new Query());
accountInput.reset();
userProfile.reset();
event.getRequestContext().setProcessRender(true);
@@ -160,12 +157,9 @@
public void execute(Event<UIUserInfo> event) throws Exception
{
UIUserInfo userInfo = event.getSource();
- UIUserManagement userManagement = userInfo.getParent();
- UIListUsers listUser = userManagement.getChild(UIListUsers.class);
UIAccountEditInputSet accountInput = userInfo.getChild(UIAccountEditInputSet.class);
UIUserProfileInputSet userProfile = userInfo.getChild(UIUserProfileInputSet.class);
userInfo.setRenderSibling(UIListUsers.class);
- listUser.search(new Query());
accountInput.reset();
userProfile.reset();
event.getRequestContext().setProcessRender(true);
Modified: portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF/classes/locale/portlet/exoadmin/OrganizationPortlet_en.properties
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF/classes/locale/portlet/exoadmin/OrganizationPortlet_en.properties 2010-10-22 10:27:10 UTC (rev 4765)
+++ portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF/classes/locale/portlet/exoadmin/OrganizationPortlet_en.properties 2010-10-22 11:45:25 UTC (rev 4766)
@@ -79,7 +79,8 @@
UIListUsers.label.option.lastName=#{word.lastName}
UIListUsers.label.option.email=#{word.email}
UIListUsers.msg.DeleteSuperUser={0} is Super User, it can not be deleted
-UIListUsers.deleteUser=Are you sure you want to delete {0} user?
+UIListUsers.deleteUser=Are you sure you want to delete {0} user?
+UIListUsers.msg.user-is-deleted=This user may be deleted.
UIListMembershipType.deleteMemberShip=Are you sure you want to delete this membership?
Modified: portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF/portlet.xml
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF/portlet.xml 2010-10-22 10:27:10 UTC (rev 4765)
+++ portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF/portlet.xml 2010-10-22 11:45:25 UTC (rev 4766)
@@ -79,6 +79,9 @@
<short-title>Account Portlet</short-title>
<keywords>Administration</keywords>
</portlet-info>
+ <supported-publishing-event>
+ <name>NewAccountAdded</name>
+ </supported-publishing-event>
</portlet>
<portlet>
Copied: portal/trunk/server/jboss/patch-ear/src/main/jboss/server/default/deploy/jbossweb.sar/server.xml (from rev 4763, portal/branches/branch-GTNPORTAL-1537/server/jboss/patch-ear/src/main/jboss/server/default/deploy/jbossweb.sar/server.xml)
===================================================================
--- portal/trunk/server/jboss/patch-ear/src/main/jboss/server/default/deploy/jbossweb.sar/server.xml (rev 0)
+++ portal/trunk/server/jboss/patch-ear/src/main/jboss/server/default/deploy/jbossweb.sar/server.xml 2010-10-22 11:45:25 UTC (rev 4766)
@@ -0,0 +1,168 @@
+<Server>
+
+ <!-- Optional listener which ensures correct init and shutdown of APR,
+ and provides information if it is not installed -->
+ <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
+ <!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->
+ <Listener className="org.apache.catalina.core.JasperListener" />
+
+ <Service name="jboss.web">
+
+ <!-- A HTTP/1.1 Connector on port 8080 -->
+ <Connector protocol="HTTP/1.1" port="8080" address="${jboss.bind.address}"
+ connectionTimeout="20000" redirectPort="8443" />
+
+ <!-- Add this option to the connector to avoid problems with
+ .NET clients that don't implement HTTP/1.1 correctly
+ restrictedUserAgents="^.*MS Web Services Client Protocol 1.1.4322.*$"
+ -->
+
+ <!-- A AJP 1.3 Connector on port 8009 -->
+ <Connector protocol="AJP/1.3" port="8009" address="${jboss.bind.address}"
+ redirectPort="8443" />
+
+ <!-- SSL/TLS Connector configuration using the admin devl guide keystore
+ <Connector protocol="HTTP/1.1" SSLEnabled="true"
+ port="8443" address="${jboss.bind.address}"
+ scheme="https" secure="true" clientAuth="false"
+ keystoreFile="${jboss.server.home.dir}/conf/chap8.keystore"
+ keystorePass="rmi+ssl" sslProtocol = "TLS" />
+ -->
+
+ <Engine name="jboss.web" defaultHost="localhost">
+
+ <!-- The JAAS based authentication and authorization realm implementation
+ that is compatible with the jboss 3.2.x realm implementation.
+ - certificatePrincipal : the class name of the
+ org.jboss.security.auth.certs.CertificatePrincipal impl
+ used for mapping X509[] cert chains to a Princpal.
+ - allRolesMode : how to handle an auth-constraint with a role-name=*,
+ one of strict, authOnly, strictAuthOnly
+ + strict = Use the strict servlet spec interpretation which requires
+ that the user have one of the web-app/security-role/role-name
+ + authOnly = Allow any authenticated user
+ + strictAuthOnly = Allow any authenticated user only if there are no
+ web-app/security-roles
+ -->
+ <Realm className="org.jboss.web.tomcat.security.JBossWebRealm"
+ certificatePrincipal="org.jboss.security.auth.certs.SubjectDNMapping"
+ allRolesMode="authOnly"
+ />
+ <!-- A subclass of JBossSecurityMgrRealm that uses the authentication
+ behavior of JBossSecurityMgrRealm, but overrides the authorization
+ checks to use JACC permissions with the current java.security.Policy
+ to determine authorized access.
+ - allRolesMode : how to handle an auth-constraint with a role-name=*,
+ one of strict, authOnly, strictAuthOnly
+ + strict = Use the strict servlet spec interpretation which requires
+ that the user have one of the web-app/security-role/role-name
+ + authOnly = Allow any authenticated user
+ + strictAuthOnly = Allow any authenticated user only if there are no
+ web-app/security-roles
+ <Realm className="org.jboss.web.tomcat.security.JaccAuthorizationRealm"
+ certificatePrincipal="org.jboss.security.auth.certs.SubjectDNMapping"
+ allRolesMode="authOnly"
+ />
+ -->
+
+ <Host name="localhost">
+
+ <!-- Uncomment to enable request dumper. This Valve "logs interesting
+ contents from the specified Request (before processing) and the
+ corresponding Response (after processing). It is especially useful
+ in debugging problems related to headers and cookies."
+ -->
+ <!--
+ <Valve className="org.apache.catalina.valves.RequestDumperValve" />
+ -->
+
+ <!-- Access logger -->
+ <!--
+ <Valve className="org.apache.catalina.valves.AccessLogValve"
+ prefix="localhost_access_log." suffix=".log"
+ pattern="common" directory="${jboss.server.log.dir}"
+ resolveHosts="false" />
+ -->
+
+ <!-- Uncomment to enable single sign-on across web apps
+ deployed to this host. Does not provide SSO across a cluster.
+
+ If this valve is used, do not use the JBoss ClusteredSingleSignOn
+ valve shown below.
+
+ A new configuration attribute is available beginning with
+ release 4.0.4:
+
+ cookieDomain configures the domain to which the SSO cookie
+ will be scoped (i.e. the set of hosts to
+ which the cookie will be presented). By default
+ the cookie is scoped to "/", meaning the host
+ that presented it. Set cookieDomain to a
+ wider domain (e.g. "xyz.com") to allow an SSO
+ to span more than one hostname.
+ -->
+
+ <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
+
+
+ <!-- Uncomment to enable single sign-on across web apps
+ deployed to this host AND to all other hosts in the cluster.
+
+ If this valve is used, do not use the standard Tomcat SingleSignOn
+ valve shown above.
+
+ Valve uses a JBossCache instance to support SSO credential
+ caching and replication across the cluster. The JBossCache
+ instance must be configured separately. See the
+ "jboss-web-clusteredsso-beans.xml" file in the
+ server/all/deploy directory for cache configuration details.
+
+ Besides the attributes supported by the standard Tomcat
+ SingleSignOn valve (see the Tomcat docs), this version also
+ supports the following attributes:
+
+ cookieDomain see non-clustered valve above
+
+ cacheConfig Name of the CacheManager service configuration
+ to use for the clustered SSO cache. See
+ deploy/cluster/jboss-cache-manager.sar/META-INF/jboss-cache-manager-jboss-beans.xml
+ Default is "clustered-sso".
+
+ treeCacheName Deprecated. Use "cacheConfig".
+ JMX ObjectName of the JBoss Cache MBean used to
+ support credential caching and replication across
+ the cluster. Only used if no cache can be located
+ from the CacheManager service using the "cacheConfig"
+ attribute (or its default value). If not set, the
+ default is "jboss.cache:service=TomcatClusteringCache"
+
+ maxEmptyLife The maximum number of seconds an SSO with no
+ active sessions will be usable by a request
+
+ processExpiresInterval The minimum number of seconds between
+ efforts by the valve to find and invalidate
+ SSO's that have exceeded their 'maxEmptyLife'.
+ Does not imply effort will be spent on such
+ cleanup every 'processExpiresInterval'.
+ -->
+ <!--
+ <Valve className="org.jboss.web.tomcat.service.sso.ClusteredSingleSignOn" />
+ -->
+
+ <!-- Check for unclosed connections and transaction terminated checks
+ in servlets/jsps.
+
+ Important: The dependency on the CachedConnectionManager
+ in META-INF/jboss-service.xml must be uncommented, too
+ -->
+
+ <Valve className="org.jboss.web.tomcat.service.jca.CachedConnectionValve"
+ cachedConnectionManagerObjectName="jboss.jca:service=CachedConnectionManager"
+ transactionManagerObjectName="jboss:service=TransactionManager" />
+
+ </Host>
+ </Engine>
+
+ </Service>
+
+</Server>
Modified: portal/trunk/server/tomcat/patch/src/main/tomcat/conf/server.xml
===================================================================
--- portal/trunk/server/tomcat/patch/src/main/tomcat/conf/server.xml 2010-10-22 10:27:10 UTC (rev 4765)
+++ portal/trunk/server/tomcat/patch/src/main/tomcat/conf/server.xml 2010-10-22 11:45:25 UTC (rev 4766)
@@ -121,9 +121,7 @@
<!-- SingleSignOn valve, share authentication between web applications
Documentation at: /docs/config/valve.html -->
- <!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
- -->
<!-- Access log processes all example.
Documentation at: /docs/config/valve.html -->
Modified: portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/gadget/Gadgets.js
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/gadget/Gadgets.js 2010-10-22 10:27:10 UTC (rev 4765)
+++ portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/gadget/Gadgets.js 2010-10-22 11:45:25 UTC (rev 4766)
@@ -674,11 +674,9 @@
el.type = "checkbox";
el.name = prefix + att;
el.id = elID;
- if (userPrefs[att] && userPrefs[att] == "true") {
- el.checked = userPrefs[att];
- } else {
- if(prefs[att].default == "true")
- el.checked = true;
+ if ((userPrefs[att] && userPrefs[att] == "true") ||
+ prefs[att]["default"] == "true") {
+ el.checked = true;
}
attEl.appendChild(el);
}
Modified: portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/gadget/UIGadget.js
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/gadget/UIGadget.js 2010-10-22 10:27:10 UTC (rev 4765)
+++ portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/gadget/UIGadget.js 2010-10-22 11:45:25 UTC (rev 4766)
@@ -244,7 +244,7 @@
href += "&op=MinimizeGadget";
href += "&minimized=" + minimized;
href += "&objectId=" + uiGadget.id + "&ajaxRequest=true";
- ajaxAsyncGetRequest(href);
+ ajaxGet(href);
if (uiGadget.minimizeCallback) uiGadget.minimizeCallback(portletFrag.parentNode.id);
},
/**
@@ -294,7 +294,7 @@
var uiDashboardCont = DOMUtil.findAncestorByClass(uiGadget, "UIDashboardContainer");
if(uiDashboardCont) {
- ajaxAsyncGetRequest(href);
+ ajaxGet(href);
DOMUtil.removeElement(uiGadget);
if(!DOMUtil.findFirstDescendantByClass(uiDashboardCont, "div", "UIGadget")) {
DOMUtil.findFirstDescendantByClass(uiDashboardCont, "div", "NoGadget").style.display = "block";
Modified: portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalDragDrop.js
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalDragDrop.js 2010-10-22 10:27:10 UTC (rev 4765)
+++ portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalDragDrop.js 2010-10-22 11:45:25 UTC (rev 4766)
@@ -196,6 +196,38 @@
DragDrop.dropCallback = function(dndEvent) {
this.origDragObjectStyle.setProperties(dndEvent.dragObject.style, false) ;
+
+ var hasChanged = true;
+ //When press esc key, we want to cancel the dragdrop, but now it only works with FF
+ if (dndEvent.backupMouseEvent && dndEvent.backupMouseEvent.keyCode == 27 && eXo.core.Browser.isFF()) {
+ hasChanged = false;
+ }
+ //When dragObject is outside
+ var targetElement = dndEvent.foundTargetObject;
+ if(!targetElement || targetElement.foundIndex == null) {
+ hasChanged = false;
+ }
+ //When dragobject is next to preview object (position is not changed)
+ if(!dndEvent.dragObject.isAddingNewly) {
+ var DOMUtil = eXo.core.DOMUtil;
+ var previewClass = "DragAndDropPreview";
+ var previewTagName = "div";
+ var previewSibling = dndEvent.dragObject;
+ if (dndEvent.dragObject.parentNode.tagName.toLowerCase() == "td") {
+ previewSibling = dndEvent.dragObject.parentNode;
+ previewClass = "PreviewTDBlock";
+ previewTagName = "td";
+ }
+ var tempObj = DOMUtil.findNextElementByTagName(previewSibling, previewTagName);
+ if (tempObj != null && tempObj.className == previewClass) {
+ hasChanged = false;
+ } else {
+ tempObj = DOMUtil.findPreviousElementByTagName(previewSibling, previewTagName);
+ if (tempObj != null && tempObj.className == previewClass) {
+ hasChanged = false;
+ }
+ }
+ }
if(dndEvent.foundTargetObject != null || (dndEvent.backupMouseEvent && dndEvent.backupMouseEvent.keyCode != 27)) {
eXo.portal.PortalDragDrop.doDropCallback(dndEvent) ;
@@ -219,7 +251,9 @@
previewBlock = previewTD = null;
eXo.portal.isInDragging = false;
- eXo.portal.UIPortal.changeComposerSaveButton();
+ if (hasChanged) {
+ eXo.portal.UIPortal.changeComposerSaveButton();
+ }
// fix bug WEBOS-196
dndEvent.dragObject.style.width = "auto" ;
};
Modified: portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js 2010-10-22 10:27:10 UTC (rev 4765)
+++ portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js 2010-10-22 11:45:25 UTC (rev 4766)
@@ -515,7 +515,7 @@
}
}
}
- if(response.blocksToUpdate == undefined) {
+ if(response.blocksToUpdate == undefined && temp.innerHTML !== "") {
if(confirm(eXo.i18n.I18NMessage.getMessage("SessionTimeout"))) instance.ajaxTimeout(request) ;
}
//Handle the portal responses
Modified: portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortalNavigation.js
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortalNavigation.js 2010-10-22 10:27:10 UTC (rev 4765)
+++ portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortalNavigation.js 2010-10-22 11:45:25 UTC (rev 4766)
@@ -223,8 +223,8 @@
eXo.portal.UIPortalNavigation.superClass.setPosition(menuItemContainer, x, y, eXo.core.I18n.isRT());
eXo.portal.UIPortalNavigation.superClass.show(menuItemContainer);
- menuItemContainer.style.width = menuItemContainer.offsetWidth - parseInt(DOMUtil.getStyle(menuItemContainer, "borderLeftWidth"))
- - parseInt(DOMUtil.getStyle(menuItemContainer, "borderRightWidth")) + "px";
+ menuItemContainer.style.width = menuItemContainer.offsetWidth - parseInt(DOMUtil.getStyle(menuItemContainer, "borderLeftWidth",true))
+ - parseInt(DOMUtil.getStyle(menuItemContainer, "borderRightWidth",true)) + "px";
var posXinBrowser = eXo.core.Browser.findPosX(menuItemContainer);
if(eXo.core.I18n.isLT()) {
if(posXinBrowser + menuItemContainer.offsetWidth >= eXo.core.Browser.getBrowserWidth()) {
Modified: portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UICalendar.js
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UICalendar.js 2010-10-22 10:27:10 UTC (rev 4765)
+++ portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UICalendar.js 2010-10-22 11:45:25 UTC (rev 4766)
@@ -68,7 +68,7 @@
}
UICalendar.prototype.show = function() {
- document.onmousedown = new Function('eXo.webui.UICalendar.hide()') ;
+ document.onclick = new Function('eXo.webui.UICalendar.hide()') ;
var re = /^(\d{1,2}\/\d{1,2}\/\d{1,4})\s*(\s+\d{1,2}:\d{1,2}:\d{1,2})?$/i ;
this.selectedDate = new Date() ;
@@ -150,35 +150,27 @@
clndr.firstChild.style.top = -heightCal.offsetHeight + 'px';
}
- var drag = document.getElementById("BlockCaledar");
- var component = eXo.core.DOMUtil.findAncestorByClass(drag, "UICalendarComponent");
- var calendar = eXo.core.DOMUtil.findFirstChildByClass(drag, "div", "UICalendar");
- var innerWidth = drag.offsetWidth;
- drag.onmousedown = function(evt) {
- var event = evt || window.event;
- event.cancelBubble = true;
- drag.style.position = "absolute";
- if(eXo.core.Browser.isIE7()) drag.style.height = calendar.offsetHeight + "px";
- drag.style.width = innerWidth + "px";
- eXo.core.DragDrop.init(null, drag, component, event);
- }
-
- //
- var primary = eXo.core.DOMUtil.findAncestorById(this.dateField, "UIECMSearch");
- if (primary && eXo.core.Browser.isFF()) {
- calendar = clndr.firstChild;
- calendar.style.top = "0px";
- calendar.style.left = this.dateField.offsetLeft - this.dateField.offsetWidth - 32 + "px";
- }
+ eXo.webui.UICalendar.initDragDrop();
+
+ var drag = document.getElementById("BlockCaledar");
+ var calendar = eXo.core.DOMUtil.findFirstChildByClass(drag, "div", "UICalendar");
+ var primary = eXo.core.DOMUtil.findAncestorById(this.dateField, "UIECMSearch");
+ if (primary && eXo.core.Browser.isFF()) {
+ calendar = clndr.firstChild;
+ calendar.style.top = "0px";
+ calendar.style.left = this.dateField.offsetLeft - this.dateField.offsetWidth - 32 + "px";
+ }
}
UICalendar.prototype.hide = function() {
if (this.dateField) {
document.getElementById(this.calendarId).firstChild.style.display = 'none' ;
// this.dateField.parentNode.style.position = '' ;
+ this.dateField.blur();
this.dateField = null ;
}
- document.onmousedown = null ;
+ document.onclick = null ;
+ //document.onmousedown = null;
}
/* TODO: Move HTML code to a javascript template file (.jstmpl) */
@@ -188,7 +180,7 @@
var startDayOfWeek = this.getDayOfWeek(this.currentDate.getFullYear(), this.currentDate.getMonth() + 1, dayOfMonth) ;
var daysInMonth = this.getDaysInMonth(this.currentDate.getFullYear(), this.currentDate.getMonth()) ;
var clazz = null;
- var table = '<div id="BlockCaledar" class="BlockCalendar">' ;
+ var table = '<div id="BlockCaledar" class="BlockCalendar" onclick="event.cancelBubble = true">' ;
table += '<div class="UICalendar" onmousedown="event.cancelBubble = true">' ;
table += ' <table class="MonthYearBox">' ;
table += ' <tr>' ;
@@ -258,13 +250,41 @@
this.currentDate.setMonth(this.currentDate.getMonth() + change) ;
var clndr = document.getElementById(this.calendarId) ;
clndr.firstChild.lastChild.innerHTML = this.renderCalendar() ;
+
+ eXo.webui.UICalendar.initDragDrop();
}
+UICalendar.prototype.initDragDrop = function() {
+ var drag = document.getElementById("BlockCaledar");
+ var component = eXo.core.DOMUtil.findAncestorByClass(drag, "UICalendarComponent");
+ var calendar = eXo.core.DOMUtil.findFirstChildByClass(drag, "div", "UICalendar");
+ var innerWidth = drag.offsetWidth;
+
+ eXo.core.DragDrop2.init(drag, component);
+ component.onDragStart = function() {
+ if(eXo.core.Browser.isIE7()) drag.style.height = calendar.offsetHeight + "px";
+ drag.style.width = innerWidth + "px";
+ }
+
+// var calendar = eXo.core.DOMUtil.findFirstChildByClass(drag, "div", "UICalendar");
+// var innerWidth = drag.offsetWidth;
+// drag.onmousedown = function(evt) {
+// var event = evt || window.event;
+// event.cancelBubble = true;
+// drag.style.position = "absolute";
+// if(eXo.core.Browser.isIE7()) drag.style.height = calendar.offsetHeight + "px";
+// drag.style.width = innerWidth + "px";
+// eXo.core.DragDrop2.init(drag, component);
+// }
+}
+
UICalendar.prototype.changeYear = function(change) {
this.currentDate.setFullYear(this.currentDate.getFullYear() + change) ;
this.currentDay = 0 ;
var clndr = document.getElementById(this.calendarId) ;
clndr.firstChild.lastChild.innerHTML = this.renderCalendar() ;
+
+ eXo.webui.UICalendar.initDragDrop();
}
UICalendar.prototype.setDate = function(year, month, day) {
Modified: portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIDashboard.js
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIDashboard.js 2010-10-22 10:27:10 UTC (rev 4765)
+++ portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIDashboard.js 2010-10-22 11:45:25 UTC (rev 4766)
@@ -233,7 +233,7 @@
{name: "objectId", value: dragObj.id}
];
var url = uiDashboardUtil.createRequest(compId, 'MoveGadget', params);
- ajaxAsyncGetRequest(url);
+ ajaxGet(url);
}
}
}
@@ -255,7 +255,7 @@
};
UIDashboard.prototype.onLoad = function(windowId, canEdit) {
- var portletWindow = document.getElementById(windowId);
+ var portletWindow = document.getElementById(windowId) ? document.getElementById(windowId) : document.getElementById("UIPortlet-" + windowId);
if(!portletWindow) return;
var DOMUtil = eXo.core.DOMUtil;
Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties 2010-10-22 10:27:10 UTC (rev 4765)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties 2010-10-22 11:45:25 UTC (rev 4766)
@@ -1249,6 +1249,7 @@
UIDashboard.msg.addGadget=Drag your gadgets here.
UIDashboard.msg.notUrl=The url is invalid. Please enter a correct url of a gadget xml or of an RSS feed.
UIDashboard.msg.ApplicationNotExisted=This application is not exist or may be deleted.
+UIDashboard.msg.StaleData=Some stale data are on your dashboard, it will be refreshed now
################################################################################
# org.exoplatform.webui.organization.account.UIUserSelector
Modified: portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/application/UIGadget.gtmpl
===================================================================
--- portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/application/UIGadget.gtmpl 2010-10-22 10:27:10 UTC (rev 4765)
+++ portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/application/UIGadget.gtmpl 2010-10-22 11:45:25 UTC (rev 4766)
@@ -39,8 +39,10 @@
<div class="<%=isMini ? "RestoreGadget": "MinimizeGadget";%> MinimizeAction IconControl"
onclick="eXo.gadget.UIGadget.minimizeGadget(this)" onmousedown="event.cancelBubble=true;" style="display:none;"
title="<%=isMini ? unminiTitle : miniTitle%>" miniTitle="$miniTitle" unminiTitle="$unminiTitle"><span></span></div>
- <div class="EditGadget IconControl" onclick="eXo.gadget.UIGadget.editGadget('$id')" onmousedown="event.cancelBubble=true;" title="<%=_ctx.appRes("UIGadget.tooltip.editGadget")%>"><span></span></div>
- <div class="GadgetDragHandleArea"><span></span></div>
+ <% if(uicomponent.isSettingUserPref()) { %>
+ <div class="EditGadget IconControl" onclick="eXo.gadget.UIGadget.editGadget('$id')" onmousedown="event.cancelBubble=true;" title="<%=_ctx.appRes("UIGadget.tooltip.editGadget")%>"><span></span></div>
+ <% } %>
+ <div class="GadgetDragHandleArea"><span></span></div>
<div class="GadgetTitle" style="display: none; float: none; width: auto; margin-right: 75px"><%= uicomponent.getApplicationName() %></div>
</div>
</div>
Modified: portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/application/UIPortlet.gtmpl
===================================================================
--- portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/application/UIPortlet.gtmpl 2010-10-22 10:27:10 UTC (rev 4765)
+++ portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/application/UIPortlet.gtmpl 2010-10-22 11:45:25 UTC (rev 4766)
@@ -286,7 +286,7 @@
%>
<div class="PortletIcon $portletIcon"><%=hasPermission ? title : _ctx.appRes("UIPortlet.label.protectedContent")%></div>
<%if(hasPermission) {%>
- <a href="<%=uicomponent.event("EditPortlet","$uicomponent.id")%>;eXo.portal.UIPortal.changeComposerSaveButton()" class="EditPortletPropertiesIcon" title="<%=_ctx.appRes("UIPortlet.tooltip.editPortlet");%>"></a>
+ <a href="<%=uicomponent.event("EditPortlet","$uicomponent.id")%>;" class="EditPortletPropertiesIcon" title="<%=_ctx.appRes("UIPortlet.tooltip.editPortlet");%>"></a>
<a href="<%=uicomponent.event("DeleteComponent","$uicomponent.id")%>" class="DeletePortletIcon" title="<%=_ctx.appRes("UIPortlet.tooltip.deletePortlet");%>"></a>
<%}%>
</div>
Modified: portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UIContainer.gtmpl
===================================================================
--- portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UIContainer.gtmpl 2010-10-22 10:27:10 UTC (rev 4765)
+++ portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UIContainer.gtmpl 2010-10-22 11:45:25 UTC (rev 4766)
@@ -42,9 +42,9 @@
<div class="VIEW-CONTAINER VIEW-BLOCK">
<%} %>
<%if(hasPermission) {%>
- <div class="UIRowContainer <%=(portalMode != UIPortalApplication.NORMAL_MODE && uicomponent.getChildren().size() == 0) ? "EmptyContainer" : ""%>">
- <div>
- <%uicomponent.renderChildren();%>
+ <div>
+ <div class="UIRowContainer <%=(portalMode != UIPortalApplication.NORMAL_MODE && uicomponent.getChildren().size() == 0) ? "EmptyContainer" : ""%>">
+ <%uicomponent.renderChildren();%>
</div>
</div>
<%} else out.print("<div class='ProtectedContent'>"+_ctx.appRes("UIPortlet.label.protectedContent")+"</div>");%>
@@ -72,7 +72,7 @@
%>
<div class="ContainerIcon"><%=hasPermission ? strTitle : _ctx.appRes("UIPortlet.label.protectedContent")%></div>
<%if(hasPermission) {%>
- <a href="<%=uicomponent.event("EditContainer")%>;eXo.portal.UIPortal.changeComposerSaveButton()" class="EditContainerIcon" title="<%=_ctx.appRes("UIContainer.tooltip.editContainer")%>"><span></span></a>
+ <a href="<%=uicomponent.event("EditContainer")%>" class="EditContainerIcon" title="<%=_ctx.appRes("UIContainer.tooltip.editContainer")%>"><span></span></a>
<a href="<%=uicomponent.event("DeleteComponent")%>" class="DeleteContainerIcon" title="<%=_ctx.appRes("UIContainer.tooltip.closeContainer")%>"><span></span></a>
<%}%>
Modified: portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UITableAutofitColumnContainer.gtmpl
===================================================================
--- portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UITableAutofitColumnContainer.gtmpl 2010-10-22 10:27:10 UTC (rev 4765)
+++ portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UITableAutofitColumnContainer.gtmpl 2010-10-22 11:45:25 UTC (rev 4766)
@@ -73,7 +73,7 @@
%>
<div class="ContainerIcon DefaultContainer16x16Icon"><%=hasPermission ? strTitle : _ctx.appRes("UIPortlet.label.protectedContent")%></div>
<%if(hasPermission) {%>
- <a href="<%=uicomponent.event("EditContainer","$uicomponent.id")%>;eXo.portal.UIPortal.changeComposerSaveButton()" class="EditContainerIcon" title="<%=_ctx.appRes("UIContainer.tooltip.editContainer")%>"><span></span></a>
+ <a href="<%=uicomponent.event("EditContainer","$uicomponent.id")%>" class="EditContainerIcon" title="<%=_ctx.appRes("UIContainer.tooltip.editContainer")%>"><span></span></a>
<a href="<%=uicomponent.event("DeleteComponent","$uicomponent.id")%>" class="DeleteContainerIcon" title="<%=_ctx.appRes("UIContainer.tooltip.closeContainer")%>"><span></span></a>
<%}%>
</div>
Modified: portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UITableColumnContainer.gtmpl
===================================================================
--- portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UITableColumnContainer.gtmpl 2010-10-22 10:27:10 UTC (rev 4765)
+++ portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UITableColumnContainer.gtmpl 2010-10-22 11:45:25 UTC (rev 4766)
@@ -73,7 +73,7 @@
%>
<div class="ContainerIcon DefaultContainer16x16Icon"><%=hasPermission ? strTitle : _ctx.appRes("UIPortlet.label.protectedContent")%></div>
<%if(hasPermission) {%>
- <a href="<%=uicomponent.event("EditContainer","$uicomponent.id")%>;eXo.portal.UIPortal.changeComposerSaveButton()" class="EditContainerIcon" title="<%=_ctx.appRes("UIContainer.tooltip.editContainer")%>"><span></span></a>
+ <a href="<%=uicomponent.event("EditContainer","$uicomponent.id")%>" class="EditContainerIcon" title="<%=_ctx.appRes("UIContainer.tooltip.editContainer")%>"><span></span></a>
<a href="<%=uicomponent.event("DeleteComponent","$uicomponent.id")%>" class="DeleteContainerIcon" title="<%=_ctx.appRes("UIContainer.tooltip.closeContainer")%>"><span></span></a>
<%}%>
</div>
Modified: portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UIToolbarContainer.gtmpl
===================================================================
--- portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UIToolbarContainer.gtmpl 2010-10-22 10:27:10 UTC (rev 4765)
+++ portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UIToolbarContainer.gtmpl 2010-10-22 11:45:25 UTC (rev 4766)
@@ -70,7 +70,7 @@
%>
<div class="ContainerIcon DefaultContainer16x16Icon"><%=hasPermission ? strTitle : _ctx.appRes("UIPortlet.label.protectedContent")%></div>
<%if(hasPermission) {%>
- <a href="<%=uicomponent.event("EditContainer","$uicomponent.id")%>;eXo.portal.UIPortal.changeComposerSaveButton()" class="EditContainerIcon" title="<%=_ctx.appRes("UIContainer.tooltip.editContainer")%>"><span></span></a>
+ <a href="<%=uicomponent.event("EditContainer","$uicomponent.id")%>;" class="EditContainerIcon" title="<%=_ctx.appRes("UIContainer.tooltip.editContainer")%>"><span></span></a>
<a href="<%=uicomponent.event("DeleteComponent","$uicomponent.id")%>" class="DeleteContainerIcon" title="<%=_ctx.appRes("UIContainer.tooltip.closeContainer")%>"><span></span></a>
<%}%>
</div>
Modified: portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/portal/UIPortalComposer.gtmpl
===================================================================
--- portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/portal/UIPortalComposer.gtmpl 2010-10-22 10:27:10 UTC (rev 4765)
+++ portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/portal/UIPortalComposer.gtmpl 2010-10-22 11:45:25 UTC (rev 4766)
@@ -52,7 +52,7 @@
<tr>
<td>
- <div onclick="<%= uicomponent.event("ViewProperties") %>;eXo.portal.UIPortal.changeComposerSaveButton()" class="ActionButton SimpleStyle1">
+ <div onclick="<%= uicomponent.event("ViewProperties") %>;" class="ActionButton SimpleStyle1">
<div class="ButtonLeft">
<div class="ButtonRight">
<div class="ButtonMiddle">
Modified: portal/trunk/web/portal/src/main/webapp/groovy/webui/core/UITree.gtmpl
===================================================================
--- portal/trunk/web/portal/src/main/webapp/groovy/webui/core/UITree.gtmpl 2010-10-22 10:27:10 UTC (rev 4765)
+++ portal/trunk/web/portal/src/main/webapp/groovy/webui/core/UITree.gtmpl 2010-10-22 11:45:25 UTC (rev 4766)
@@ -17,7 +17,7 @@
%>
<div class="UITrees ScrollArea">
<div class="TreeContainer JSContainer">
- <div style="padding-bottom: 12px">
+ <div style="padding-bottom: 12px; width: 99%">
<div class="HomeNode">
<a class="LevelUpArrowIcon" href="<%=uicomponent.getActionLink();%>" onmousedown="event.cancelBubble=true;" title="<%=_ctx.appRes("UITree.tooltip.UpLevel")%>" style="display: block;"><span></span></a>
</div>
Modified: portal/trunk/web/rest/src/main/webapp/WEB-INF/web.xml
===================================================================
--- portal/trunk/web/rest/src/main/webapp/WEB-INF/web.xml 2010-10-22 10:27:10 UTC (rev 4765)
+++ portal/trunk/web/rest/src/main/webapp/WEB-INF/web.xml 2010-10-22 11:45:25 UTC (rev 4766)
@@ -56,7 +56,17 @@
<filter-name>RestEncodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
-
+
+ <!-- ================================================================== -->
+ <!-- LISTENER -->
+ <!-- ================================================================== -->
+ <listener>
+ <listener-class>org.exoplatform.web.GenericHttpListener</listener-class>
+ </listener>
+ <listener>
+ <listener-class>org.exoplatform.services.security.web.JAASConversationStateListener</listener-class>
+ </listener>
+
<servlet>
<servlet-name>RestServer</servlet-name>
<description>eXo - Platform REST Server</description>
@@ -74,6 +84,10 @@
<url-pattern>/*</url-pattern>
</servlet-mapping>
+ <session-config>
+ <session-timeout>30</session-timeout>
+ </session-config>
+
<security-constraint>
<web-resource-collection>
<web-resource-name>rest</web-resource-name>
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormDateTimeInput.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormDateTimeInput.java 2010-10-22 10:27:10 UTC (rev 4765)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormDateTimeInput.java 2010-10-22 11:45:25 UTC (rev 4766)
@@ -234,6 +234,6 @@
w.write(value_.toString());
w.write('\'');
}
- w.write(" onmousedown='event.cancelBubble = true' />");
+ w.write(" onclick='event.cancelBubble = true'/>");
}
}
Modified: portal/trunk/webui/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIDashboard.java
===================================================================
--- portal/trunk/webui/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIDashboard.java 2010-10-22 10:27:10 UTC (rev 4765)
+++ portal/trunk/webui/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIDashboard.java 2010-10-22 11:45:25 UTC (rev 4766)
@@ -31,7 +31,9 @@
import org.exoplatform.webui.config.annotation.ComponentConfigs;
import org.exoplatform.webui.config.annotation.EventConfig;
import org.exoplatform.webui.core.UIContainer;
+import org.exoplatform.webui.core.UIPopupMessages;
import org.exoplatform.webui.core.UIPopupWindow;
+import org.exoplatform.webui.core.UIPortletApplication;
import org.exoplatform.webui.event.Event;
import org.exoplatform.webui.event.EventListener;
@@ -62,6 +64,26 @@
addChild(UIDashboardContainer.class, null, null);
}
+ @Override
+ public void processRender(WebuiRequestContext context) throws Exception
+ {
+ UIGadget uiGadget = this.getMaximizedGadget();
+ if (uiGadget != null)
+ {
+ UIPopupMessages uiPopupMessages = getAncestorOfType(UIPortletApplication.class).getUIPopupMessages();
+ for (ApplicationMessage msg : uiPopupMessages.getErrors())
+ {
+ if (msg.getMessageKey().equals("UIDashboard.msg.ApplicationNotExisted"))
+ {
+ this.setMaximizedGadget(null);
+ break;
+ }
+ }
+ }
+
+ super.processRender(context);
+ }
+
public void setColumns(int num) throws Exception
{
getChild(UIDashboardContainer.class).setColumns(num);
@@ -152,9 +174,13 @@
else
{
uiGadget.getProperties().setProperty("minimized", minimized);
+ uiDashboardCont.save();
+ if (uiDashboard.getAncestorOfType(UIPortletApplication.class).getUIPopupMessages().hasMessage())
+ {
+ return;
+ }
+ Util.getPortalRequestContext().setResponseComplete(true);
}
- uiDashboardCont.save();
- context.addUIComponentToUpdateByAjax(uiGadget);
}
}
@@ -178,13 +204,16 @@
context.addUIComponentToUpdateByAjax(uiDashboard);
return;
}
-
- //TODO nguyenanhkien2a(a)gmail.com
- //We need to expand unminimized state of uiGadget to view all body of gadget, not just a title with no content
+
+ // TODO nguyenanhkien2a(a)gmail.xn--com-gla
+ // We need to expand unminimized state of uiGadget to view all body of
+ // gadget, not just a title with no content
uiGadget.getProperties().setProperty("minimized", "false");
uiDashboardCont.save();
-
- if (maximize.equals("maximize"))
+
+ UIPortletApplication uiDashboarPortlet = uiDashboard.getAncestorOfType(UIPortletApplication.class);
+ if (maximize.equals("maximize")
+ && !uiDashboarPortlet.getUIPopupMessages().hasMessage())
{
uiGadget.setView(UIGadget.CANVAS_VIEW);
uiDashboard.setMaximizedGadget(uiGadget);
Modified: portal/trunk/webui/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIDashboardContainer.java
===================================================================
--- portal/trunk/webui/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIDashboardContainer.java 2010-10-22 10:27:10 UTC (rev 4765)
+++ portal/trunk/webui/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIDashboardContainer.java 2010-10-22 11:45:25 UTC (rev 4766)
@@ -22,6 +22,7 @@
import org.exoplatform.application.registry.Application;
import org.exoplatform.application.registry.ApplicationRegistryService;
import org.exoplatform.portal.config.DataStorage;
+import org.exoplatform.portal.config.StaleModelException;
import org.exoplatform.portal.config.model.Container;
import org.exoplatform.portal.config.model.Dashboard;
import org.exoplatform.portal.config.model.TransientApplicationState;
@@ -30,6 +31,7 @@
import org.exoplatform.portal.webui.application.UIPortlet;
import org.exoplatform.portal.webui.container.UIContainer;
import org.exoplatform.portal.webui.util.PortalDataMapper;
+import org.exoplatform.portal.webui.util.Util;
import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.web.application.RequestContext;
import org.exoplatform.webui.application.WebuiRequestContext;
@@ -40,6 +42,8 @@
import org.exoplatform.webui.config.annotation.ParamConfig;
import org.exoplatform.webui.core.UIApplication;
import org.exoplatform.webui.core.UIComponent;
+import org.exoplatform.webui.core.UIPopupMessages;
+import org.exoplatform.webui.core.UIPortletApplication;
import org.exoplatform.webui.core.model.SelectItemOption;
import org.exoplatform.webui.event.Event;
import org.exoplatform.webui.event.EventListener;
@@ -47,6 +51,8 @@
import org.jibx.runtime.IBindingFactory;
import org.jibx.runtime.IUnmarshallingContext;
+import com.sun.mail.imap.protocol.UIDSet;
+
import java.io.ByteArrayInputStream;
import java.util.ArrayList;
import java.util.List;
@@ -148,7 +154,7 @@
uiRoot.getChildren().clear();
// Assemble the dashboard
- PortalDataMapper.toUIContainer(uiRoot, dashboard);
+ PortalDataMapper.toUIContainer(uiRoot, dashboard);
}
//
@@ -478,7 +484,15 @@
DataStorage service = getApplicationComponent(DataStorage.class);
// Save
- service.saveDashboard(dashboard);
+ try
+ {
+ service.saveDashboard(dashboard);
+ }
+ catch (StaleModelException e)
+ {
+ getAncestorOfType(UIPortletApplication.class).addMessage(
+ new ApplicationMessage("UIDashboard.msg.StaleData", null, ApplicationMessage.ERROR));
+ }
}
}
@@ -532,7 +546,11 @@
uiDashboardContainer.moveUIGadget(objectId, col, row);
uiDashboardContainer.save();
- event.getRequestContext().setResponseComplete(true);
+ if (uiDashboard.getAncestorOfType(UIPortletApplication.class).getUIPopupMessages().hasMessage())
+ {
+ return;
+ }
+ Util.getPortalRequestContext().setResponseComplete(true);
}
}
@@ -552,15 +570,18 @@
UIDashboardContainer uiDashboardContainer = uiDashboard.getChild(UIDashboardContainer.class);
uiDashboardContainer.removeUIGadget(objectId);
boolean isMaximized = false;
- if (uiDashboard.getMaximizedGadget() != null && uiDashboard.getMaximizedGadget().getId().equals(objectId))
+ if (uiDashboard.getMaximizedGadget() != null &&
+ uiDashboard.getMaximizedGadget().getId().equals(objectId))
{
uiDashboard.setMaximizedGadget(null);
isMaximized = true;
}
uiDashboardContainer.save();
- if (!isMaximized)
+ UIPopupMessages uiPopupMessages =
+ uiDashboard.getAncestorOfType(UIPortletApplication.class).getUIPopupMessages();
+ if (!isMaximized && !uiPopupMessages.hasMessage())
{
- context.setResponseComplete(true);
+ Util.getPortalRequestContext().setResponseComplete(true);
}
}
}
Modified: portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/core/lifecycle/WebuiBindingContext.java
===================================================================
--- portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/core/lifecycle/WebuiBindingContext.java 2010-10-22 10:27:10 UTC (rev 4765)
+++ portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/core/lifecycle/WebuiBindingContext.java 2010-10-22 11:45:25 UTC (rev 4766)
@@ -89,7 +89,7 @@
public String appRes(String mesgKey) throws Exception
{
- String value;
+ String value = "";
try
{
ResourceBundle res = rcontext_.getApplicationResourceBundle();
@@ -99,7 +99,8 @@
{
if (PropertyManager.isDevelopping())
log.warn("Can not find resource bundle for key : " + mesgKey);
- value = mesgKey.substring(mesgKey.lastIndexOf('.') + 1);
+ if(mesgKey != null)
+ value = mesgKey.substring(mesgKey.lastIndexOf('.') + 1);
}
return value;
}
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java 2010-10-22 10:27:10 UTC (rev 4765)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java 2010-10-22 11:45:25 UTC (rev 4766)
@@ -38,6 +38,7 @@
import org.exoplatform.webui.event.Event;
import org.exoplatform.webui.event.EventListener;
import org.exoplatform.webui.exception.MessageException;
+import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
@@ -88,6 +89,16 @@
public static final String HOME_VIEW = "home";
public static final String CANVAS_VIEW = "canvas";
+
+ public static final String METADATA_GADGETS = "gadgets";
+
+ public static final String METADATA_USERPREFS = "userPrefs";
+
+ public static final String METADATA_USERPREFS_TYPE = "type";
+
+ public static final String METADATA_USERPREFS_TYPE_HIDDEN = "hidden";
+
+ public static final String METADATA_USERPREFS_TYPE_LIST = "list";
public String view = HOME_VIEW;
@@ -205,7 +216,7 @@
String strMetadata = GadgetUtil.fetchGagdetMetadata(getUrl());
metadata_ = new JSONObject(strMetadata);
}
- JSONObject obj = metadata_.getJSONArray("gadgets").getJSONObject(0);
+ JSONObject obj = metadata_.getJSONArray(METADATA_GADGETS).getJSONObject(0);
String token = GadgetUtil.createToken(this.getUrl(), new Random().nextLong());
obj.put("secureToken", token);
return metadata_.toString();
@@ -215,6 +226,39 @@
return null;
}
}
+ /**
+ * Check if content of gadget has <UserPref>? (Content is parsed from gadget specification in .xml file)
+ * @return boolean
+ */
+ public boolean isSettingUserPref()
+ {
+ try
+ {
+ if(metadata_ != null)
+ {
+ JSONObject obj = metadata_.getJSONArray(METADATA_GADGETS).getJSONObject(0);
+ JSONObject userPrefs = obj.getJSONObject(METADATA_USERPREFS);
+ JSONArray names = userPrefs.names();
+ int count = names.length();
+ if(count > 0)
+ {
+ for(int i = 0; i < count; i++)
+ {
+ JSONObject o = (JSONObject) userPrefs.get(names.get(i).toString());
+ if(!(o.get(METADATA_USERPREFS_TYPE).equals(METADATA_USERPREFS_TYPE_HIDDEN) ||
+ o.get(METADATA_USERPREFS_TYPE).equals(METADATA_USERPREFS_TYPE_LIST)))
+ return true;
+ }
+ return false;
+ }
+ }
+ return false;
+ }
+ catch (Exception e)
+ {
+ return false;
+ }
+ }
@Override
public boolean isRendered()
@@ -379,10 +423,13 @@
WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
//
- try{
+ try
+ {
uiGadget.addUserPref(event.getRequestContext().getRequestParameter("userPref"));
- Util.getPortalRequestContext().setFullRender(true);
- } catch(Exception e){
+ Util.getPortalRequestContext().setResponseComplete(true);
+ }
+ catch(Exception e)
+ {
UIPortletApplication uiPortlet = uiGadget.getAncestorOfType(UIPortletApplication.class);
context.addUIComponentToUpdateByAjax(uiPortlet);
throw new MessageException(new ApplicationMessage("UIDashboard.msg.ApplicationNotExisted", null, ApplicationMessage.ERROR));
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletForm.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletForm.java 2010-10-22 10:27:10 UTC (rev 4765)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletForm.java 2010-10-22 11:45:25 UTC (rev 4766)
@@ -402,6 +402,7 @@
}
PortalRequestContext pcontext = (PortalRequestContext)event.getRequestContext();
+ pcontext.getJavascriptManager().addJavascript("eXo.portal.UIPortal.changeComposerSaveButton();");
pcontext.addUIComponentToUpdateByAjax(uiMaskWorkspace);
UIPortalApplication uiPortalApp = uiPortlet.getAncestorOfType(UIPortalApplication.class);
UIWorkingWorkspace uiWorkingWS = uiPortalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/container/UIContainerForm.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/container/UIContainerForm.java 2010-10-22 10:27:10 UTC (rev 4765)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/container/UIContainerForm.java 2010-10-22 11:45:25 UTC (rev 4766)
@@ -143,6 +143,7 @@
UIPortalApplication uiPortalApp = uiForm.getAncestorOfType(UIPortalApplication.class);
UIWorkingWorkspace uiWorkingWS = uiPortalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
+ pcontext.getJavascriptManager().addJavascript("eXo.portal.UIPortal.changeComposerSaveButton();");
pcontext.addUIComponentToUpdateByAjax(uiWorkingWS);
pcontext.setFullRender(true);
Util.showComponentLayoutMode(UIContainer.class);
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageForm.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageForm.java 2010-10-22 10:27:10 UTC (rev 4765)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageForm.java 2010-10-22 11:45:25 UTC (rev 4766)
@@ -280,7 +280,7 @@
PortalRequestContext pcontext = Util.getPortalRequestContext();
UIMaskWorkspace uiMaskWS = uiPortalApp.getChildById(UIPortalApplication.UI_MASK_WS_ID);
uiMaskWS.setUIComponent(null);
- uiMaskWS.setShow(false);
+ uiMaskWS.setShow(false);
pcontext.addUIComponentToUpdateByAjax(uiMaskWS);
UIPage uiPage = uiPageForm.getUIPage();
@@ -318,7 +318,7 @@
pcontext.setFullRender(true);
UIWorkingWorkspace uiWorkingWS = uiPortalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
pcontext.addUIComponentToUpdateByAjax(uiWorkingWS);
-
+ pcontext.getJavascriptManager().addJavascript("eXo.portal.UIPortal.changeComposerSaveButton();");
return;
}
@@ -337,6 +337,7 @@
pcontext.setFullRender(true);
UIWorkingWorkspace uiWorkingWS = uiPortalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
pcontext.addUIComponentToUpdateByAjax(uiWorkingWS);
+ pcontext.getJavascriptManager().addJavascript("eXo.portal.UIPortal.changeComposerSaveButton();");
DataStorage dataService = uiPageForm.getApplicationComponent(DataStorage.class);
dataService.save(page);
return;
@@ -360,6 +361,7 @@
try{
PortalDataMapper.toUIPage(uiPage, page);
+ pcontext.getJavascriptManager().addJavascript("eXo.portal.UIPortal.changeComposerSaveButton();");
} catch(NoSuchDataException de){
uiPortalApp.addMessage(new ApplicationMessage("UIPageForm.msg.notExistOrDeleted", null, ApplicationMessage.ERROR));
UIPortalComposer uiPortalComposer = (UIPortalComposer)uiPortalApp.findComponentById("UIPageEditor");
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageNodeForm.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageNodeForm.java 2010-10-22 10:27:10 UTC (rev 4765)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageNodeForm.java 2010-10-22 11:45:25 UTC (rev 4766)
@@ -186,13 +186,16 @@
public void invokeSetBindingBean(Object bean) throws Exception
{
super.invokeSetBindingBean(bean);
- PageNode node = (PageNode)bean;
- Calendar cal = getUIFormDateTimeInput(START_PUBLICATION_DATE).getCalendar();
- Date date = (cal != null) ? cal.getTime() : null;
- node.setStartPublicationDate(date);
- cal = getUIFormDateTimeInput(END_PUBLICATION_DATE).getCalendar();
- date = (cal != null) ? cal.getTime() : null;
- node.setEndPublicationDate(date);
+ PageNode node = (PageNode) bean;
+ if (node.getVisibility() != Visibility.SYSTEM)
+ {
+ Calendar cal = getUIFormDateTimeInput(START_PUBLICATION_DATE).getCalendar();
+ Date date = (cal != null) ? cal.getTime() : null;
+ node.setStartPublicationDate(date);
+ cal = getUIFormDateTimeInput(END_PUBLICATION_DATE).getCalendar();
+ date = (cal != null) ? cal.getTime() : null;
+ node.setEndPublicationDate(date);
+ }
}
public void setShowCheckPublicationDate(boolean show)
@@ -269,7 +272,11 @@
WebuiRequestContext ctx = event.getRequestContext();
UIPageNodeForm uiPageNodeForm = event.getSource();
UIApplication uiPortalApp = ctx.getUIApplication();
- if (uiPageNodeForm.getUIFormCheckBoxInput(SHOW_PUBLICATION_DATE).isChecked())
+ PageNode pageNode = uiPageNodeForm.getPageNode();
+ if (pageNode == null)
+ pageNode = new PageNode();
+
+ if (pageNode.getVisibility() != Visibility.SYSTEM && uiPageNodeForm.getUIFormCheckBoxInput(SHOW_PUBLICATION_DATE).isChecked())
{
Calendar currentCalendar = Calendar.getInstance();
currentCalendar.set(currentCalendar.get(Calendar.YEAR), currentCalendar.get(Calendar.MONTH), currentCalendar.get(Calendar.DAY_OF_MONTH), 0, 0, 0);
@@ -305,10 +312,7 @@
}
}
-
- PageNode pageNode = uiPageNodeForm.getPageNode();
- if (pageNode == null)
- pageNode = new PageNode();
+
uiPageNodeForm.invokeSetBindingBean(pageNode);
UIPageSelector2 pageSelector = uiPageNodeForm.getChild(UIPageSelector2.class);
if (pageSelector.getPage() == null)
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java 2010-10-22 10:27:10 UTC (rev 4765)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java 2010-10-22 11:45:25 UTC (rev 4766)
@@ -337,7 +337,12 @@
UIMaskWorkspace uiMaskWorkspace = uiForm.getParent();
uiMaskWorkspace.setUIComponent(null);
- event.getRequestContext().addUIComponentToUpdateByAjax(uiMaskWorkspace);
+ WebuiRequestContext rContext = event.getRequestContext();
+ if (!uiForm.getId().equals("CreatePortal"))
+ {
+ rContext.getJavascriptManager().addJavascript("eXo.portal.UIPortal.changeComposerSaveButton();");
+ }
+ rContext.addUIComponentToUpdateByAjax(uiMaskWorkspace);
}
}
14 years, 2 months