gatein SVN: r446 - in portal/trunk/packaging: pkg and 1 other directory.
by do-not-reply@jboss.org
Author: dbaeli
Date: 2009-10-29 21:41:55 -0400 (Thu, 29 Oct 2009)
New Revision: 446
Added:
portal/trunk/packaging/profiles.xml.template
Modified:
portal/trunk/packaging/pkg/pom.xml
portal/trunk/packaging/profiles.xml
Log:
GTNPORTAL- : Packaging, specify a directory to install the server
[jira.jboss.org was not accessible, issue to create and commit log to change]
DESCRIPTION:
* Currently the Tomcat or JBoss installation directory is packaging/pkg/target/<server>
* We need to be able to specify a place to replace this
EXPECTED:
* Use a gatein.working.dir property with ${basedir}/target as default value
* This property can be setup in a profile to define another directory
Modified: portal/trunk/packaging/pkg/pom.xml
===================================================================
--- portal/trunk/packaging/pkg/pom.xml 2009-10-29 20:08:30 UTC (rev 445)
+++ portal/trunk/packaging/pkg/pom.xml 2009-10-30 01:41:55 UTC (rev 446)
@@ -138,6 +138,10 @@
</plugins>
</build>
+ <properties>
+ <gatein.working.dir>${basedir}/target</gatein.working.dir><!-- Default value for server installation dir -->
+ </properties>
+
<profiles>
<profile>
<id>pkg-tomcat</id>
@@ -192,7 +196,7 @@
<argument>-Dexo.current.dir=${basedir}</argument>
<argument>-Dexo.base.dir=${exo.projects.directory.base}</argument>
<argument>-Dexo.conf.dir=${basedir}/target/exopackage-conf</argument>
- <argument>-Dexo.working.dir=${basedir}/target</argument>
+ <argument>-Dexo.working.dir=${gatein.working.dir}/</argument>
<!--argument>-Dexo.src.dir=NONE</argument-->
<argument>-Dexo.dep.dir=${exo.projects.directory.dependencies}</argument><!-- to get the server ref install -->
<argument>-Dexo.m2.repos=file:${settings.localRepository}</argument>
@@ -216,6 +220,7 @@
</execution>
</executions>
</plugin>
+<!--
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
@@ -234,6 +239,7 @@
</execution>
</executions>
</plugin>
+-->
</plugins>
</build>
</profile>
@@ -291,7 +297,7 @@
<argument>-Dexo.current.dir=${basedir}</argument>
<argument>-Dexo.base.dir=${exo.projects.directory.base}</argument>
<argument>-Dexo.conf.dir=${basedir}/target/exopackage-conf</argument>
- <argument>-Dexo.working.dir=${basedir}/target</argument>
+ <argument>-Dexo.working.dir=${gatein.working.dir}</argument>
<!--argument>-Dexo.src.dir=NONE</argument-->
<argument>-Dexo.dep.dir=${exo.projects.directory.dependencies}</argument><!-- to get the server ref install -->
<argument>-Dexo.m2.repos=file:${settings.localRepository},http://maven2.exoplatform.org/rest/maven2,http://repository.jboss.org/maven2</argument>
@@ -315,6 +321,7 @@
</execution>
</executions>
</plugin>
+<!--
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
@@ -333,6 +340,7 @@
</execution>
</executions>
</plugin>
+-->
</plugins>
</build>
</profile>
Modified: portal/trunk/packaging/profiles.xml
===================================================================
--- portal/trunk/packaging/profiles.xml 2009-10-29 20:08:30 UTC (rev 445)
+++ portal/trunk/packaging/profiles.xml 2009-10-30 01:41:55 UTC (rev 446)
@@ -22,18 +22,20 @@
<profilesXml>
<profiles>
<profile>
- <id>exo-projects</id>
+ <id>gatein-projects</id>
<properties>
<!--
Replace with the directory where uncompressed Tomcat 6 and/or JBoss 5.1 can be found
ex: On Windows 'c:/AS'
ex: On Linux '/home/user/AS'
-->
- <exo.projects.directory.dependencies>REPLACE_WITH_YOUR_OWN_DIRECTORY</exo.projects.directory.dependencies>
+ <exo.projects.directory.dependencies>c:/ExoPlatform/src/exo-dependencies</exo.projects.directory.dependencies>
+
+ <gatein.working.dir>c:/ExoPlatform/src/exo-working</gatein.working.dir>
<!--
Replace with the name of the directory containing Tomcat 6
-->
- <exo.projects.app.tomcat.version>apache-tomcat-6.0.20</exo.projects.app.tomcat.version>
+ <exo.projects.app.tomcat.version>tomcat-6.0.20</exo.projects.app.tomcat.version>
<!--
Replace with the name of the directory containing JBoss AS 5.1
-->
@@ -43,6 +45,6 @@
</profiles>
<activeProfiles>
- <activeProfile>exo-projects</activeProfile>
+ <activeProfile>gatein-projects</activeProfile>
</activeProfiles>
</profilesXml>
Added: portal/trunk/packaging/profiles.xml.template
===================================================================
--- portal/trunk/packaging/profiles.xml.template (rev 0)
+++ portal/trunk/packaging/profiles.xml.template 2009-10-30 01:41:55 UTC (rev 446)
@@ -0,0 +1,57 @@
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ 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.
+
+-->
+
+<profilesXml>
+ <profiles>
+ <profile>
+ <id>gatein-projects</id>
+ <properties>
+ <!--
+ Replace with the directory where uncompressed Tomcat 6 and/or JBoss 5.1 can be found
+ ex: On Windows 'c:/AS'
+ ex: On Linux '/home/user/AS'
+ -->
+ <exo.projects.directory.dependencies>REPLACE_WITH_YOUR_OWN_DIRECTORY</exo.projects.directory.dependencies>
+
+ <!--
+ If you want that the server is deployed always at the same place (not in packaging/pkg/target/<server> dir)
+ Uncomment and Replace with the directory you prefer
+ -->
+ <!--
+ <gatein.working.dir>REPLACE_WITH_SERVER_DIR</gatein.working.dir>
+ -->
+
+ <!--
+ Replace with the name of the directory containing Tomcat 6
+ -->
+ <exo.projects.app.tomcat.version>apache-tomcat-6.0.20</exo.projects.app.tomcat.version>
+ <!--
+ Replace with the name of the directory containing JBoss AS 5.1
+ -->
+ <exo.projects.app.jboss.version>jboss-5.1.0.GA</exo.projects.app.jboss.version>
+ </properties>
+ </profile>
+ </profiles>
+
+ <activeProfiles>
+ <activeProfile>gatein-projects</activeProfile>
+ </activeProfiles>
+</profilesXml>
15 years, 1 month
gatein SVN: r445 - portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application.
by do-not-reply@jboss.org
Author: mwringe
Date: 2009-10-29 16:08:30 -0400 (Thu, 29 Oct 2009)
New Revision: 445
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java
Log:
Update fix for public render parameters for GTNPORTAL-118.
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java 2009-10-29 19:44:27 UTC (rev 444)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java 2009-10-29 20:08:30 UTC (rev 445)
@@ -140,7 +140,7 @@
// set the public params
HttpServletRequest request = prcontext.getRequest();
- setupPublicRenderParams(uiPortlet, request.getParameterMap());
+ setupPublicRenderParams(uiPortlet, navStateResponse.getPublicNavigationalStateUpdates());
/*
* Cache the render parameters in the UI portlet component to handle the
15 years, 1 month
gatein SVN: r444 - portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/application.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2009-10-29 15:44:27 -0400 (Thu, 29 Oct 2009)
New Revision: 444
Modified:
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletForm.java
Log:
- Fixed editing the portlet in the page editing mode that wasn't working in the WSRP case.
Modified: portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletForm.java
===================================================================
--- portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletForm.java 2009-10-29 18:14:44 UTC (rev 443)
+++ portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletForm.java 2009-10-29 19:44:27 UTC (rev 444)
@@ -24,6 +24,8 @@
import org.exoplatform.portal.pc.ExoPortletState;
import org.exoplatform.portal.pom.spi.portlet.Preference;
import org.exoplatform.portal.pom.spi.portlet.Preferences;
+import org.exoplatform.portal.pom.spi.wsrp.WSRP;
+import org.exoplatform.portal.pom.spi.wsrp.WSRPPortletStateType;
import org.exoplatform.portal.portlet.PortletExceptionHandleService;
import org.exoplatform.portal.skin.SkinService;
import org.exoplatform.portal.webui.util.Util;
@@ -63,6 +65,8 @@
import org.gatein.pc.api.invocation.response.ErrorResponse;
import org.gatein.pc.api.invocation.response.FragmentResponse;
import org.gatein.pc.api.invocation.response.PortletInvocationResponse;
+import org.gatein.pc.api.spi.InstanceContext;
+import org.gatein.pc.api.state.AccessMode;
import org.gatein.pc.api.state.PropertyChange;
import org.gatein.pc.portlet.impl.spi.AbstractClientContext;
import org.gatein.pc.portlet.impl.spi.AbstractPortalContext;
@@ -74,6 +78,7 @@
import javax.portlet.PortletMode;
import javax.servlet.http.Cookie;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.ResourceBundle;
@@ -163,21 +168,36 @@
{
PortalRequestContext prcontext = (PortalRequestContext)WebuiRequestContext.getCurrentInstance();
prcontext.setFullRender(true);
- PortletInvoker portletInvoker = getApplicationComponent(PortletInvoker.class);
- StatefulPortletContext<ExoPortletState> portletContext = uiPortlet_.getPortletContext();
+ StatefulPortletContext portletContext = uiPortlet_.getPortletContext();
ExoPortletInvocationContext portletInvocationContext = new ExoPortletInvocationContext(prcontext, uiPortlet_);
- List<Cookie> requestCookies = new ArrayList<Cookie>();
- for (Cookie cookie : prcontext.getRequest().getCookies())
- {
- requestCookies.add(cookie);
- }
+ List<Cookie> requestCookies = new ArrayList<Cookie>(Arrays.asList(prcontext.getRequest().getCookies()));
RenderInvocation renderInvocation = new RenderInvocation(portletInvocationContext);
renderInvocation.setClientContext(new AbstractClientContext(prcontext.getRequest(), requestCookies));
renderInvocation.setServerContext(new AbstractServerContext(prcontext.getRequest(), prcontext.getResponse()));
- renderInvocation.setInstanceContext(new ExoPortletInstanceContext(portletContext.getState().getPortletId()));
+
+
+ // instance context
+ InstanceContext instanceContext;
+ if (portletContext.getType() instanceof WSRPPortletStateType)
+ {
+ WSRP wsrp = (WSRP)portletContext.getState();
+ AccessMode accessMode = AccessMode.CLONE_BEFORE_WRITE;
+ if (wsrp.isCloned())
+ {
+ accessMode = AccessMode.READ_WRITE;
+ }
+ instanceContext = new ExoPortletInstanceContext(wsrp.getPortletId(), accessMode);
+ }
+ else
+ {
+ ExoPortletState exo = (ExoPortletState)portletContext.getState();
+ instanceContext = new ExoPortletInstanceContext(exo.getPortletId());
+ }
+ renderInvocation.setInstanceContext(instanceContext);
+
renderInvocation.setUserContext(new AbstractUserContext(prcontext.getRequest()));
renderInvocation.setWindowContext(new AbstractWindowContext(uiPortlet_.getWindowId()));
renderInvocation.setPortalContext(new AbstractPortalContext(Collections.singletonMap(
15 years, 1 month
gatein SVN: r443 - in portal/branches/wsrp-integration: component/dashboard/src/main/resources/groovy/dashboard/webui/component and 25 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2009-10-29 14:14:44 -0400 (Thu, 29 Oct 2009)
New Revision: 443
Removed:
portal/branches/wsrp-integration/component/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIDashboardMask.java
portal/branches/wsrp-integration/component/dashboard/src/main/resources/groovy/dashboard/webui/component/UIDashboardMask.gtmpl
portal/branches/wsrp-integration/packaging/key.txt
Modified:
portal/branches/wsrp-integration/component/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIDashboard.java
portal/branches/wsrp-integration/component/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIDashboardContainer.java
portal/branches/wsrp-integration/component/dashboard/src/main/resources/groovy/dashboard/webui/component/UIDashboard.gtmpl
portal/branches/wsrp-integration/component/dashboard/src/main/resources/groovy/dashboard/webui/component/UIDashboardContainer.gtmpl
portal/branches/wsrp-integration/component/portal/src/main/java/org/exoplatform/portal/config/UserACL.java
portal/branches/wsrp-integration/gadgets/eXoGadgets/src/main/webapp/gadgets/Calculator/Calculator.xml
portal/branches/wsrp-integration/portlet/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIDashboardPortlet.java
portal/branches/wsrp-integration/portlet/dashboard/src/main/webapp/groovy/dashboard/webui/component/UIDashboardPortlet.gtmpl
portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIAddApplicationForm.java
portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIApplicationOrganizer.java
portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UICategoryForm.java
portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UIGroupNavigationManagement.java
portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UISiteManagement.java
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/WEB-INF/portlet.xml
portal/branches/wsrp-integration/portlet/web/src/main/java/org/exoplatform/portal/webui/component/UILogoEditMode.java
portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/javascript/eXo/core/Browser.js
portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/javascript/eXo/core/DragDrop.js
portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/javascript/eXo/core/UIMaskLayer.js
portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/javascript/eXo/gadget/UIGadget.js
portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalDragDrop.js
portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/javascript/eXo/webui/UICalendar.js
portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/javascript/eXo/webui/UITabbedDashboard.js
portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIDashboard/Stylesheet.css
portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIPopup/UIPopupWindow/Stylesheet.css
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/conf/portal/application-registry-configuration.xml
portal/branches/wsrp-integration/web/portal/src/main/webapp/groovy/webui/core/UIPopupWindow.gtmpl
portal/branches/wsrp-integration/webui/core/src/main/java/org/exoplatform/webui/core/lifecycle/UIFormLifecycle.java
portal/branches/wsrp-integration/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIListPermissionSelector.java
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/application/PortalStateManager.java
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortlet.java
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationNodeSelector.java
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageActionListener.java
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageCreationWizard.java
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageWizard.java
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMaskWorkspace.java
Log:
- Merged changes from revision 386 to 440 of trunk.
- "Fixed" public navigational state handling. This needs to be better investigated and tested.
Modified: portal/branches/wsrp-integration/component/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIDashboard.java
===================================================================
--- portal/branches/wsrp-integration/component/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIDashboard.java 2009-10-29 17:39:04 UTC (rev 442)
+++ portal/branches/wsrp-integration/component/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIDashboard.java 2009-10-29 18:14:44 UTC (rev 443)
@@ -1,16 +1,16 @@
/**
* Copyright (C) 2009 eXo Platform SAS.
- *
+ *
* 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
@@ -19,6 +19,8 @@
package org.exoplatform.dashboard.webui.component;
+import org.exoplatform.portal.webui.application.UIGadget;
+import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.webui.application.portlet.PortletRequestContext;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.ComponentConfigs;
@@ -32,7 +34,9 @@
@EventConfig(listeners = UIDashboardContainer.MoveGadgetActionListener.class),
@EventConfig(listeners = UIDashboardContainer.AddNewGadgetActionListener.class),
@EventConfig(listeners = UIDashboard.SetShowSelectContainerActionListener.class),
- @EventConfig(listeners = UIDashboardContainer.DeleteGadgetActionListener.class)})})
+ @EventConfig(listeners = UIDashboardContainer.DeleteGadgetActionListener.class),
+ @EventConfig(listeners = UIDashboard.MinimizeGadgetActionListener.class),
+ @EventConfig(listeners = UIDashboard.MaximizeGadgetActionListener.class)})})
public class UIDashboard extends UIContainer
{
@@ -42,6 +46,8 @@
private String aggregatorId;
+ private UIGadget maximizedGadget;
+
public UIDashboard() throws Exception
{
UIPopupWindow popup = addChild(UIPopupWindow.class, null, GADGET_POPUP_ID);
@@ -86,14 +92,25 @@
this.aggregatorId = aggregatorId;
}
- public static class SetShowSelectContainerActionListener extends
- EventListener<org.exoplatform.webui.core.UIContainer>
+ public UIGadget getMaximizedGadget()
{
- public final void execute(final Event<org.exoplatform.webui.core.UIContainer> event) throws Exception
+ return maximizedGadget;
+ }
+
+ public void setMaximizedGadget(UIGadget gadget)
+ {
+ maximizedGadget = gadget;
+ }
+
+ public static class SetShowSelectContainerActionListener extends EventListener<UIDashboard>
+ {
+ public final void execute(final Event<UIDashboard> event) throws Exception
{
UIDashboard uiDashboard = (UIDashboard)event.getSource();
if (!uiDashboard.canEdit())
+ {
return;
+ }
PortletRequestContext pcontext = (PortletRequestContext)event.getRequestContext();
boolean isShow = Boolean.parseBoolean(pcontext.getRequestParameter("isShow"));
uiDashboard.setShowSelectPopup(isShow);
@@ -106,4 +123,43 @@
}
}
}
+
+ public static class MinimizeGadgetActionListener extends EventListener<UIDashboard>
+ {
+ public final void execute(final Event<UIDashboard> event) throws Exception
+ {
+ WebuiRequestContext context = event.getRequestContext();
+ UIDashboard uiDashboard = event.getSource();
+ String objectId = context.getRequestParameter(OBJECTID);
+ String minimized = context.getRequestParameter("minimized");
+
+ UIGadget uiGadget = uiDashboard.getChild(UIDashboardContainer.class).getUIGadget(objectId);
+ uiGadget.getProperties().setProperty("minimized", minimized);
+ uiDashboard.getChild(UIDashboardContainer.class).save();
+ context.addUIComponentToUpdateByAjax(uiGadget);
+ }
+ }
+
+ public static class MaximizeGadgetActionListener extends EventListener<UIDashboard>
+ {
+ public final void execute(final Event<UIDashboard> event) throws Exception
+ {
+ WebuiRequestContext context = event.getRequestContext();
+ UIDashboard uiDashboard = event.getSource();
+ String objectId = context.getRequestParameter(OBJECTID);
+ String maximize = context.getRequestParameter("maximize");
+ UIDashboardContainer uiDashboardCont = uiDashboard.getChild(UIDashboardContainer.class);
+ UIGadget uiGadget = uiDashboardCont.getUIGadget(objectId);
+ if (maximize.equals("maximize"))
+ {
+ uiGadget.setView(UIGadget.CANVAS_VIEW);
+ uiDashboard.setMaximizedGadget(uiGadget);
+ }
+ else
+ {
+ uiGadget.setView(UIGadget.HOME_VIEW);
+ uiDashboard.setMaximizedGadget(null);
+ }
+ }
+ }
}
Modified: portal/branches/wsrp-integration/component/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIDashboardContainer.java
===================================================================
--- portal/branches/wsrp-integration/component/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIDashboardContainer.java 2009-10-29 17:39:04 UTC (rev 442)
+++ portal/branches/wsrp-integration/component/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIDashboardContainer.java 2009-10-29 18:14:44 UTC (rev 443)
@@ -1,16 +1,16 @@
/**
* Copyright (C) 2009 eXo Platform SAS.
- *
+ *
* 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
@@ -30,6 +30,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.web.application.RequestContext;
import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.webui.application.portlet.PortletRequestContext;
import org.exoplatform.webui.config.InitParams;
@@ -52,42 +53,32 @@
public class UIDashboardContainer extends org.exoplatform.webui.core.UIContainer
{
- /**
- * Specify max number of columns in dashboard container
- * Default value is 4
- */
+ /** Specify max number of columns in dashboard container Default value is 4 */
public static final int MAX_COLUMN = 4;
- /**
- * Column Type of Container
- */
+ /** Column Type of Container */
public static final String COLUMN_CONTAINER = "column";
- /**
- * Row Type of Container
- */
+ /** Row Type of Container */
public static final String ROW_CONTAINER = "row";
- /**
- * Root Type of Container
- */
+ /** Root Type of Container */
public static final String ROOT_CONTAINER = "dashboard";
/**
- *
+ *
*/
private List<SelectItemOption<String>> containerOptions;
/**
- * Specify windowId of <code>UIPortlet</code> that contains <code>UIDashboardPortlet</code> which this belong to
+ * Specify windowId of <code>UIPortlet</code> that contains <code>UIDashboardPortlet</code> which this belong to
+ *
* @see UIPortlet
* @see org.exoplatform.dashboard.webui.component.DashboardParent
*/
private String windowId;
- /**
- * Preconfig template
- */
+ /** Preconfig template */
private String containerTemplate = null;
public static final String COLINDEX = "colIndex";
@@ -96,6 +87,7 @@
/**
* Constructs new UIDashboardContainer which belongs to a UIDashboardPortlet
+ *
* @param initParams initial parameters
* @throws Exception if can't create UIDashboardContainer
* @see org.exoplatform.dashboard.webui.component.DashboardParent
@@ -107,7 +99,7 @@
{
return;
}
- WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
+ WebuiRequestContext context = RequestContext.getCurrentInstance();
windowId = ((PortletRequestContext)context).getRequest().getWindowID();
Param param = initParams.getParam("ContainerConfigs");
@@ -120,6 +112,7 @@
addChild(UIContainer.class, null, null);
}
+ @Override
public void processRender(WebuiRequestContext context) throws Exception
{
DataStorage service = getApplicationComponent(DataStorage.class);
@@ -134,7 +127,9 @@
dashboard = service.execute(new DashboardTask.Load(currentUIPortlet.getStorageId())).getDashboard();
}
else
+ {
dashboard = createContainer(COLUMN_CONTAINER, null);
+ }
//
UIContainer uiRoot = getChild(UIContainer.class);
@@ -151,9 +146,10 @@
/**
* Adds an UIGadget into UIDashboardContainer in specified position
- * @param gadget UIGadget to add in UIDashboardContainer
- * @param col index of column to add
- * @param row index of row to add
+ *
+ * @param gadget UIGadget to add in UIDashboardContainer
+ * @param col index of column to add
+ * @param row index of row to add
* @return <code>UIGadget</code> object which added in
* @see UIGadget
*/
@@ -171,10 +167,10 @@
/**
* Gets an UIGadget at specified position
+ *
* @param col index of column
* @param row index of row
- * @return <code>null</code> if specified position doesn't exist
- * <code>UIGadget</code> otherwise
+ * @return <code>null</code> if specified position doesn't exist <code>UIGadget</code> otherwise
* @see UIGadget
*/
public UIGadget getUIGadget(final int col, final int row)
@@ -189,9 +185,9 @@
/**
* Gets an UIGadget which has applicationInstanceUniqueId_ according to specified Id
- * @param gadgetId applicationInstanceUniqueId_ of UIGadget
- * @return <code>null</code> if UIGadget doesn't exist<br>
- * <code>UIGadget<code> otherwise
+ *
+ * @param gadgetId applicationInstanceUniqueId_ of UIGadget
+ * @return <code>null</code> if UIGadget doesn't exist<br> <code>UIGadget<code> otherwise
* @see UIGadget
*/
public UIGadget getUIGadget(final String gadgetId)
@@ -212,10 +208,10 @@
}
/**
- * Removes an UIGadget belongs to this which has specified applicationInstanceUniqueId_
+ * Removes an UIGadget belongs to this which has specified applicationInstanceUniqueId_
+ *
* @param gadgetId applicationInstanceUniqueId_ of UIGadget
- * @return <code>UIGadget</code> which deleted<br>
- * <code>null</code> otherwise
+ * @return <code>UIGadget</code> which deleted<br> <code>null</code> otherwise
* @see UIGadget
*/
public UIGadget removeUIGadget(final String gadgetId)
@@ -232,10 +228,10 @@
/**
* Removes an UIGadget at specified position
+ *
* @param col index of the column
* @param row index of the row
- * @return <code>UIGadget</code> which deleted<br>
- * <code>null</code> otherwise
+ * @return <code>UIGadget</code> which deleted<br> <code>null</code> otherwise
* @see UIGadget
*/
public UIGadget removeUIGadget(final int col, final int row)
@@ -250,9 +246,10 @@
/**
* Moves an UIGadget which has specified applicationInstanceUniqueId_ to specified position
+ *
* @param gadgetId applicationInstanceUniqueId_ of UIGadget
- * @param col index of destination column
- * @param row index of destination row
+ * @param col index of destination column
+ * @param row index of destination row
* @see UIGadget
*/
public void moveUIGadget(final String gadgetId, final int col, final int row)
@@ -266,10 +263,10 @@
}
/**
- * Gets an UIContainer representation of a column at specified index
+ * Gets an UIContainer representation of a column at specified index
+ *
* @param col index of column
- * @return <code>UIContainer</code> if the column exist<br>
- * <code>null</code> otherwise
+ * @return <code>UIContainer</code> if the column exist<br> <code>null</code> otherwise
* @see UIContainer
*/
public UIContainer getColumn(final int col)
@@ -283,25 +280,22 @@
/**
* Tests if this UIDashboardContainer has UIGadget
- * @return <code>false</code> if and only if this UIDashboardContainer has no UIGadget<br>
- * <code>true</code> otherwise
+ *
+ * @return <code>false</code> if and only if this UIDashboardContainer has no UIGadget<br> <code>true</code>
+ * otherwise
*/
public boolean hasUIGadget()
{
- boolean flag = false;
UIGadget gadget = findFirstComponentOfType(UIGadget.class);
- if (gadget != null)
- {
- flag = true;
- }
- return flag;
+ return (gadget != null);
}
/**
* Sets total of columns of this UIDashboardContainer, total of columns is between 1 and <tt>MAX_COLUMN</tt>
+ *
* @param num total of columns
- * @return <code>null</code> if totals of columns is less than 1 or greater than <tt>MAX_COLUMN</tt>
- * this <code>UIDashboardContainer</code> otherwise
+ * @return <code>null</code> if totals of columns is less than 1 or greater than <tt>MAX_COLUMN</tt> this
+ * <code>UIDashboardContainer</code> otherwise
* @throws Exception if this UIDashboardContainer can not create new UIComponent
*/
public UIDashboardContainer setColumns(final int num) throws Exception
@@ -352,6 +346,7 @@
/**
* Returns a <tt>List</tt> of the UIContainers of this UIDashboardContainer which representation of list of columns.
+ *
* @return <code>List</code> of UIContainer
* @see List
* @see UIContainer
@@ -370,10 +365,10 @@
/**
* Creates a Container that representation of row or column in this UIDashboardContainer
+ *
* @param type type of Container, that is <tt>ROW_CONTAINER</tt> or <tt>COLUMN_CONTAINER</tt>
- * @param id id of Container
- * @return <code>Container</code> if {@link UIDashboardContainer} has specified type
- * <br><code>null</code> otherwise
+ * @param id id of Container
+ * @return <code>Container</code> if {@link UIDashboardContainer} has specified type <br><code>null</code> otherwise
* @throws Exception if <code>toContainer(String)</code> method throws an Exception
* @see Container
* @see UIDashboardContainer#toContainer(String)
@@ -386,7 +381,9 @@
{
Container container = toContainer(item.getValue());
if (id != null)
+ {
container.setId(id);
+ }
return container;
}
}
@@ -394,10 +391,11 @@
}
/**
- * Creates a Container from a xml template
+ * Creates a Container from a xml template
+ *
* @param xml template of Container
- * @return <code>null</code> if template is not suitable for {@link Container}<br />
- * <code>Container</code> otherwise
+ * @return <code>null</code> if template is not suitable for {@link Container}<br /> <code>Container</code>
+ * otherwise
* @throws Exception if have problems in unmarshal process
* @see IUnmarshallingContext#unmarshalDocument(java.io.InputStream, String)
*/
@@ -411,6 +409,7 @@
/**
* Get windowId of <code>UIPortlet</code>
+ *
* @return a String represents windowId of portlet
* @see UIPortlet
*/
@@ -420,7 +419,7 @@
}
/**
- *
+ *
*/
public void setContainerTemplate(String template)
{
@@ -428,7 +427,7 @@
}
/**
- *
+ *
*/
public String getContainerTemplate()
{
@@ -436,7 +435,8 @@
}
/**
- * Saves all <tt>UIComponent</tt> of this <tt>UIDashboardContainer</tt> to database
+ * Saves all <tt>UIComponent</tt> of this <tt>UIDashboardContainer</tt> to database
+ *
* @throws Exception
*/
public void save() throws Exception
@@ -444,7 +444,9 @@
UIContainer uiRoot = findFirstComponentOfType(UIContainer.class);
if (!((UIDashboard)getParent()).canEdit())
+ {
return;
+ }
//
DataStorage service = getApplicationComponent(DataStorage.class);
@@ -462,14 +464,17 @@
service.execute(new DashboardTask.Save(dashboard));
}
- public static class AddNewGadgetActionListener extends EventListener<org.exoplatform.webui.core.UIContainer>
+ public static class AddNewGadgetActionListener extends EventListener<UIDashboard>
{
- public final void execute(final Event<org.exoplatform.webui.core.UIContainer> event) throws Exception
+ @Override
+ public final void execute(final Event<UIDashboard> event) throws Exception
{
WebuiRequestContext context = event.getRequestContext();
- org.exoplatform.webui.core.UIContainer uiDashboard = event.getSource();
- if (!((UIDashboard)uiDashboard).canEdit())
+ UIDashboard uiDashboard = event.getSource();
+ if (!uiDashboard.canEdit())
+ {
return;
+ }
int col = Integer.parseInt(context.getRequestParameter(COLINDEX));
int row = Integer.parseInt(context.getRequestParameter(ROWINDEX));
String objectId = context.getRequestParameter(UIComponent.OBJECTID);
@@ -489,14 +494,17 @@
}
}
- public static class MoveGadgetActionListener extends EventListener<org.exoplatform.webui.core.UIContainer>
+ public static class MoveGadgetActionListener extends EventListener<UIDashboard>
{
- public final void execute(final Event<org.exoplatform.webui.core.UIContainer> event) throws Exception
+ @Override
+ public final void execute(final Event<UIDashboard> event) throws Exception
{
WebuiRequestContext context = event.getRequestContext();
- org.exoplatform.webui.core.UIContainer uiDashboard = event.getSource();
- if (!((UIDashboard)uiDashboard).canEdit())
+ UIDashboard uiDashboard = event.getSource();
+ if (!uiDashboard.canEdit())
+ {
return;
+ }
UIDashboardContainer uiDashboardContainer = uiDashboard.getChild(UIDashboardContainer.class);
int col = Integer.parseInt(context.getRequestParameter(COLINDEX));
int row = Integer.parseInt(context.getRequestParameter(ROWINDEX));
@@ -508,21 +516,32 @@
}
}
- public static class DeleteGadgetActionListener extends EventListener<org.exoplatform.webui.core.UIContainer>
+ public static class DeleteGadgetActionListener extends EventListener<UIDashboard>
{
- public final void execute(final Event<org.exoplatform.webui.core.UIContainer> event) throws Exception
+ @Override
+ public final void execute(final Event<UIDashboard> event) throws Exception
{
- WebuiRequestContext context = event.getRequestContext();
- org.exoplatform.webui.core.UIContainer uiDashboard = event.getSource();
- if (!((UIDashboard)uiDashboard).canEdit())
+ UIDashboard uiDashboard = event.getSource();
+ if (!uiDashboard.canEdit())
+ {
return;
+ }
+ WebuiRequestContext context = event.getRequestContext();
String objectId = context.getRequestParameter(OBJECTID);
UIDashboardContainer uiDashboardContainer = uiDashboard.getChild(UIDashboardContainer.class);
uiDashboardContainer.removeUIGadget(objectId);
+ boolean isMaximized = false;
+ if (uiDashboard.getMaximizedGadget() != null && uiDashboard.getMaximizedGadget().getId().equals(objectId))
+ {
+ uiDashboard.setMaximizedGadget(null);
+ isMaximized = true;
+ }
uiDashboardContainer.save();
-// context.addUIComponentToUpdateByAjax(uiDashboardContainer);
- context.setResponseComplete(true);
+ if (!isMaximized)
+ {
+ context.setResponseComplete(true);
+ }
}
}
Deleted: portal/branches/wsrp-integration/component/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIDashboardMask.java
===================================================================
--- portal/branches/wsrp-integration/component/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIDashboardMask.java 2009-10-29 17:39:04 UTC (rev 442)
+++ portal/branches/wsrp-integration/component/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIDashboardMask.java 2009-10-29 18:14:44 UTC (rev 443)
@@ -1,32 +0,0 @@
-/**
- * Copyright (C) 2009 eXo Platform SAS.
- *
- * 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.exoplatform.dashboard.webui.component;
-
-import org.exoplatform.webui.config.annotation.ComponentConfig;
-import org.exoplatform.webui.core.UIComponentDecorator;
-
-@ComponentConfig(template = "classpath:groovy/dashboard/webui/component/UIDashboardMask.gtmpl")
-public class UIDashboardMask extends UIComponentDecorator
-{
-
- public UIDashboardMask() throws Exception
- {
- }
-}
Modified: portal/branches/wsrp-integration/component/dashboard/src/main/resources/groovy/dashboard/webui/component/UIDashboard.gtmpl
===================================================================
--- portal/branches/wsrp-integration/component/dashboard/src/main/resources/groovy/dashboard/webui/component/UIDashboard.gtmpl 2009-10-29 17:39:04 UTC (rev 442)
+++ portal/branches/wsrp-integration/component/dashboard/src/main/resources/groovy/dashboard/webui/component/UIDashboard.gtmpl 2009-10-29 18:14:44 UTC (rev 443)
@@ -1,6 +1,13 @@
+<% def maxiGadget = uicomponent.getMaximizedGadget(); %>
<div id="$uicomponent.id" class="UIDashboard">
- <div class="DashboardContainer">
- <% uicomponent.renderChildren(); %>
- <div class="ClearLeft"><span></span></div>
+ <div class="DashboardContainer <%=maxiGadget == null ? "" : "Maximized"%>">
+ <%
+ if(maxiGadget == null) {
+ uicomponent.renderChildren();
+ %>
+ <div class="ClearLeft"><span></span></div>
+ <%} else {
+ uicomponent.renderUIComponent(maxiGadget);
+ }%>
</div>
</div>
Modified: portal/branches/wsrp-integration/component/dashboard/src/main/resources/groovy/dashboard/webui/component/UIDashboardContainer.gtmpl
===================================================================
--- portal/branches/wsrp-integration/component/dashboard/src/main/resources/groovy/dashboard/webui/component/UIDashboardContainer.gtmpl 2009-10-29 17:39:04 UTC (rev 442)
+++ portal/branches/wsrp-integration/component/dashboard/src/main/resources/groovy/dashboard/webui/component/UIDashboardContainer.gtmpl 2009-10-29 18:14:44 UTC (rev 443)
@@ -26,15 +26,8 @@
</div>
</div>
</div>
- <%
- }
- if (uicomponent.findFirstComponentOfType(UIGadget.class) == null) {
- %>
- <div class="NoGadget"><%= _ctx.appRes("UIDashboard.msg.addGadget"); %></div>
- <%
- }
- uicomponent.renderChildren() ;
- %>
-
+ <%}%>
+ <div class="NoGadget" style="display: <%=uicomponent.hasUIGadget() ? "none" : "block"%>"><%= _ctx.appRes("UIDashboard.msg.addGadget"); %></div>
+ <% uicomponent.renderChildren() ;%>
</div>
</div>
Deleted: portal/branches/wsrp-integration/component/dashboard/src/main/resources/groovy/dashboard/webui/component/UIDashboardMask.gtmpl
===================================================================
--- portal/branches/wsrp-integration/component/dashboard/src/main/resources/groovy/dashboard/webui/component/UIDashboardMask.gtmpl 2009-10-29 17:39:04 UTC (rev 442)
+++ portal/branches/wsrp-integration/component/dashboard/src/main/resources/groovy/dashboard/webui/component/UIDashboardMask.gtmpl 2009-10-29 18:14:44 UTC (rev 443)
@@ -1,3 +0,0 @@
-<div id="$uicomponent.id" class="UIDashboardMask">
- <%uicomponent.renderChildren();%>
-</div>
\ No newline at end of file
Modified: portal/branches/wsrp-integration/component/portal/src/main/java/org/exoplatform/portal/config/UserACL.java
===================================================================
--- portal/branches/wsrp-integration/component/portal/src/main/java/org/exoplatform/portal/config/UserACL.java 2009-10-29 17:39:04 UTC (rev 442)
+++ portal/branches/wsrp-integration/component/portal/src/main/java/org/exoplatform/portal/config/UserACL.java 2009-10-29 18:14:44 UTC (rev 443)
@@ -1,16 +1,16 @@
/**
* Copyright (C) 2009 eXo Platform SAS.
- *
+ *
* 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
@@ -37,9 +37,7 @@
import java.util.Iterator;
import java.util.List;
-/**
- * Jun 27, 2006
- */
+/** Jun 27, 2006 */
public class UserACL
{
public final static String EVERYONE = "Everyone";
@@ -74,31 +72,47 @@
UserACLMetaData md = new UserACLMetaData();
ValueParam superUserParam = params.getValueParam("super.user");
if (superUserParam != null)
+ {
md.setSuperUser(superUserParam.getValue());
+ }
ValueParam guestGroupParam = params.getValueParam("guests.group");
if (guestGroupParam != null)
+ {
md.setGuestsGroups(guestGroupParam.getValue());
+ }
ValueParam navCretorParam = params.getValueParam("navigation.creator.membership.type");
if (navCretorParam != null)
+ {
md.setNavigationCreatorMembershipType(navCretorParam.getValue());
+ }
ValueParam portalCretorGroupsParam = params.getValueParam("portal.creator.groups");
if (portalCretorGroupsParam != null)
+ {
md.setPortalCreateGroups(portalCretorGroupsParam.getValue());
+ }
ValuesParam mandatoryGroupsParam = params.getValuesParam("mandatory.groups");
if (mandatoryGroupsParam != null)
+ {
mandatoryGroups_ = mandatoryGroupsParam.getValues();
+ }
else
+ {
mandatoryGroups_ = new ArrayList<String>();
+ }
// tam.nguyen get admin group value
ValueParam adminGroupsParam = params.getValueParam("portal.administrator.groups");
if (adminGroupsParam != null)
+ {
setAdminGroups(adminGroupsParam.getValue());
+ }
// tam.nguyen get administrator member type
ValueParam adminMSTypeParam = params.getValueParam("portal.administrator.mstype");
if (adminMSTypeParam != null)
+ {
setAdminMSType(adminMSTypeParam.getValue());
+ }
init(md);
}
@@ -115,23 +129,37 @@
private void init(UserACLMetaData md)
{
if (md.getSuperUser() != null)
+ {
superUser_ = md.getSuperUser();
+ }
if (superUser_ == null || superUser_.trim().length() == 0)
+ {
superUser_ = "root";
+ }
if (md.getGuestsGroups() != null)
+ {
guestGroup_ = md.getGuestsGroups();
+ }
if (guestGroup_ == null || guestGroup_.trim().length() < 1)
+ {
guestGroup_ = "/platform/guests";
+ }
if (md.getNavigationCreatorMembershipType() != null)
+ {
navigationCreatorMembershipType_ = md.getNavigationCreatorMembershipType();
+ }
if (navigationCreatorMembershipType_ == null || navigationCreatorMembershipType_.trim().length() == 0)
+ {
navigationCreatorMembershipType_ = "owner";
+ }
String allGroups = "";
if (md.getPortalCreateGroups() != null)
+ {
allGroups = md.getPortalCreateGroups();
+ }
portalCreatorGroups_ = defragmentPermission(allGroups);
}
@@ -203,7 +231,9 @@
ConversationState conv = ConversationState.getCurrent();
Identity id = null;
if (conv != null)
+ {
id = conv.getIdentity();
+ }
if (id == null)
{
@@ -257,7 +287,9 @@
ConversationState conv = ConversationState.getCurrent();
Identity id = null;
if (conv != null)
+ {
id = conv.getIdentity();
+ }
if (id == null)
{
@@ -269,7 +301,9 @@
while (iter.hasNext())
{
if (iter.next().equals(group))
+ {
return true;
+ }
}
return false;
@@ -291,7 +325,9 @@
for (String per : accessPerms)
{
if (hasPermission(identity, per))
+ {
return true;
+ }
}
return false;
}
@@ -299,20 +335,28 @@
private boolean hasEditPermission(Identity identity, PortalConfig pconfig)
{
if (superUser_.equals(identity.getUserId()))
+ {
return true;
+ }
return hasPermission(identity, pconfig.getEditPermission());
}
private boolean hasCreatePortalPermission(Identity identity)
{
if (superUser_.equals(identity.getUserId()))
+ {
return true;
+ }
if (portalCreatorGroups_ == null || portalCreatorGroups_.size() < 1)
+ {
return false;
+ }
for (String ele : portalCreatorGroups_)
{
if (hasPermission(identity, ele))
+ {
return true;
+ }
}
return false;
}
@@ -338,7 +382,9 @@
expAdminGroup = expAdminGroup.startsWith("/") ? expAdminGroup : "/" + expAdminGroup;
expPerm = temp.startsWith("/") ? temp : "/" + temp;
if (isUserInGroup(expPerm) && isUserInGroup(expAdminGroup))
+ {
return true;
+ }
}
expPerm = navigationCreatorMembershipType_ + (temp.startsWith("/") ? ":" + temp : ":/" + temp);
@@ -373,10 +419,15 @@
}
page.setModifiable(false);
String[] accessPerms = page.getAccessPermissions();
- for (String per : accessPerms)
+ if (accessPerms != null)
{
- if (hasPermission(identity, per))
- return true;
+ for (String per : accessPerms)
+ {
+ if (hasPermission(identity, per))
+ {
+ return true;
+ }
+ }
}
return false;
}
@@ -422,16 +473,24 @@
{
String currentUser = identity.getUserId();
if (superUser_.equals(currentUser))
+ {
return true;
+ }
if (expPerm == null)
+ {
return false;
+ }
if (EVERYONE.equals(expPerm))
+ {
return true;
+ }
Permission permission = new Permission();
permission.setPermissionExpression(expPerm);
String groupId = permission.getGroupId();
if (currentUser == null && groupId.equals(guestGroup_))
+ {
return true;
+ }
if (identity == null)
{
return false;
@@ -477,10 +536,14 @@
public void setPermissionExpression(String exp)
{
if (exp == null || exp.length() == 0)
+ {
return;
+ }
String[] temp = exp.split(":");
if (temp.length < 2)
+ {
return;
+ }
expression = exp;
membership_ = temp[0].trim();
groupId_ = temp[1].trim();
@@ -509,7 +572,9 @@
public String getValue()
{
if (membership_.length() == 0 || groupId_.length() == 0)
+ {
return null;
+ }
return membership_ + ":" + groupId_;
}
Modified: portal/branches/wsrp-integration/gadgets/eXoGadgets/src/main/webapp/gadgets/Calculator/Calculator.xml
===================================================================
--- portal/branches/wsrp-integration/gadgets/eXoGadgets/src/main/webapp/gadgets/Calculator/Calculator.xml 2009-10-29 17:39:04 UTC (rev 442)
+++ portal/branches/wsrp-integration/gadgets/eXoGadgets/src/main/webapp/gadgets/Calculator/Calculator.xml 2009-10-29 18:14:44 UTC (rev 443)
@@ -29,17 +29,17 @@
*
-->
<Module>
- <ModulePrefs author="eXoPlatform"
- title="Calculator"
- directory_title="Caculator"
- title_url="http://www.exoplatform.org"
- description="This simple and useful calculator lets you perform most of the basic arithmetic operations."
- thumbnail="http://localhost:8080/eXoGadgets/skin/DefaultSkin/portletIcons/Calculator..."
- height="227">
- <Locale lang="ar" language_direction="rtl"/>
- </ModulePrefs>
- <Content type="html">
- <![CDATA[
+ <ModulePrefs author="eXoPlatform"
+ title="Calculator"
+ directory_title="Caculator"
+ title_url="http://www.exoplatform.org"
+ description="This simple and useful calculator lets you perform most of the basic arithmetic operations."
+ thumbnail="http://localhost:8080/eXoGadgets/skin/DefaultSkin/portletIcons/Calculator..."
+ height="227">
+ <Locale lang="ar" language_direction="rtl"/>
+ </ModulePrefs>
+ <Content type="html">
+ <![CDATA[
<style type="text/css">
body {
margin: 0;
@@ -86,21 +86,21 @@
text-align: center;
}
- .Display p {
+ .Display input {
background: url(/eXoGadgets/skin/image/Display.png) no-repeat top left;
width: 164px;
height: 23px;
- text-align: __BIDI_END_EDGE__;
margin: 0 auto;
font-size: 15px;
line-height: auto;
color: #333333;
font-weight: bold;
- padding: 11px 3px 0 0;
+ padding: 3px 3px 0 0;
+ direction: __BIDI_REVERSE_DIR__;
}
.Number {
- padding-top: 8px;
+ padding-top: 8px;
padding-__BIDI_START_EDGE__: 9px;
}
@@ -115,13 +115,13 @@
display: block;
float: __BIDI_START_EDGE__;
margin-top: 4px;
- margin-__BIDI_START_EDGE__: 3px;
+ margin-__BIDI_START_EDGE__: 3px;
cursor: pointer;
padding-top: 3px;
}
.ClearLeft {
- clear: __BIDI_START_EDGE__
+ clear: __BIDI_START_EDGE__;
}
.Row a sup {
@@ -159,7 +159,7 @@
var NewNumber = "blank";
var opvalue = "";
function Display(displaynumber) {
- document.getElementById("calculator").innerHTML = displaynumber;
+ document.getElementById("calculator").value = displaynumber;
}
function ClearCalc() {
Number1 = "";
@@ -169,7 +169,7 @@
}
function CheckNumber(answer) {
if(answer == ".") {
- Number = document.getElementById("calculator").innerHTML;;
+ Number = document.getElementById("calculator").value;
if(Number.indexOf(".") != -1) {
answer = "";
}
@@ -257,7 +257,7 @@
<div class="RightCalculator">
<div class="CenterCalculator">
<div class="Display">
- <p id="calculator">0</p>
+ <input id="calculator" value="0" disabled />
</div>
<div class="Number">
<div class="Row">
@@ -297,5 +297,5 @@
</div>
</body>
]]>
- </Content>
+ </Content>
</Module>
\ No newline at end of file
Deleted: portal/branches/wsrp-integration/packaging/key.txt
===================================================================
--- portal/branches/wsrp-integration/packaging/key.txt 2009-10-29 17:39:04 UTC (rev 442)
+++ portal/branches/wsrp-integration/packaging/key.txt 2009-10-29 18:14:44 UTC (rev 443)
@@ -1 +0,0 @@
-rR992qPYCDQYG9SZml36Tb1n+trO+DXEB9CwXAzgfOE=
Modified: portal/branches/wsrp-integration/portlet/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIDashboardPortlet.java
===================================================================
--- portal/branches/wsrp-integration/portlet/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIDashboardPortlet.java 2009-10-29 17:39:04 UTC (rev 442)
+++ portal/branches/wsrp-integration/portlet/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIDashboardPortlet.java 2009-10-29 18:14:44 UTC (rev 443)
@@ -1,16 +1,16 @@
/**
* Copyright (C) 2009 eXo Platform SAS.
- *
+ *
* 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
@@ -19,29 +19,22 @@
package org.exoplatform.dashboard.webui.component;
-import org.exoplatform.portal.webui.application.UIGadget;
import org.exoplatform.portal.webui.container.UIContainer;
import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.webui.application.portlet.PortletRequestContext;
import org.exoplatform.webui.config.annotation.ComponentConfig;
-import org.exoplatform.webui.config.annotation.EventConfig;
import org.exoplatform.webui.core.UIPortletApplication;
import org.exoplatform.webui.core.lifecycle.UIApplicationLifecycle;
-import org.exoplatform.webui.event.Event;
-import org.exoplatform.webui.event.EventListener;
import javax.portlet.PortletPreferences;
/**
* set the event listeners.
*/
+
+/** @author exo */
+@ComponentConfig(lifecycle = UIApplicationLifecycle.class, template = "app:/groovy/dashboard/webui/component/UIDashboardPortlet.gtmpl", events = {})
/**
- * @author exo
- */
-@ComponentConfig(lifecycle = UIApplicationLifecycle.class, template = "app:/groovy/dashboard/webui/component/UIDashboardPortlet.gtmpl", events = {
- @EventConfig(listeners = UIDashboardPortlet.MinimizeGadgetActionListener.class),
- @EventConfig(listeners = UIDashboardPortlet.MaximizeGadgetActionListener.class)})
-/**
* Dashboard portlet that display google gadgets
*/
public class UIDashboardPortlet extends UIPortletApplication implements DashboardParent
@@ -55,7 +48,6 @@
PortletRequestContext context = (PortletRequestContext)WebuiRequestContext.getCurrentInstance();
UIDashboard dashboard = addChild(UIDashboard.class, null, null);
- addChild(UIDashboardMask.class, null, null).setRendered(false);
addChild(UIDashboardEditForm.class, null, null);
PortletPreferences pref = context.getRequest().getPreferences();
@@ -80,7 +72,9 @@
PortletRequestContext context = (PortletRequestContext)WebuiRequestContext.getCurrentInstance();
String accessUser = context.getRemoteUser();
if (accessUser == null || accessUser.equals(""))
+ {
return false;
+ }
if ("__CURRENT_USER__".equals(owner))
{
return true;
@@ -88,7 +82,9 @@
if (isPrivate)
{
if (accessUser.equals(owner))
+ {
return true;
+ }
}
return false;
}
@@ -103,50 +99,4 @@
return owner;
}
- public static class MinimizeGadgetActionListener extends EventListener<UIDashboardPortlet>
- {
- public final void execute(final Event<UIDashboardPortlet> event) throws Exception
- {
- WebuiRequestContext context = event.getRequestContext();
- UIDashboardPortlet uiPortlet = event.getSource();
- String objectId = context.getRequestParameter(OBJECTID);
- String minimized = context.getRequestParameter("minimized");
-
- UIDashboard uiDashboard = uiPortlet.getChild(UIDashboard.class);
- UIGadget uiGadget = uiDashboard.getChild(UIDashboardContainer.class).getUIGadget(objectId);
- uiGadget.getProperties().setProperty("minimized", minimized);
- uiDashboard.getChild(UIDashboardContainer.class).save();
- context.addUIComponentToUpdateByAjax(uiGadget);
- }
- }
-
- public static class MaximizeGadgetActionListener extends EventListener<UIDashboardPortlet>
- {
- public final void execute(final Event<UIDashboardPortlet> event) throws Exception
- {
- WebuiRequestContext context = event.getRequestContext();
- UIDashboardPortlet uiPortlet = event.getSource();
- String objectId = context.getRequestParameter(OBJECTID);
- String maximize = context.getRequestParameter("maximize");
- UIDashboard uiDashboard = uiPortlet.getChild(UIDashboard.class);
- UIDashboardContainer uiDashboardContainer = uiDashboard.getChild(UIDashboardContainer.class);
- UIDashboardMask uiDashboardMask = uiPortlet.getChild(UIDashboardMask.class);
- UIGadget uiGadget = uiDashboardContainer.getUIGadget(objectId);
- if (maximize.equals("maximize"))
- {
- uiGadget.setView(UIGadget.CANVAS_VIEW);
- uiDashboardMask.setUIComponent(uiGadget);
- uiDashboardMask.setRendered(true);
- uiDashboard.setRendered(false);
- }
- else
- {
- uiGadget.setView(UIGadget.HOME_VIEW);
- uiDashboardMask.setUIComponent(null);
- uiDashboardMask.setRendered(false);
- uiDashboard.setRendered(true);
- }
- //context.addUIComponentToUpdateByAjax(uiPortlet) ;
- }
- }
}
Modified: portal/branches/wsrp-integration/portlet/dashboard/src/main/webapp/groovy/dashboard/webui/component/UIDashboardPortlet.gtmpl
===================================================================
--- portal/branches/wsrp-integration/portlet/dashboard/src/main/webapp/groovy/dashboard/webui/component/UIDashboardPortlet.gtmpl 2009-10-29 17:39:04 UTC (rev 442)
+++ portal/branches/wsrp-integration/portlet/dashboard/src/main/webapp/groovy/dashboard/webui/component/UIDashboardPortlet.gtmpl 2009-10-29 18:14:44 UTC (rev 443)
@@ -2,7 +2,6 @@
import javax.portlet.PortletMode ;
import org.exoplatform.dashboard.webui.component.DashboardParent ;
import org.exoplatform.dashboard.webui.component.UIDashboard;
- import org.exoplatform.dashboard.webui.component.UIDashboardMask;
import org.exoplatform.dashboard.webui.component.UIDashboardEditForm;
def rcontext = _ctx.getRequestContext() ;
@@ -11,7 +10,6 @@
<div id="$uicomponent.id" class="UIDashboardPortlet">
<% if(rcontext.getApplicationMode() == PortletMode.VIEW) {
uicomponent.renderChild(UIDashboard.class);
- uicomponent.renderChild(UIDashboardMask.class);
} else {
UIDashboardEditForm uiEditForm = uicomponent.getChild(UIDashboardEditForm.class);
uiEditForm.getUIStringInput(UIDashboardEditForm.TOTAL_COLUMNS).setValue(uicomponent.getNumberOfCols() + "");
Modified: portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIAddApplicationForm.java
===================================================================
--- portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIAddApplicationForm.java 2009-10-29 17:39:04 UTC (rev 442)
+++ portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIAddApplicationForm.java 2009-10-29 18:14:44 UTC (rev 443)
@@ -1,16 +1,16 @@
/**
* Copyright (C) 2009 eXo Platform SAS.
- *
+ *
* 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
@@ -37,8 +37,8 @@
import org.exoplatform.webui.core.lifecycle.UIFormLifecycle;
import org.exoplatform.webui.core.model.SelectItemOption;
import org.exoplatform.webui.event.Event;
-import org.exoplatform.webui.event.EventListener;
import org.exoplatform.webui.event.Event.Phase;
+import org.exoplatform.webui.event.EventListener;
import org.exoplatform.webui.form.UIForm;
import org.exoplatform.webui.form.UIFormInputInfo;
import org.exoplatform.webui.form.UIFormInputSet;
@@ -62,12 +62,7 @@
import java.util.ResourceBundle;
import java.util.Set;
-/**
- * Created by The eXo Platform SAS
- * Author : Pham Thanh Tung
- * thanhtungty(a)gmail.com
- * Jul 10, 2008
- */
+/** Created by The eXo Platform SAS Author : Pham Thanh Tung thanhtungty(a)gmail.com Jul 10, 2008 */
@ComponentConfig(template = "system:/groovy/webui/form/UIForm.gtmpl", lifecycle = UIFormLifecycle.class, events = {
@EventConfig(listeners = UIAddApplicationForm.ChangeTypeActionListener.class, phase = Phase.DECODE),
@EventConfig(listeners = UIAddApplicationForm.AddActionListener.class),
@@ -275,6 +270,7 @@
}
appRegService.save(selectedCate, app);
+ uiOrganizer.reload();
uiOrganizer.setSelectedCategory(selectedCate);
uiOrganizer.selectApplication(app.getApplicationName());
ctx.addUIComponentToUpdateByAjax(uiOrganizer);
Modified: portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIApplicationOrganizer.java
===================================================================
--- portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIApplicationOrganizer.java 2009-10-29 17:39:04 UTC (rev 442)
+++ portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIApplicationOrganizer.java 2009-10-29 18:14:44 UTC (rev 443)
@@ -1,16 +1,16 @@
/**
* Copyright (C) 2009 eXo Platform SAS.
- *
+ *
* 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
@@ -37,12 +37,7 @@
import java.util.List;
-/**
- * Created by The eXo Platform SAS
- * Author : Pham Thanh Tung
- * thanhtungty(a)gmail.com
- * Jun 24, 2008
- */
+/** Created by The eXo Platform SAS Author : Pham Thanh Tung thanhtungty(a)gmail.com Jun 24, 2008 */
@ComponentConfig(template = "app:/groovy/applicationregistry/webui/component/UIApplicationOrganizer.gtmpl", events = {
@EventConfig(listeners = UIApplicationOrganizer.ShowCategoryActionListener.class),
@EventConfig(listeners = UIApplicationOrganizer.ImportAllApplicationsActionListener.class, confirm = "UIOrganizer.msg.importAll"),
@@ -137,7 +132,9 @@
for (ApplicationCategory category : categories)
{
if (category.getName().equals(name))
+ {
return category;
+ }
}
return null;
}
@@ -176,7 +173,9 @@
for (Application ele : applications)
{
if (ele.getApplicationName().equals(name))
+ {
return ele;
+ }
}
return null;
}
@@ -257,7 +256,9 @@
uiOrganizer.setSelectedCategory(selectedCategory);
}
else
+ {
uiOrganizer.reload();
+ }
return;
}
uiOrganizer.selectApplication(appName);
@@ -362,7 +363,7 @@
service.remove(app);
}
String cateName = uiOrganizer.getSelectedCategory().getName();
- uiOrganizer.initApplicationCategories();
+ uiOrganizer.reload();
uiOrganizer.setSelectedCategory(cateName);
event.getRequestContext().addUIComponentToUpdateByAjax(uiOrganizer);
}
Modified: portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UICategoryForm.java
===================================================================
--- portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UICategoryForm.java 2009-10-29 17:39:04 UTC (rev 442)
+++ portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UICategoryForm.java 2009-10-29 18:14:44 UTC (rev 443)
@@ -1,16 +1,16 @@
/**
* Copyright (C) 2009 eXo Platform SAS.
- *
+ *
* 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
@@ -29,8 +29,8 @@
import org.exoplatform.webui.core.UIApplication;
import org.exoplatform.webui.core.lifecycle.UIFormLifecycle;
import org.exoplatform.webui.event.Event;
+import org.exoplatform.webui.event.Event.Phase;
import org.exoplatform.webui.event.EventListener;
-import org.exoplatform.webui.event.Event.Phase;
import org.exoplatform.webui.form.UIFormInputSet;
import org.exoplatform.webui.form.UIFormStringInput;
import org.exoplatform.webui.form.UIFormTabPane;
@@ -44,12 +44,7 @@
import java.util.ArrayList;
import java.util.Date;
-/**
- * Created by The eXo Platform SARL
- * Author : Hoa Nguyen
- * hoa.nguyen(a)exoplatform.com
- * Jul 4, 2006
- */
+/** Created by The eXo Platform SARL Author : Hoa Nguyen hoa.nguyen(a)exoplatform.com Jul 4, 2006 */
@ComponentConfig(lifecycle = UIFormLifecycle.class, template = "system:/groovy/webui/form/UIFormTabPane.gtmpl", events = {
@EventConfig(listeners = UICategoryForm.SaveActionListener.class),
@EventConfig(listeners = UICategoryForm.CancelActionListener.class, phase = Phase.DECODE)})
@@ -131,22 +126,32 @@
ApplicationCategory category = uiForm.getCategory();
boolean isCreateNew = category == null;
if (isCreateNew)
+ {
category = new ApplicationCategory();
+ }
UIFormInputSet uiSetting = uiForm.getChildById(FIELD_SETTING);
UIFormInputSet uiPermission = uiForm.getChildById(FIELD_PERMISSION);
category.setName(uiSetting.getUIStringInput(FIELD_NAME).getValue());
String displayName = uiSetting.getUIStringInput(FIELD_DISPLAY_NAME).getValue();
if (displayName == null || displayName.length() < 1)
+ {
category.setDisplayName(category.getName());
+ }
else
+ {
category.setDisplayName(displayName);
+ }
category.setDescription(uiSetting.getUIStringInput(FIELD_DESCRIPTION).getValue());
UIListPermissionSelector uiListPermissionSelector = uiPermission.getChild(UIListPermissionSelector.class);
ArrayList<String> pers = new ArrayList<String>();
if (uiListPermissionSelector.getValue() != null)
+ {
for (String per : uiListPermissionSelector.getValue())
+ {
pers.add(per);
+ }
+ }
category.setAccessPermissions(pers);
ApplicationCategory existCategory = service.getApplicationCategory(category.getName());
if (!isCreateNew)
@@ -178,7 +183,7 @@
}
service.save(category);
uiForm.setValue(null);
- uiOrganizer.initApplicationCategories();
+ uiOrganizer.reload();
uiOrganizer.setSelectedCategory(category.getName());
ctx.addUIComponentToUpdateByAjax(uiOrganizer);
}
@@ -197,7 +202,9 @@
uiOrganizer.setSelectedApplication(application);
}
else
+ {
uiOrganizer.reload();
+ }
event.getRequestContext().addUIComponentToUpdateByAjax(uiOrganizer);
}
Modified: portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UIGroupNavigationManagement.java
===================================================================
--- portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UIGroupNavigationManagement.java 2009-10-29 17:39:04 UTC (rev 442)
+++ portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UIGroupNavigationManagement.java 2009-10-29 18:14:44 UTC (rev 443)
@@ -1,16 +1,16 @@
/**
* Copyright (C) 2009 eXo Platform SAS.
- *
+ *
* 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
@@ -50,12 +50,13 @@
import org.exoplatform.webui.core.UIVirtualList;
import org.exoplatform.webui.core.lifecycle.UIFormLifecycle;
import org.exoplatform.webui.event.Event;
+import org.exoplatform.webui.event.Event.Phase;
import org.exoplatform.webui.event.EventListener;
-import org.exoplatform.webui.event.Event.Phase;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
+import java.util.UUID;
/*
* Created by The eXo Platform SAS
@@ -90,6 +91,7 @@
UIRepeater repeater = createUIComponent(UIRepeater.class, "UIGroupNavigationGrid", null);
virtualList.setUIComponent(repeater);
UIPopupWindow editNavigation = addChild(UIPopupWindow.class, null, null);
+ editNavigation.setId(editNavigation.getId() + "-" + UUID.randomUUID().toString().replaceAll("-", ""));
}
public void loadNavigations() throws Exception
@@ -126,14 +128,18 @@
public void addPageNavigation(PageNavigation navigation)
{
if (navigations == null)
+ {
navigations = new ArrayList<PageNavigation>();
+ }
navigations.add(navigation);
}
public void deletePageNavigation(PageNavigation navigation)
{
if (navigations == null || navigations.size() < 1)
+ {
return;
+ }
navigations.remove(navigation);
}
@@ -142,7 +148,9 @@
for (PageNavigation ele : getPageNavigations())
{
if (ele.getId() == id)
+ {
return ele;
+ }
}
return null;
}
@@ -150,7 +158,9 @@
public List<PageNavigation> getPageNavigations()
{
if (navigations == null)
+ {
navigations = new ArrayList<PageNavigation>();
+ }
return navigations;
}
@@ -226,6 +236,7 @@
selector.removeChild(UIRightClickPopupMenu.class);
popUp.setUIComponent(pageManager);
popUp.setWindowSize(400, 400);
+ popUp.setShowMask(true);
popUp.setShow(true);
// prContext.addUIComponentToUpdateByAjax(workingWS);
}
@@ -256,6 +267,7 @@
pageNavigation.setPageNav(navigation);
popUp.setUIComponent(pageNavigation);
popUp.setWindowSize(600, 400);
+ popUp.setShowMask(true);
popUp.setShow(true);
}
}
@@ -296,7 +308,9 @@
// remove selected navigation
if (uicomp.navigations == null || uicomp.navigations.size() < 1)
+ {
return;
+ }
uicomp.navigations.remove(navigation);
// remove navigation from UIPortal
Modified: portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UISiteManagement.java
===================================================================
--- portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UISiteManagement.java 2009-10-29 17:39:04 UTC (rev 442)
+++ portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UISiteManagement.java 2009-10-29 18:14:44 UTC (rev 443)
@@ -1,16 +1,16 @@
/**
* Copyright (C) 2009 eXo Platform SAS.
- *
+ *
* 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
@@ -52,17 +52,17 @@
import org.exoplatform.webui.core.UIRightClickPopupMenu;
import org.exoplatform.webui.core.lifecycle.UIFormLifecycle;
import org.exoplatform.webui.event.Event;
+import org.exoplatform.webui.event.Event.Phase;
import org.exoplatform.webui.event.EventListener;
-import org.exoplatform.webui.event.Event.Phase;
+import javax.servlet.http.HttpServletRequest;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.Iterator;
import java.util.List;
+import java.util.UUID;
-import javax.servlet.http.HttpServletRequest;
-
@ComponentConfigs({
@ComponentConfig(template = "app:/groovy/navigation/webui/component/UISiteManagement.gtmpl", events = {
@EventConfig(name = "EditPortalLayout", listeners = UISiteManagement.EditPortalLayoutActionListener.class),
@@ -88,6 +88,7 @@
{
UIPopupWindow editNavigation = addChild(UIPopupWindow.class, null, null);
editNavigation.setWindowSize(400, 400);
+ editNavigation.setId(editNavigation.getId() + "-" + UUID.randomUUID().toString().replaceAll("-", ""));
//loadPortalConfigs();
}
@@ -153,17 +154,25 @@
PortalConfig[] pcs = new PortalConfig[tempArrayList.size()];
if (index < 0)
+ {
throw new IllegalArgumentException("Illegal index: index must be a positive number");
+ }
if (length < 0)
+ {
throw new IllegalArgumentException("Illegal length: length must be a positive number");
+ }
if (index + length > tempArrayList.size())
+ {
throw new IllegalArgumentException(
"Illegal index or length: sum of the index and the length cannot be greater than the list size");
+ }
for (int i = 0; i < length; i++)
+ {
pcs[i] = tempArrayList.get(i + index);
+ }
return pcs;
}
@@ -200,13 +209,15 @@
else if (config != null)
{
uiPortalApp.addMessage(new ApplicationMessage("UISiteManagement.msg.Invalid-deletePermission",
- new String[]{config.getPortalConfig().getName()}));;
+ new String[]{config.getPortalConfig().getName()}));
+ ;
return;
}
else
{
uiPortalApp.addMessage(new ApplicationMessage("UISiteManagement.msg.portal-not-exist",
- new String[]{portalName}));;
+ new String[]{portalName}));
+ ;
return;
}
@@ -300,7 +311,8 @@
UserACL userACL = uicomp.getApplicationComponent(UserACL.class);
if (!userACL.hasEditPermission(portalConfig))
{
- uiApplication.addMessage(new ApplicationMessage("UISiteManagement.msg.Invalid-editPermission", null));;
+ uiApplication.addMessage(new ApplicationMessage("UISiteManagement.msg.Invalid-editPermission", null));
+ ;
return;
}
@@ -319,6 +331,7 @@
selector.initNavigations(list);
selector.removeChild(UIRightClickPopupMenu.class);
popUp.setUIComponent(naviManager);
+ popUp.setShowMask(true);
popUp.setShow(true);
}
Modified: portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/WEB-INF/portlet.xml
===================================================================
--- portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/WEB-INF/portlet.xml 2009-10-29 17:39:04 UTC (rev 442)
+++ portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/WEB-INF/portlet.xml 2009-10-29 18:14:44 UTC (rev 443)
@@ -22,365 +22,395 @@
<portlet-app version="1.0" xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd">
- <portlet>
- <description xml:lang="EN">Organization Portlet</description>
- <portlet-name>OrganizationPortlet</portlet-name>
- <display-name xml:lang="EN">Organization Portlet</display-name>
- <portlet-class>org.exoplatform.webui.application.portlet.PortletApplicationController</portlet-class>
-
- <init-param>
- <name>webui.configuration</name>
- <value>/WEB-INF/conf/portlet/exoadmin/OrganizationPortlet/webui/configuration.xml</value>
- </init-param>
+ xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd">
+ <portlet>
+ <description xml:lang="EN">Organization Portlet</description>
+ <portlet-name>OrganizationPortlet</portlet-name>
+ <display-name xml:lang="EN">Organization Portlet</display-name>
+ <portlet-class>org.exoplatform.webui.application.portlet.PortletApplicationController</portlet-class>
- <expiration-cache>0</expiration-cache>
- <supports>
- <mime-type>text/html</mime-type>
- <portlet-mode>help</portlet-mode>
- </supports>
- <supported-locale>en</supported-locale>
- <resource-bundle>locale.portlet.exoadmin.OrganizationPortlet</resource-bundle>
- <portlet-info>
- <title>Organization Portlet</title>
- <short-title>Organization Portlet</short-title>
- <keywords>Administration</keywords>
- </portlet-info>
-
- <security-role-ref>
- <role-name>admin</role-name>
- <role-link>admin</role-link>
- </security-role-ref>
- <supported-processing-event><name>NewAccountAdded</name></supported-processing-event>
- </portlet>
-
- <portlet>
- <description xml:lang="EN">Account Portlet</description>
- <portlet-name>AccountPortlet</portlet-name>
- <display-name xml:lang="EN">Account Portlet</display-name>
- <portlet-class>org.exoplatform.webui.application.portlet.PortletApplicationController</portlet-class>
-
- <init-param>
- <name>webui.configuration</name>
- <value>/WEB-INF/conf/portlet/exoadmin/AccountPortlet/webui/configuration.xml</value>
- </init-param>
+ <init-param>
+ <name>webui.configuration</name>
+ <value>/WEB-INF/conf/portlet/exoadmin/OrganizationPortlet/webui/configuration.xml</value>
+ </init-param>
- <expiration-cache>0</expiration-cache>
- <supports>
- <mime-type>text/html</mime-type>
- <portlet-mode>help</portlet-mode>
- </supports>
- <supported-locale>en</supported-locale>
-
- <resource-bundle>locale.portlet.exoadmin.AccountPortlet</resource-bundle>
- <portlet-info>
- <title>Account Portlet</title>
- <short-title>Account Portlet</short-title>
- <keywords>Administration</keywords>
- </portlet-info>
- </portlet>
+ <expiration-cache>0</expiration-cache>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>help</portlet-mode>
+ </supports>
+ <supported-locale>en</supported-locale>
+ <resource-bundle>locale.portlet.exoadmin.OrganizationPortlet</resource-bundle>
+ <portlet-info>
+ <title>Organization Portlet</title>
+ <short-title>Organization Portlet</short-title>
+ <keywords>Administration</keywords>
+ </portlet-info>
- <portlet>
- <description xml:lang="EN">Group Navigation Portlet</description>
- <portlet-name>GroupNavigationPortlet</portlet-name>
- <display-name xml:lang="EN">Group Navigation Portlet</display-name>
- <portlet-class>org.exoplatform.webui.application.portlet.PortletApplicationController</portlet-class>
-
- <init-param>
- <name>webui.configuration</name>
- <value>/WEB-INF/conf/portlet/exoadmin/GroupNavigationPortlet/webui/configuration.xml</value>
- </init-param>
+ <security-role-ref>
+ <role-name>admin</role-name>
+ <role-link>admin</role-link>
+ </security-role-ref>
+ <supported-processing-event>
+ <name>NewAccountAdded</name>
+ </supported-processing-event>
+ </portlet>
- <expiration-cache>0</expiration-cache>
- <supports>
- <mime-type>text/html</mime-type>
- <portlet-mode>help</portlet-mode>
- </supports>
- <supported-locale>en</supported-locale>
-
- <resource-bundle>locale.portlet.exoadmin.GroupNavigationPortlet</resource-bundle>
- <portlet-info>
- <title>Group Navigation Portlet</title>
- <short-title>Group Navigation Portlet</short-title>
- <keywords>Administration</keywords>
- </portlet-info>
- </portlet>
-
- <portlet>
- <description xml:lang="EN">Portal Navigation Portlet</description>
- <portlet-name>PortalNavigationPortlet</portlet-name>
- <display-name xml:lang="EN">Portal Navigation Portlet</display-name>
- <portlet-class>org.exoplatform.webui.application.portlet.PortletApplicationController</portlet-class>
-
- <init-param>
- <name>webui.configuration</name>
- <value>/WEB-INF/conf/portlet/exoadmin/PortalNavigationPortlet/webui/configuration.xml</value>
- </init-param>
+ <portlet>
+ <description xml:lang="EN">Account Portlet</description>
+ <portlet-name>AccountPortlet</portlet-name>
+ <display-name xml:lang="EN">Account Portlet</display-name>
+ <portlet-class>org.exoplatform.webui.application.portlet.PortletApplicationController</portlet-class>
- <expiration-cache>0</expiration-cache>
- <supports>
- <mime-type>text/html</mime-type>
- <portlet-mode>help</portlet-mode>
- </supports>
- <supported-locale>en</supported-locale>
-
- <resource-bundle>locale.portlet.exoadmin.PortalNavigationPortlet</resource-bundle>
- <portlet-info>
- <title>Portal Navigation Portlet</title>
- <short-title>Portal Navigation Portlet</short-title>
- <keywords>System</keywords>
- </portlet-info>
- </portlet>
-
- <portlet>
- <description xml:lang="EN">Page Management Portlet</description>
- <portlet-name>PageManagementPortlet</portlet-name>
- <display-name xml:lang="EN">Page Management Portlet</display-name>
- <portlet-class>org.exoplatform.webui.application.portlet.PortletApplicationController</portlet-class>
-
- <init-param>
- <name>webui.configuration</name>
- <value>/WEB-INF/conf/portlet/exoadmin/PageManagementPortlet/webui/configuration.xml</value>
- </init-param>
+ <init-param>
+ <name>webui.configuration</name>
+ <value>/WEB-INF/conf/portlet/exoadmin/AccountPortlet/webui/configuration.xml</value>
+ </init-param>
- <expiration-cache>0</expiration-cache>
- <supports>
- <mime-type>text/html</mime-type>
- <portlet-mode>help</portlet-mode>
- </supports>
- <supported-locale>en</supported-locale>
-
- <resource-bundle>locale.portlet.exoadmin.AccountPortlet</resource-bundle>
- <portlet-info>
- <title>Page Management Portlet</title>
- <short-title>Page Management Portlet</short-title>
- <keywords>Administration</keywords>
- </portlet-info>
- </portlet>
-
- <portlet>
- <description xml:lang="EN">Internationalization Portlet</description>
- <portlet-name>I18nPortlet</portlet-name>
- <display-name xml:lang="EN">Internationalization Portlet</display-name>
- <portlet-class>org.exoplatform.webui.application.portlet.PortletApplicationController</portlet-class>
-
- <init-param>
- <name>webui.configuration</name>
- <value>/WEB-INF/conf/portlet/exoadmin/I18nPortlet/webui/configuration.xml</value>
- </init-param>
+ <expiration-cache>0</expiration-cache>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>help</portlet-mode>
+ </supports>
+ <supported-locale>en</supported-locale>
- <expiration-cache>0</expiration-cache>
- <supports>
- <mime-type>text/html</mime-type>
- <portlet-mode>help</portlet-mode>
- </supports>
- <supported-locale>en</supported-locale>
- <resource-bundle>locale.portlet.exoadmin.I18nPortlet</resource-bundle>
- <portlet-info>
- <title>Internationalization Portlet</title>
- <short-title>Internationalization</short-title>
- <keywords>Administration</keywords>
- </portlet-info>
- </portlet>
-
- <portlet>
- <description xml:lang="EN">Application Registry</description>
- <portlet-name>ApplicationRegistryPortlet</portlet-name>
- <display-name xml:lang="EN">Application Registry</display-name>
- <portlet-class>org.exoplatform.webui.application.portlet.PortletApplicationController</portlet-class>
-
- <init-param>
- <name>webui.configuration</name>
- <value>/WEB-INF/conf/portlet/exoadmin/ApplicationRegistryPortlet/webui/configuration.xml</value>
- </init-param>
+ <resource-bundle>locale.portlet.exoadmin.AccountPortlet</resource-bundle>
+ <portlet-info>
+ <title>Account Portlet</title>
+ <short-title>Account Portlet</short-title>
+ <keywords>Administration</keywords>
+ </portlet-info>
+ </portlet>
- <expiration-cache>0</expiration-cache>
- <supports>
- <mime-type>text/html</mime-type>
- <portlet-mode>help</portlet-mode>
- </supports>
- <supported-locale>en</supported-locale>
-
- <resource-bundle>locale.portlet.exoadmin.ApplicationRegistryPortlet</resource-bundle>
- <portlet-info>
- <title>Application Registry Portlet</title>
- <short-title>Registry</short-title>
- <keywords>Administration</keywords>
- </portlet-info>
-
- <security-role-ref>
- <role-name>admin</role-name>
- <role-link>admin</role-link>
- </security-role-ref>
- </portlet>
-
- <portlet>
- <description xml:lang="EN">Administration Toolbar Portlet</description>
- <portlet-name>AdminToolbarPortlet</portlet-name>
- <display-name xml:lang="EN">Administration Toolbar Portlet</display-name>
- <portlet-class>org.exoplatform.webui.application.portlet.PortletApplicationController</portlet-class>
-
- <init-param>
- <name>webui.configuration</name>
- <value>/WEB-INF/conf/portlet/exoadmin/AdminToolbarPortlet/webui/configuration.xml</value>
- </init-param>
+ <!--
+ <portlet>
+ <description xml:lang="EN">Register Portlet</description>
+ <portlet-name>RegisterPortlet</portlet-name>
+ <display-name xml:lang="EN">Register Portlet</display-name>
+ <portlet-class>org.exoplatform.webui.application.portlet.PortletApplicationController</portlet-class>
- <expiration-cache>0</expiration-cache>
- <supports>
- <mime-type>text/html</mime-type>
- <portlet-mode>help</portlet-mode>
- </supports>
- <supported-locale>en,fr,vi,ar</supported-locale>
- <resource-bundle>locale.portlet.exoadmin.AdminToolbarPortlet</resource-bundle>
- <portlet-info>
- <title>Administration Toolbar Portlet</title>
- <short-title>Administration Toolbar</short-title>
- <keywords>System</keywords>
- </portlet-info>
- </portlet>
-
- <portlet>
- <description xml:lang="EN">User Info Portlet</description>
- <portlet-name>UserInfoPortlet</portlet-name>
- <display-name xml:lang="EN">User Info Portlet</display-name>
- <portlet-class>org.exoplatform.webui.application.portlet.PortletApplicationController</portlet-class>
-
- <init-param>
- <name>webui.configuration</name>
- <value>/WEB-INF/conf/portlet/exoadmin/UserInfoPortlet/webui/configuration.xml</value>
- </init-param>
+ <init-param>
+ <name>webui.configuration</name>
+ <value>/WEB-INF/conf/portlet/exoadmin/RegisterPortlet/webui/configuration.xml</value>
+ </init-param>
- <expiration-cache>0</expiration-cache>
- <supports>
- <mime-type>text/html</mime-type>
- <portlet-mode>help</portlet-mode>
- </supports>
- <supported-locale>en</supported-locale>
- <resource-bundle>locale.portlet.exoadmin.StarToolbarPortlet</resource-bundle>
- <portlet-info>
- <title>User Info Portlet</title>
- <short-title>UserInfo</short-title>
- <keywords>System, UserInfo</keywords>
- </portlet-info>
-
- <security-role-ref>
- <role-name>admin</role-name>
- <role-link>admin</role-link>
- </security-role-ref>
- </portlet>
+ <expiration-cache>0</expiration-cache>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>help</portlet-mode>
+ </supports>
+ <supported-locale>en</supported-locale>
- <portlet>
- <description xml:lang="EN">User Toolbar Site Portlet</description>
- <portlet-name>UserToolbarSitePortlet</portlet-name>
- <display-name xml:lang="EN">User Toolbar Site Portlet</display-name>
- <portlet-class>org.exoplatform.webui.application.portlet.PortletApplicationController</portlet-class>
-
- <init-param>
- <name>webui.configuration</name>
- <value>/WEB-INF/conf/portlet/exoadmin/UserToolbarSitePortlet/webui/configuration.xml</value>
- </init-param>
+ <resource-bundle>locale.portlet.exoadmin.RegisterPortlet</resource-bundle>
+ <portlet-info>
+ <title>Register Portlet</title>
+ <short-title>Register Portlet</short-title>
+ <keywords>Administration</keywords>
+ </portlet-info>
+ </portlet>
+ -->
- <expiration-cache>0</expiration-cache>
- <supports>
- <mime-type>text/html</mime-type>
- <portlet-mode>help</portlet-mode>
- </supports>
- <supported-locale>en</supported-locale>
- <resource-bundle>locale.portlet.exoadmin.UserToolbarPortlet</resource-bundle>
- <portlet-info>
- <title>User Toolbar Site Portlet</title>
- <short-title>UserToolbarSite</short-title>
- <keywords>System</keywords>
- </portlet-info>
-
- <security-role-ref>
- <role-name>admin</role-name>
- <role-link>admin</role-link>
- </security-role-ref>
- </portlet>
-
- <portlet>
- <description xml:lang="EN">User Toolbar Dashboard Portlet</description>
- <portlet-name>UserToolbarDashboardPortlet</portlet-name>
- <display-name xml:lang="EN">User Toolbar Dashboard Portlet</display-name>
- <portlet-class>org.exoplatform.webui.application.portlet.PortletApplicationController</portlet-class>
-
- <init-param>
- <name>webui.configuration</name>
- <value>/WEB-INF/conf/portlet/exoadmin/UserToolbarDashboardPortlet/webui/configuration.xml</value>
- </init-param>
+ <portlet>
+ <description xml:lang="EN">Group Navigation Portlet</description>
+ <portlet-name>GroupNavigationPortlet</portlet-name>
+ <display-name xml:lang="EN">Group Navigation Portlet</display-name>
+ <portlet-class>org.exoplatform.webui.application.portlet.PortletApplicationController</portlet-class>
- <expiration-cache>0</expiration-cache>
- <supports>
- <mime-type>text/html</mime-type>
- <portlet-mode>help</portlet-mode>
- </supports>
- <supported-locale>en</supported-locale>
- <resource-bundle>locale.portlet.exoadmin.UserToolbarPortlet</resource-bundle>
- <portlet-info>
- <title>User Toolbar Dashboard Portlet</title>
- <short-title>UserToolbarDashboard</short-title>
- <keywords>System</keywords>
- </portlet-info>
-
- <security-role-ref>
- <role-name>admin</role-name>
- <role-link>admin</role-link>
- </security-role-ref>
- </portlet>
-
+ <init-param>
+ <name>webui.configuration</name>
+ <value>/WEB-INF/conf/portlet/exoadmin/GroupNavigationPortlet/webui/configuration.xml</value>
+ </init-param>
+
+ <expiration-cache>0</expiration-cache>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>help</portlet-mode>
+ </supports>
+ <supported-locale>en</supported-locale>
+
+ <resource-bundle>locale.portlet.exoadmin.GroupNavigationPortlet</resource-bundle>
+ <portlet-info>
+ <title>Group Navigation Portlet</title>
+ <short-title>Group Navigation Portlet</short-title>
+ <keywords>Administration</keywords>
+ </portlet-info>
+ </portlet>
+
<portlet>
- <description xml:lang="EN">User Toolbar Group Portlet</description>
- <portlet-name>UserToolbarGroupPortlet</portlet-name>
- <display-name xml:lang="EN">User Toolbar Group Portlet</display-name>
- <portlet-class>org.exoplatform.webui.application.portlet.PortletApplicationController</portlet-class>
-
- <init-param>
- <name>webui.configuration</name>
- <value>/WEB-INF/conf/portlet/exoadmin/UserToolbarGroupPortlet/webui/configuration.xml</value>
- </init-param>
+ <description xml:lang="EN">Portal Navigation Portlet</description>
+ <portlet-name>PortalNavigationPortlet</portlet-name>
+ <display-name xml:lang="EN">Portal Navigation Portlet</display-name>
+ <portlet-class>org.exoplatform.webui.application.portlet.PortletApplicationController</portlet-class>
- <expiration-cache>0</expiration-cache>
- <supports>
- <mime-type>text/html</mime-type>
- <portlet-mode>help</portlet-mode>
- </supports>
- <supported-locale>en</supported-locale>
- <resource-bundle>locale.portlet.exoadmin.UserToolbarPortlet</resource-bundle>
- <portlet-info>
- <title>User Toolbar Group Portlet</title>
- <short-title>UserToolbarGroup</short-title>
- <keywords>System</keywords>
- </portlet-info>
-
- <security-role-ref>
- <role-name>admin</role-name>
- <role-link>admin</role-link>
- </security-role-ref>
- </portlet>
+ <init-param>
+ <name>webui.configuration</name>
+ <value>/WEB-INF/conf/portlet/exoadmin/PortalNavigationPortlet/webui/configuration.xml</value>
+ </init-param>
+
+ <expiration-cache>0</expiration-cache>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>help</portlet-mode>
+ </supports>
+ <supported-locale>en</supported-locale>
+
+ <resource-bundle>locale.portlet.exoadmin.PortalNavigationPortlet</resource-bundle>
+ <portlet-info>
+ <title>Portal Navigation Portlet</title>
+ <short-title>Portal Navigation Portlet</short-title>
+ <keywords>System</keywords>
+ </portlet-info>
+ </portlet>
+
<portlet>
- <description xml:lang="EN">Star Toolbar Portlet</description>
- <portlet-name>StarToolbarPortlet</portlet-name>
- <display-name xml:lang="EN">Star Toolbar Portlet</display-name>
- <portlet-class>org.exoplatform.webui.application.portlet.PortletApplicationController</portlet-class>
-
- <init-param>
- <name>webui.configuration</name>
- <value>/WEB-INF/conf/portlet/exoadmin/StarToolbarPortlet/webui/configuration.xml</value>
- </init-param>
+ <description xml:lang="EN">Page Management Portlet</description>
+ <portlet-name>PageManagementPortlet</portlet-name>
+ <display-name xml:lang="EN">Page Management Portlet</display-name>
+ <portlet-class>org.exoplatform.webui.application.portlet.PortletApplicationController</portlet-class>
- <expiration-cache>0</expiration-cache>
- <supports>
- <mime-type>text/html</mime-type>
- <portlet-mode>help</portlet-mode>
- </supports>
- <supported-locale>en</supported-locale>
- <resource-bundle>locale.portlet.exoadmin.StarToolbarPortlet</resource-bundle>
- <portlet-info>
- <title>Star Toolbar Portlet</title>
- <short-title>Star Toolbar</short-title>
- <keywords>System</keywords>
- </portlet-info>
- </portlet>
-
+ <init-param>
+ <name>webui.configuration</name>
+ <value>/WEB-INF/conf/portlet/exoadmin/PageManagementPortlet/webui/configuration.xml</value>
+ </init-param>
+
+ <expiration-cache>0</expiration-cache>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>help</portlet-mode>
+ </supports>
+ <supported-locale>en</supported-locale>
+
+ <resource-bundle>locale.portlet.exoadmin.AccountPortlet</resource-bundle>
+ <portlet-info>
+ <title>Page Management Portlet</title>
+ <short-title>Page Management Portlet</short-title>
+ <keywords>Administration</keywords>
+ </portlet-info>
+ </portlet>
+
+ <portlet>
+ <description xml:lang="EN">Internationalization Portlet</description>
+ <portlet-name>I18nPortlet</portlet-name>
+ <display-name xml:lang="EN">Internationalization Portlet</display-name>
+ <portlet-class>org.exoplatform.webui.application.portlet.PortletApplicationController</portlet-class>
+
+ <init-param>
+ <name>webui.configuration</name>
+ <value>/WEB-INF/conf/portlet/exoadmin/I18nPortlet/webui/configuration.xml</value>
+ </init-param>
+
+ <expiration-cache>0</expiration-cache>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>help</portlet-mode>
+ </supports>
+ <supported-locale>en</supported-locale>
+ <resource-bundle>locale.portlet.exoadmin.I18nPortlet</resource-bundle>
+ <portlet-info>
+ <title>Internationalization Portlet</title>
+ <short-title>Internationalization</short-title>
+ <keywords>Administration</keywords>
+ </portlet-info>
+ </portlet>
+
+ <portlet>
+ <description xml:lang="EN">Application Registry</description>
+ <portlet-name>ApplicationRegistryPortlet</portlet-name>
+ <display-name xml:lang="EN">Application Registry</display-name>
+ <portlet-class>org.exoplatform.webui.application.portlet.PortletApplicationController</portlet-class>
+
+ <init-param>
+ <name>webui.configuration</name>
+ <value>/WEB-INF/conf/portlet/exoadmin/ApplicationRegistryPortlet/webui/configuration.xml</value>
+ </init-param>
+
+ <expiration-cache>0</expiration-cache>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>help</portlet-mode>
+ </supports>
+ <supported-locale>en</supported-locale>
+
+ <resource-bundle>locale.portlet.exoadmin.ApplicationRegistryPortlet</resource-bundle>
+ <portlet-info>
+ <title>Application Registry Portlet</title>
+ <short-title>Registry</short-title>
+ <keywords>Administration</keywords>
+ </portlet-info>
+
+ <security-role-ref>
+ <role-name>admin</role-name>
+ <role-link>admin</role-link>
+ </security-role-ref>
+ </portlet>
+
+ <portlet>
+ <description xml:lang="EN">Administration Toolbar Portlet</description>
+ <portlet-name>AdminToolbarPortlet</portlet-name>
+ <display-name xml:lang="EN">Administration Toolbar Portlet</display-name>
+ <portlet-class>org.exoplatform.webui.application.portlet.PortletApplicationController</portlet-class>
+
+ <init-param>
+ <name>webui.configuration</name>
+ <value>/WEB-INF/conf/portlet/exoadmin/AdminToolbarPortlet/webui/configuration.xml</value>
+ </init-param>
+
+ <expiration-cache>0</expiration-cache>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>help</portlet-mode>
+ </supports>
+ <supported-locale>en,fr,vi,ar</supported-locale>
+ <resource-bundle>locale.portlet.exoadmin.AdminToolbarPortlet</resource-bundle>
+ <portlet-info>
+ <title>Administration Toolbar Portlet</title>
+ <short-title>Administration Toolbar</short-title>
+ <keywords>System</keywords>
+ </portlet-info>
+ </portlet>
+
+ <portlet>
+ <description xml:lang="EN">User Info Portlet</description>
+ <portlet-name>UserInfoPortlet</portlet-name>
+ <display-name xml:lang="EN">User Info Portlet</display-name>
+ <portlet-class>org.exoplatform.webui.application.portlet.PortletApplicationController</portlet-class>
+
+ <init-param>
+ <name>webui.configuration</name>
+ <value>/WEB-INF/conf/portlet/exoadmin/UserInfoPortlet/webui/configuration.xml</value>
+ </init-param>
+
+ <expiration-cache>0</expiration-cache>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>help</portlet-mode>
+ </supports>
+ <supported-locale>en</supported-locale>
+ <resource-bundle>locale.portlet.exoadmin.StarToolbarPortlet</resource-bundle>
+ <portlet-info>
+ <title>User Info Portlet</title>
+ <short-title>UserInfo</short-title>
+ <keywords>System, UserInfo</keywords>
+ </portlet-info>
+
+ <security-role-ref>
+ <role-name>admin</role-name>
+ <role-link>admin</role-link>
+ </security-role-ref>
+ </portlet>
+
+ <portlet>
+ <description xml:lang="EN">User Toolbar Site Portlet</description>
+ <portlet-name>UserToolbarSitePortlet</portlet-name>
+ <display-name xml:lang="EN">User Toolbar Site Portlet</display-name>
+ <portlet-class>org.exoplatform.webui.application.portlet.PortletApplicationController</portlet-class>
+
+ <init-param>
+ <name>webui.configuration</name>
+ <value>/WEB-INF/conf/portlet/exoadmin/UserToolbarSitePortlet/webui/configuration.xml</value>
+ </init-param>
+
+ <expiration-cache>0</expiration-cache>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>help</portlet-mode>
+ </supports>
+ <supported-locale>en</supported-locale>
+ <resource-bundle>locale.portlet.exoadmin.UserToolbarPortlet</resource-bundle>
+ <portlet-info>
+ <title>User Toolbar Site Portlet</title>
+ <short-title>UserToolbarSite</short-title>
+ <keywords>System</keywords>
+ </portlet-info>
+
+ <security-role-ref>
+ <role-name>admin</role-name>
+ <role-link>admin</role-link>
+ </security-role-ref>
+ </portlet>
+
+ <portlet>
+ <description xml:lang="EN">User Toolbar Dashboard Portlet</description>
+ <portlet-name>UserToolbarDashboardPortlet</portlet-name>
+ <display-name xml:lang="EN">User Toolbar Dashboard Portlet</display-name>
+ <portlet-class>org.exoplatform.webui.application.portlet.PortletApplicationController</portlet-class>
+
+ <init-param>
+ <name>webui.configuration</name>
+ <value>/WEB-INF/conf/portlet/exoadmin/UserToolbarDashboardPortlet/webui/configuration.xml</value>
+ </init-param>
+
+ <expiration-cache>0</expiration-cache>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>help</portlet-mode>
+ </supports>
+ <supported-locale>en</supported-locale>
+ <resource-bundle>locale.portlet.exoadmin.UserToolbarPortlet</resource-bundle>
+ <portlet-info>
+ <title>User Toolbar Dashboard Portlet</title>
+ <short-title>UserToolbarDashboard</short-title>
+ <keywords>System</keywords>
+ </portlet-info>
+
+ <security-role-ref>
+ <role-name>admin</role-name>
+ <role-link>admin</role-link>
+ </security-role-ref>
+ </portlet>
+
+ <portlet>
+ <description xml:lang="EN">User Toolbar Group Portlet</description>
+ <portlet-name>UserToolbarGroupPortlet</portlet-name>
+ <display-name xml:lang="EN">User Toolbar Group Portlet</display-name>
+ <portlet-class>org.exoplatform.webui.application.portlet.PortletApplicationController</portlet-class>
+
+ <init-param>
+ <name>webui.configuration</name>
+ <value>/WEB-INF/conf/portlet/exoadmin/UserToolbarGroupPortlet/webui/configuration.xml</value>
+ </init-param>
+
+ <expiration-cache>0</expiration-cache>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>help</portlet-mode>
+ </supports>
+ <supported-locale>en</supported-locale>
+ <resource-bundle>locale.portlet.exoadmin.UserToolbarPortlet</resource-bundle>
+ <portlet-info>
+ <title>User Toolbar Group Portlet</title>
+ <short-title>UserToolbarGroup</short-title>
+ <keywords>System</keywords>
+ </portlet-info>
+
+ <security-role-ref>
+ <role-name>admin</role-name>
+ <role-link>admin</role-link>
+ </security-role-ref>
+ </portlet>
+ <portlet>
+ <description xml:lang="EN">Star Toolbar Portlet</description>
+ <portlet-name>StarToolbarPortlet</portlet-name>
+ <display-name xml:lang="EN">Star Toolbar Portlet</display-name>
+ <portlet-class>org.exoplatform.webui.application.portlet.PortletApplicationController</portlet-class>
+
+ <init-param>
+ <name>webui.configuration</name>
+ <value>/WEB-INF/conf/portlet/exoadmin/StarToolbarPortlet/webui/configuration.xml</value>
+ </init-param>
+
+ <expiration-cache>0</expiration-cache>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>help</portlet-mode>
+ </supports>
+ <supported-locale>en</supported-locale>
+ <resource-bundle>locale.portlet.exoadmin.StarToolbarPortlet</resource-bundle>
+ <portlet-info>
+ <title>Star Toolbar Portlet</title>
+ <short-title>Star Toolbar</short-title>
+ <keywords>System</keywords>
+ </portlet-info>
+ </portlet>
+
</portlet-app>
\ No newline at end of file
Modified: portal/branches/wsrp-integration/portlet/web/src/main/java/org/exoplatform/portal/webui/component/UILogoEditMode.java
===================================================================
--- portal/branches/wsrp-integration/portlet/web/src/main/java/org/exoplatform/portal/webui/component/UILogoEditMode.java 2009-10-29 17:39:04 UTC (rev 442)
+++ portal/branches/wsrp-integration/portlet/web/src/main/java/org/exoplatform/portal/webui/component/UILogoEditMode.java 2009-10-29 18:14:44 UTC (rev 443)
@@ -1,16 +1,16 @@
/**
* Copyright (C) 2009 eXo Platform SAS.
- *
+ *
* 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
@@ -21,6 +21,7 @@
import org.exoplatform.portal.webui.util.Util;
import org.exoplatform.portal.webui.workspace.UIPortalApplication;
+import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.webui.application.portlet.PortletRequestContext;
import org.exoplatform.webui.config.annotation.ComponentConfig;
@@ -28,16 +29,16 @@
import org.exoplatform.webui.core.lifecycle.UIFormLifecycle;
import org.exoplatform.webui.event.Event;
import org.exoplatform.webui.event.EventListener;
+import org.exoplatform.webui.exception.MessageException;
import org.exoplatform.webui.form.UIForm;
import org.exoplatform.webui.form.UIFormStringInput;
import org.exoplatform.webui.form.validator.MandatoryValidator;
+import org.exoplatform.webui.form.validator.URLValidator;
import javax.portlet.PortletMode;
import javax.portlet.PortletPreferences;
-/**
- * Created by The eXo Platform SAS Author : eXoPlatform October 2, 2009
- */
+/** Created by The eXo Platform SAS Author : eXoPlatform October 2, 2009 */
@ComponentConfig(lifecycle = UIFormLifecycle.class, template = "system:/groovy/webui/form/UIFormWithTitle.gtmpl", events = {@EventConfig(listeners = UILogoEditMode.SaveActionListener.class)})
public class UILogoEditMode extends UIForm
{
@@ -58,6 +59,13 @@
{
UILogoEditMode uiForm = event.getSource();
String url = uiForm.getUIStringInput(FIELD_URL).getValue();
+ if (url != null && !url.trim().matches(URLValidator.URL_REGEX))
+ {
+ UILogoPortlet uiPortlet = uiForm.getParent();
+ uiForm.getUIStringInput(FIELD_URL).setValue(uiPortlet.getURL());
+ Object[] args = {FIELD_URL, "URL"};
+ throw new MessageException(new ApplicationMessage("ExpressionValidator.msg.value-invalid", args));
+ }
PortletRequestContext pcontext = (PortletRequestContext)WebuiRequestContext.getCurrentInstance();
PortletPreferences pref = pcontext.getRequest().getPreferences();
pref.setValue("url", uiForm.getUIStringInput(FIELD_URL).getValue());
@@ -65,7 +73,9 @@
UIPortalApplication portalApp = Util.getUIPortalApplication();
if (portalApp.getModeState() == UIPortalApplication.NORMAL_MODE)
+ {
pcontext.setApplicationMode(PortletMode.VIEW);
+ }
}
}
}
Modified: portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/javascript/eXo/core/Browser.js
===================================================================
--- portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/javascript/eXo/core/Browser.js 2009-10-29 17:39:04 UTC (rev 442)
+++ portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/javascript/eXo/core/Browser.js 2009-10-29 18:14:44 UTC (rev 443)
@@ -459,7 +459,6 @@
Browser.prototype.findMouseRelativeX = function(object, e) {
var posx = -1 ;
var posXObject = eXo.core.Browser.findPosX(object) ;
- document.title = "test" + posXObject;
/*
* posXObject is added more 3px on IE6
Modified: portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/javascript/eXo/core/DragDrop.js
===================================================================
--- portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/javascript/eXo/core/DragDrop.js 2009-10-29 17:39:04 UTC (rev 442)
+++ portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/javascript/eXo/core/DragDrop.js 2009-10-29 18:14:44 UTC (rev 443)
@@ -57,6 +57,7 @@
} ;
DragDrop.prototype.init = function(dropableTargets, clickObject, dragObject, evt) {
+ if(evt && evt.preventDefault) evt.preventDefault();
eXo.core.Mouse.init(evt) ;
this.dropableTargets = dropableTargets ;
Modified: portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/javascript/eXo/core/UIMaskLayer.js
===================================================================
--- portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/javascript/eXo/core/UIMaskLayer.js 2009-10-29 17:39:04 UTC (rev 442)
+++ portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/javascript/eXo/core/UIMaskLayer.js 2009-10-29 18:14:44 UTC (rev 443)
@@ -183,7 +183,7 @@
maskLayer.id = object.id + "MaskLayer" ;
maskLayer.maxZIndex = 3 ;
maskLayer.style.width = blockContainer.offsetWidth + "px" ;
- maskLayer.style.height = blockContainer.offsetHeight + "px" ;
+ maskLayer.style.height = blockContainer.offsetHeight + eXo.core.Browser.findPosY(blockContainer) + "px" ;
maskLayer.style.top = "0px" ;
maskLayer.style.left = "0px" ;
maskLayer.style.zIndex = maskLayer.maxZIndex ;
Modified: portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/javascript/eXo/gadget/UIGadget.js
===================================================================
--- portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/javascript/eXo/gadget/UIGadget.js 2009-10-29 17:39:04 UTC (rev 442)
+++ portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/javascript/eXo/gadget/UIGadget.js 2009-10-29 18:14:44 UTC (rev 443)
@@ -204,9 +204,9 @@
}
var compId = portletFrag.parentNode.id;
- var uicomp = DOMUtil.getChildrenByTagName(portletFrag, "div")[0].className ;
+ var uicomp = DOMUtil.findAncestorByClass(uiGadget, "UIDashboard") ;
var href = eXo.env.server.portalBaseURL + "?portal:componentId=" + compId ;
- href += "&portal:type=action&uicomponent=" + uicomp;
+ href += "&portal:type=action&uicomponent=" + uicomp.id;
href += "&op=MinimizeGadget";
href += "&minimized=" + minimized;
href += "&objectId=" + uiGadget.id + "&ajaxRequest=true";
@@ -219,11 +219,10 @@
var uiGadget = DOMUtil.findAncestorByClass(selectedElement, "UIGadget") ;
var portletFrag = DOMUtil.findAncestorByClass(uiGadget, "PORTLET-FRAGMENT") ;
if (!portletFrag) return;
- var maximize = "maximize";
var compId = portletFrag.parentNode.id;
- var uicomp = DOMUtil.getChildrenByTagName(portletFrag, "div")[0];
- var compDisplay = DOMUtil.findFirstChildByClass(uicomp,"div","UIDashboardMask");
- if(compDisplay != null) maximize = "unmaximize"
+ var uicomp = DOMUtil.findAncestorByClass(uiGadget, "UIDashboard");
+ var compDisplay = DOMUtil.findAncestorByClass(uiGadget, "UIDashboardContainer");
+ var maximize = compDisplay ? "maximize" : "unmaximize";
var href = eXo.env.server.portalBaseURL + "?portal:componentId=" + compId ;
href += "&portal:type=action&uicomponent=" + uicomp.id;
href += "&op=MaximizeGadget";
@@ -242,19 +241,28 @@
if (portletFragment != null) {
var compId = portletFragment.parentNode.id;
- var uicomp = "";
- if (DOMUtil.findChildrenByClass(portletFragment, "div", "UIDashboard")) {
- uicomp = "UIDashboard";
- }
- else
- uicomp = DOMUtil.getChildrenByTagName(portletFragment, "div")[0].className;
+ var uicomp = DOMUtil.findAncestorByClass(uiGadget, "UIDashboard").id;
+// if (DOMUtil.findChildrenByClass(portletFragment, "div", "UIDashboard"))
+// uicomp = "UIDashboard";
+// else
+// uicomp = DOMUtil.getChildrenByTagName(portletFragment, "div")[0].className;
if (confirm(this.confirmDeleteGadget)) {
var href = eXo.env.server.portalBaseURL + "?portal:componentId=" + compId;
href += "&portal:type=action&uicomponent=" + uicomp;
href += "&op=DeleteGadget";
href += "&objectId=" + uiGadget.id + "&ajaxRequest=true";
- DOMUtil.removeElement(uiGadget);
- ajaxAsyncGetRequest(href);
+
+ var uiDashboardCont = DOMUtil.findAncestorByClass(uiGadget, "UIDashboardContainer");
+ if(uiDashboardCont) {
+ ajaxAsyncGetRequest(href);
+ DOMUtil.removeElement(uiGadget);
+ if(!DOMUtil.findFirstDescendantByClass(uiDashboardCont, "div", "UIGadget")) {
+ DOMUtil.findFirstDescendantByClass(uiDashboardCont, "div", "NoGadget").style.display = "block";
+ }
+ }else {
+// Case: delete gadget in dashboard when maximized gadget
+ ajaxGet(href);
+ }
}
} else {
Modified: portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalDragDrop.js
===================================================================
--- portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalDragDrop.js 2009-10-29 17:39:04 UTC (rev 442)
+++ portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalDragDrop.js 2009-10-29 18:14:44 UTC (rev 443)
@@ -332,8 +332,10 @@
};
PortalDragDrop.prototype.scrollOnDrag = function(dragObject, dndEvent) {
+ var workspaceHeight = document.getElementById("UIWorkingWorkspace").offsetHeight;
+ var browserHeight = eXo.core.Browser.getBrowserHeight() ;
+ if(workspaceHeight <= browserHeight) return;
var dragObjectTop = eXo.core.Browser.findPosY(dragObject) ;
- var browserHeight = eXo.core.Browser.getBrowserHeight() ;
var mouseY = eXo.core.Browser.findMouseYInClient(dndEvent.backupMouseEvent) ;
var deltaTopMouse = eXo.core.Browser.findMouseYInPage(dndEvent.backupMouseEvent) - mouseY ;
var deltaTop = mouseY - (Math.round(browserHeight * 5/6)) ;
Modified: portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/javascript/eXo/webui/UICalendar.js
===================================================================
--- portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/javascript/eXo/webui/UICalendar.js 2009-10-29 17:39:04 UTC (rev 442)
+++ portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/javascript/eXo/webui/UICalendar.js 2009-10-29 18:14:44 UTC (rev 443)
@@ -69,7 +69,6 @@
UICalendar.prototype.show = function() {
document.onmousedown = 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() ;
@@ -109,6 +108,10 @@
var secondIndex = this.datePattern.indexOf("ss");
var secondValue = parseInt(dateFieldValue.substring(secondIndex,secondIndex+2),10);
+ if(isNaN(secondValue)) { secondValue = "00"; }
+ if(isNaN(minutesValue)) { minutesValue = "00"; }
+ if(isNaN(hoursValue)) { hoursValue = "00"; }
+
var testDate = "MM/dd/yyyy HH:mm:ss";
testDate = testDate.replace("dd",dateValue);
testDate = testDate.replace("MM",monthValue+1);
@@ -116,6 +119,7 @@
testDate = testDate.replace("HH",hoursValue);
testDate = testDate.replace("mm",minutesValue);
testDate = testDate.replace("ss",secondValue);
+
if (re.test(testDate)) {
this.selectedDate.setDate(dateValue) ;
this.selectedDate.setMonth(monthValue) ;
Modified: portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/javascript/eXo/webui/UITabbedDashboard.js
===================================================================
--- portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/javascript/eXo/webui/UITabbedDashboard.js 2009-10-29 17:39:04 UTC (rev 442)
+++ portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/javascript/eXo/webui/UITabbedDashboard.js 2009-10-29 18:14:44 UTC (rev 443)
@@ -23,7 +23,7 @@
renameTabLabel : function(e){
if(!e){
- e = windwow.event;
+ e = window.event;
}
var keyNum = e.keyCode;
Modified: portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIDashboard/Stylesheet.css
===================================================================
--- portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIDashboard/Stylesheet.css 2009-10-29 17:39:04 UTC (rev 442)
+++ portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIDashboard/Stylesheet.css 2009-10-29 18:14:44 UTC (rev 443)
@@ -35,7 +35,6 @@
.UIDashboard {
height: 100%;
- background: url('background/BgRepeat.gif') repeat-y left bottom;
}
.UIDashboard .DashboardContainer {
@@ -514,30 +513,30 @@
#UIAddGadgetPopup .PopupTitle {
margin-left: 22px;
}
-/*----------------------UIDashboardMask-------------------*/
+/*----------------------Maximized-------------------*/
-.UIDashboardMask .UIGadget {
+.Maximized .UIGadget {
padding: 5px;
margin: 0px;
}
-.UIDashboardMask .UIGadget .GadgetControl {
+.Maximized .UIGadget .GadgetControl {
float: none;
padding: 0px;
height: auto; width: auto;
}
-.UIDashboardMask .UIGadget .GadgetControl .LeftControlBar {
+.Maximized .UIGadget .GadgetControl .LeftControlBar {
background: none;
padding: 0px;
}
-.UIDashboardMask .UIGadget .GadgetControl .RightControlBar {
+.Maximized .UIGadget .GadgetControl .RightControlBar {
background: none;
padding: 0px;
}
-.UIDashboardMask .UIGadget .GadgetControl .CenterControlBar {
+.Maximized .UIGadget .GadgetControl .CenterControlBar {
background: url('background/BgTitleGadget.gif') repeat-x left top;
height: 23px;
line-height: 23px;
@@ -546,31 +545,31 @@
border-top: none;
}
-.UIDashboardMask .UIGadget .GadgetControl .GadgetDragHandleArea {
+.Maximized .UIGadget .GadgetControl .GadgetDragHandleArea {
display: none;
}
-.UIDashboardMask .UIGadget .TLGadget {
+.Maximized .UIGadget .TLGadget {
display: none;
}
-.UIDashboardMask .UIGadget .MLGadget {
+.Maximized .UIGadget .MLGadget {
background: #f2f2f3;
border: 1px solid #c3c3c3;
border-top: none;
padding: 3px;
}
-.UIDashboardMask .UIGadget .MRGadget {
+.Maximized .UIGadget .MRGadget {
background: white;
padding: 0 0 1px;
}
-.UIDashboardMask .UIGadget .BLGadget {
+.Maximized .UIGadget .BLGadget {
display: none;
}
-.UIDashboardMask .GadgetTitle {
+.Maximized .GadgetTitle {
float: left; /* orientation=lt */
float: right; /* orientation=rt */
padding: 0px 5px;
@@ -581,6 +580,6 @@
white-space: nowrap;
}
-.UIDashboardMask iframe {
+.Maximized iframe {
width: 100%;
}
\ No newline at end of file
Modified: portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIPopup/UIPopupWindow/Stylesheet.css
===================================================================
--- portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIPopup/UIPopupWindow/Stylesheet.css 2009-10-29 17:39:04 UTC (rev 442)
+++ portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIPopup/UIPopupWindow/Stylesheet.css 2009-10-29 18:14:44 UTC (rev 443)
@@ -105,6 +105,7 @@
float: left; /* orientation=rt */
cursor: nw-resize; /* orientation=lt */
cursor: ne-resize; /* orientation=rt */
+ margin-top:-29px;
}
.UIPopupWindow .BottomLeftCornerDecorator {
@@ -179,8 +180,8 @@
}
.UIPortalComposer .SaveButton {
- background: transparent url(background/SaveIcon.gif) no-repeat scroll right bottom; /* orientation=lt */
- background: transparent url(background/SaveIcon-rt.gif) no-repeat scroll left bottom; /* orientation=rt */
+ background: transparent url(background/UnSaveIcon.gif) no-repeat scroll right bottom; /* orientation=lt */
+ background: transparent url(background/UnSaveIcon-rt.gif) no-repeat scroll left bottom; /* orientation=rt */
cursor: pointer;
float: right; /* orientation=lt */
float: left; /* orientation=rt */
@@ -190,8 +191,8 @@
}
.UIPortalComposer .EdittedSaveButton {
- background: transparent url(background/UnSaveIcon.gif) no-repeat scroll right bottom; /* orientation=lt */
- background: transparent url(background/UnSaveIcon-rt.gif) no-repeat scroll left bottom; /* orientation=rt */
+ background: transparent url(background/SaveIcon.gif) no-repeat scroll right bottom; /* orientation=lt */
+ background: transparent url(background/SaveIcon-rt.gif) no-repeat scroll left bottom; /* orientation=rt */
cursor: pointer;
float: right; /* orientation=lt */
float: left; /* orientation=rt */
@@ -246,6 +247,10 @@
height: 50px;
}
+.UIPortalComposer .BCPortalComposer .UIAction {
+ height: 50px;
+}
+
.UIPortalComposer .Bottom {
border-bottom: 1px solid #a2a3a9;
}
Modified: portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/conf/portal/application-registry-configuration.xml
===================================================================
--- portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/conf/portal/application-registry-configuration.xml 2009-10-29 17:39:04 UTC (rev 442)
+++ portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/conf/portal/application-registry-configuration.xml 2009-10-29 18:14:44 UTC (rev 443)
@@ -25,327 +25,510 @@
xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
- <component>
- <key>org.exoplatform.application.gadget.GadgetRegistryService</key>
- <type>org.exoplatform.application.gadget.jcr.GadgetRegistryServiceImpl</type>
- <init-params>
- <value-param>
- <name>gadgets.country</name>
- <description>US</description>
- <value>US</value>
- </value-param>
-
- <value-param>
- <name>gadgets.language</name>
- <description>en</description>
- <value>en</value>
- </value-param>
-
- <value-param>
- <name>gadgets.moduleId</name>
- <description>0</description>
- <value>0</value>
- </value-param>
-
- <value-param>
- <name>gadgets.hostName</name>
- <description>Gadget server url</description>
- <value>eXoGadgetServer/gadgets</value>
- </value-param>
-
- <properties-param>
- <name>developerInfo</name>
- <description>The group that is allowed to develop gadgets</description>
- <property name="developer.group" value="/platform/administrators"></property>
- </properties-param>
- </init-params>
- </component>
+ <component>
+ <key>org.exoplatform.application.gadget.GadgetRegistryService</key>
+ <type>org.exoplatform.application.gadget.jcr.GadgetRegistryServiceImpl</type>
+ <init-params>
+ <value-param>
+ <name>gadgets.country</name>
+ <description>US</description>
+ <value>US</value>
+ </value-param>
- <component>
- <key>org.exoplatform.application.gadget.SourceStorage</key>
- <type>org.exoplatform.application.gadget.jcr.SourceStorageImpl</type>
- <init-params>
- <properties-param>
- <name>location</name>
- <description>The location store source of gadgets</description>
- <property name="repository" value="repository"></property>
- <property name="workspace" value="gadgets"></property>
- <property name="store.path" value="/"></property>
- </properties-param>
- </init-params>
- </component>
-
- <component>
- <key>org.exoplatform.application.registry.ApplicationRegistryService</key>
- <type>org.exoplatform.application.registry.jcr.ApplicationRegistryServiceImpl</type>
- <component-plugins>
- <component-plugin>
- <name>new.portal.portlets.registry</name>
- <set-method>initListener</set-method>
- <type>org.exoplatform.application.registry.ApplicationCategoriesPlugins</type>
- <description>this listener init the portlets are registered in PortletRegister</description>
- <init-params>
- <object-param>
- <name>administration</name>
- <description>description</description>
- <object type="org.exoplatform.application.registry.ApplicationCategory">
- <field name="name"><string>Administration</string></field>
- <field name="displayName"><string>Administration</string></field>
- <field name="description"><string>application for administration</string></field>
- <field name="accessPermissions">
- <collection type="java.util.ArrayList" item-type="java.lang.String">
- <value><string>*:/platform/administrators</string></value>
- <value><string>*:/organization/management/executive-board</string></value>
- </collection>
- </field>
- <field name="applications">
- <collection type="java.util.ArrayList">
- <value>
- <object type="org.exoplatform.application.registry.Application">
- <field name="applicationName"><string>ApplicationRegistryPortlet</string></field>
- <field name="categoryName"><string>administration</string></field>
- <field name="displayName"><string>Application Registry</string></field>
- <field name="description"><string>Application Registry</string></field>
- <field name="applicationType"><string>portlet</string></field>
- <field name="applicationGroup"><string>exoadmin</string></field>
- <field name="accessPermissions">
- <collection type="java.util.ArrayList" item-type="java.lang.String">
- <value><string>*:/platform/administrators</string></value>
- <value><string>*:/organization/management/executive-board</string></value>
- </collection>
- </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.application.registry.Application">
- <field name="applicationName"><string>OrganizationPortlet</string></field>
- <field name="categoryName"><string>administration</string></field>
- <field name="displayName"><string>Organization Management</string></field>
- <field name="description"><string>Organization Management</string></field>
- <field name="applicationType"><string>portlet</string></field>
- <field name="applicationGroup"><string>exoadmin</string></field>
- <field name="accessPermissions">
- <collection type="java.util.ArrayList" item-type="java.lang.String">
- <value><string>*:/platform/administrators</string></value>
- <value><string>*:/organization/management/executive-board</string></value>
- </collection>
- </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.application.registry.Application">
- <field name="applicationName"><string>AccountPortlet</string></field>
- <field name="categoryName"><string>administration</string></field>
- <field name="displayName"><string>New Account</string></field>
- <field name="description"><string>New Account</string></field>
- <field name="applicationType"><string>portlet</string></field>
- <field name="applicationGroup"><string>exoadmin</string></field>
- <field name="accessPermissions">
- <collection type="java.util.ArrayList" item-type="java.lang.String">
- <value><string>*:/platform/administrators</string></value>
- <value><string>*:/organization/management/executive-board</string></value>
- </collection>
- </field>
- </object>
- </value>
- </collection>
- </field>
- </object>
- </object-param>
-
- <object-param>
- <name>web</name>
- <description>description</description>
- <object type="org.exoplatform.application.registry.ApplicationCategory">
- <field name="name"><string>web</string></field>
- <field name="displayName"><string>web</string></field>
- <field name="description"><string>BasicPortlets</string></field>
- <field name="accessPermissions">
- <collection type="java.util.ArrayList" item-type="java.lang.String">
- <value><string>*:/platform/users</string></value>
- </collection>
- </field>
- <field name="applications">
- <collection type="java.util.ArrayList">
- <value>
- <object type="org.exoplatform.application.registry.Application">
- <field name="categoryName"><string>web</string></field>
- <field name="applicationName"><string>IFramePortlet</string></field>
- <field name="displayName"><string>IFrame</string></field>
- <field name="description"><string>IFrame</string></field>
- <field name="applicationType"><string>portlet</string></field>
- <field name="applicationGroup"><string>web</string></field>
- <field name="accessPermissions">
- <collection type="java.util.ArrayList" item-type="java.lang.String">
- <value><string>*:/platform/users</string></value>
- </collection>
- </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.application.registry.Application">
- <field name="categoryName"><string>web</string></field>
- <field name="applicationName"><string>SiteMapPortlet</string></field>
- <field name="displayName"><string>SiteMap</string></field>
- <field name="description"><string>SiteMap</string></field>
- <field name="applicationType"><string>portlet</string></field>
- <field name="applicationGroup"><string>web</string></field>
- <field name="accessPermissions">
- <collection type="java.util.ArrayList" item-type="java.lang.String">
- <value><string>*:/platform/users</string></value>
- </collection>
- </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.application.registry.Application">
- <field name="categoryName"><string>web</string></field>
- <field name="applicationName"><string>BrowserPortlet</string></field>
- <field name="displayName"><string>Web Explorer</string></field>
- <field name="description"><string>Web Explorer</string></field>
- <field name="applicationType"><string>portlet</string></field>
- <field name="applicationGroup"><string>web</string></field>
- <field name="accessPermissions">
- <collection type="java.util.ArrayList" item-type="java.lang.String">
- <value><string>*:/platform/users</string></value>
- </collection>
- </field>
- </object>
- </value>
- </collection>
- </field>
- </object>
- </object-param>
-
- <object-param>
- <name>dashboard</name>
- <description>description</description>
- <object type="org.exoplatform.application.registry.ApplicationCategory">
- <field name="name"><string>dashboard</string></field>
- <field name="displayName"><string>Dashboard</string></field>
- <field name="description"><string>Dashboard</string></field>
- <field name="accessPermissions">
- <collection type="java.util.ArrayList" item-type="java.lang.String">
- <value><string>*:/platform/users</string></value>
- </collection>
- </field>
- <field name="applications">
- <collection type="java.util.ArrayList">
- <value>
- <object type="org.exoplatform.application.registry.Application">
- <field name="categoryName"><string>dashboard</string></field>
- <field name="applicationName"><string>DashboardPortlet</string></field>
- <field name="displayName"><string>Dashboard Portlet</string></field>
- <field name="description"><string>Dashboard Portlet</string></field>
- <field name="applicationType"><string>portlet</string></field>
- <field name="applicationGroup"><string>dashboard</string></field>
- <field name="accessPermissions">
- <collection type="java.util.ArrayList" item-type="java.lang.String">
- <value><string>*:/platform/users</string></value>
- </collection>
- </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.application.registry.Application">
- <field name="categoryName"><string>dashboard</string></field>
- <field name="applicationName"><string>GadgetPortlet</string></field>
- <field name="displayName"><string>Gadget Wrapper Portlet</string></field>
- <field name="description"><string>Gadget Wrapper Portlet</string></field>
- <field name="applicationType"><string>portlet</string></field>
- <field name="applicationGroup"><string>dashboard</string></field>
- <field name="accessPermissions">
- <collection type="java.util.ArrayList" item-type="java.lang.String">
- <value><string>*:/platform/users</string></value>
- </collection>
- </field>
- </object>
- </value>
- </collection>
- </field>
- </object>
- </object-param>
-
- <object-param>
- <name>eXoGadgets</name>
- <description>Gadgets</description>
- <object type="org.exoplatform.application.registry.ApplicationCategory">
- <field name="name"><string>eXoGadgets</string></field>
- <field name="displayName"><string>Gadgets</string></field>
- <field name="description"><string>Gadgets</string></field>
- <field name="accessPermissions">
- <collection type="java.util.ArrayList" item-type="java.lang.String">
- <value><string>*:/platform/users</string></value>
- </collection>
- </field>
- <field name="applications">
- <collection type="java.util.ArrayList">
- <value>
- <object type="org.exoplatform.application.registry.Application">
- <field name="categoryName"><string>eXoGadgets</string></field>
- <field name="applicationName"><string>Todo</string></field>
- <field name="displayName"><string>Todo</string></field>
- <field name="description"><string>ToDo Gadget, easily manage and track your daily to-do list.</string></field>
- <field name="applicationType"><string>eXoGadget</string></field>
- <field name="applicationGroup"><string>eXoGadgets</string></field>
- <field name="accessPermissions">
- <collection type="java.util.ArrayList" item-type="java.lang.String">
- <value><string>*:/platform/users</string></value>
- </collection>
- </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.application.registry.Application">
- <field name="categoryName"><string>eXoGadgets</string></field>
- <field name="applicationName"><string>Calendar</string></field>
- <field name="displayName"><string>Calendar</string></field>
- <field name="description"><string>What date is it? Use this cool calendar to keep track of the date in style. You can switch easily between daily, monthly or yearly view.</string></field>
- <field name="applicationType"><string>eXoGadget</string></field>
- <field name="applicationGroup"><string>eXoGadgets</string></field>
- <field name="accessPermissions">
- <collection type="java.util.ArrayList" item-type="java.lang.String">
- <value><string>*:/platform/users</string></value>
- </collection>
- </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.application.registry.Application">
- <field name="categoryName"><string>eXoGadgets</string></field>
- <field name="applicationName"><string>Calculator</string></field>
- <field name="displayName"><string>Calculator</string></field>
- <field name="description"><string>This simple and useful calculator lets you perform most of the basic arithmetic operations.</string></field>
- <field name="applicationType"><string>eXoGadget</string></field>
- <field name="applicationGroup"><string>eXoGadgets</string></field>
- <field name="accessPermissions">
- <collection type="java.util.ArrayList" item-type="java.lang.String">
- <value><string>*:/platform/users</string></value>
- </collection>
- </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.application.registry.Application">
- <field name="categoryName"><string>eXoGadgets</string></field>
- <field name="applicationName"><string>rssAggregator</string></field>
- <field name="displayName"><string>Rss Reader</string></field>
- <field name="description"><string>Rss Reader</string></field>
- <field name="applicationType"><string>eXoGadget</string></field>
- <field name="applicationGroup"><string>eXoGadgets</string></field>
- <field name="accessPermissions">
- <collection type="java.util.ArrayList" item-type="java.lang.String">
- <value><string>*:/platform/users</string></value>
- </collection>
- </field>
- </object>
- </value>
- </collection>
- </field>
- </object>
- </object-param>
- </init-params>
- </component-plugin>
- </component-plugins>
- </component>
+ <value-param>
+ <name>gadgets.language</name>
+ <description>en</description>
+ <value>en</value>
+ </value-param>
+
+ <value-param>
+ <name>gadgets.moduleId</name>
+ <description>0</description>
+ <value>0</value>
+ </value-param>
+
+ <value-param>
+ <name>gadgets.hostName</name>
+ <description>Gadget server url</description>
+ <value>eXoGadgetServer/gadgets</value>
+ </value-param>
+
+ <properties-param>
+ <name>developerInfo</name>
+ <description>The group that is allowed to develop gadgets</description>
+ <property name="developer.group" value="/platform/administrators"></property>
+ </properties-param>
+ </init-params>
+ </component>
+
+ <component>
+ <key>org.exoplatform.application.gadget.SourceStorage</key>
+ <type>org.exoplatform.application.gadget.jcr.SourceStorageImpl</type>
+ <init-params>
+ <properties-param>
+ <name>location</name>
+ <description>The location store source of gadgets</description>
+ <property name="repository" value="repository"></property>
+ <property name="workspace" value="gadgets"></property>
+ <property name="store.path" value="/"></property>
+ </properties-param>
+ </init-params>
+ </component>
+
+ <component>
+ <key>org.exoplatform.application.registry.ApplicationRegistryService</key>
+ <type>org.exoplatform.application.registry.jcr.ApplicationRegistryServiceImpl</type>
+ <component-plugins>
+ <component-plugin>
+ <name>new.portal.portlets.registry</name>
+ <set-method>initListener</set-method>
+ <type>org.exoplatform.application.registry.ApplicationCategoriesPlugins</type>
+ <description>this listener init the portlets are registered in PortletRegister</description>
+ <init-params>
+ <object-param>
+ <name>administration</name>
+ <description>description</description>
+ <object type="org.exoplatform.application.registry.ApplicationCategory">
+ <field name="name">
+ <string>Administration</string>
+ </field>
+ <field name="displayName">
+ <string>Administration</string>
+ </field>
+ <field name="description">
+ <string>application for administration</string>
+ </field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList" item-type="java.lang.String">
+ <value>
+ <string>*:/platform/administrators</string>
+ </value>
+ <value>
+ <string>*:/organization/management/executive-board</string>
+ </value>
+ </collection>
+ </field>
+ <field name="applications">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object type="org.exoplatform.application.registry.Application">
+ <field name="applicationName">
+ <string>ApplicationRegistryPortlet</string>
+ </field>
+ <field name="categoryName">
+ <string>administration</string>
+ </field>
+ <field name="displayName">
+ <string>Application Registry</string>
+ </field>
+ <field name="description">
+ <string>Application Registry</string>
+ </field>
+ <field name="applicationType">
+ <string>portlet</string>
+ </field>
+ <field name="applicationGroup">
+ <string>exoadmin</string>
+ </field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList" item-type="java.lang.String">
+ <value>
+ <string>*:/platform/administrators</string>
+ </value>
+ <value>
+ <string>*:/organization/management/executive-board</string>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.application.registry.Application">
+ <field name="applicationName">
+ <string>OrganizationPortlet</string>
+ </field>
+ <field name="categoryName">
+ <string>administration</string>
+ </field>
+ <field name="displayName">
+ <string>Organization Management</string>
+ </field>
+ <field name="description">
+ <string>Organization Management</string>
+ </field>
+ <field name="applicationType">
+ <string>portlet</string>
+ </field>
+ <field name="applicationGroup">
+ <string>exoadmin</string>
+ </field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList" item-type="java.lang.String">
+ <value>
+ <string>*:/platform/administrators</string>
+ </value>
+ <value>
+ <string>*:/organization/management/executive-board</string>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.application.registry.Application">
+ <field name="applicationName">
+ <string>AccountPortlet</string>
+ </field>
+ <field name="categoryName">
+ <string>administration</string>
+ </field>
+ <field name="displayName">
+ <string>New Account</string>
+ </field>
+ <field name="description">
+ <string>New Account</string>
+ </field>
+ <field name="applicationType">
+ <string>portlet</string>
+ </field>
+ <field name="applicationGroup">
+ <string>exoadmin</string>
+ </field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList" item-type="java.lang.String">
+ <value>
+ <string>*:/platform/administrators</string>
+ </value>
+ <value>
+ <string>*:/organization/management/executive-board</string>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+
+ <object-param>
+ <name>web</name>
+ <description>description</description>
+ <object type="org.exoplatform.application.registry.ApplicationCategory">
+ <field name="name">
+ <string>web</string>
+ </field>
+ <field name="displayName">
+ <string>web</string>
+ </field>
+ <field name="description">
+ <string>BasicPortlets</string>
+ </field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList" item-type="java.lang.String">
+ <value>
+ <string>*:/platform/users</string>
+ </value>
+ </collection>
+ </field>
+ <field name="applications">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object type="org.exoplatform.application.registry.Application">
+ <field name="categoryName">
+ <string>web</string>
+ </field>
+ <field name="applicationName">
+ <string>IFramePortlet</string>
+ </field>
+ <field name="displayName">
+ <string>IFrame</string>
+ </field>
+ <field name="description">
+ <string>IFrame</string>
+ </field>
+ <field name="applicationType">
+ <string>portlet</string>
+ </field>
+ <field name="applicationGroup">
+ <string>web</string>
+ </field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList" item-type="java.lang.String">
+ <value>
+ <string>*:/platform/users</string>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.application.registry.Application">
+ <field name="categoryName">
+ <string>web</string>
+ </field>
+ <field name="applicationName">
+ <string>SiteMapPortlet</string>
+ </field>
+ <field name="displayName">
+ <string>SiteMap</string>
+ </field>
+ <field name="description">
+ <string>SiteMap</string>
+ </field>
+ <field name="applicationType">
+ <string>portlet</string>
+ </field>
+ <field name="applicationGroup">
+ <string>web</string>
+ </field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList" item-type="java.lang.String">
+ <value>
+ <string>*:/platform/users</string>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+
+ <object-param>
+ <name>dashboard</name>
+ <description>description</description>
+ <object type="org.exoplatform.application.registry.ApplicationCategory">
+ <field name="name">
+ <string>dashboard</string>
+ </field>
+ <field name="displayName">
+ <string>Dashboard</string>
+ </field>
+ <field name="description">
+ <string>Dashboard</string>
+ </field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList" item-type="java.lang.String">
+ <value>
+ <string>*:/platform/users</string>
+ </value>
+ </collection>
+ </field>
+ <field name="applications">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object type="org.exoplatform.application.registry.Application">
+ <field name="categoryName">
+ <string>dashboard</string>
+ </field>
+ <field name="applicationName">
+ <string>DashboardPortlet</string>
+ </field>
+ <field name="displayName">
+ <string>Dashboard Portlet</string>
+ </field>
+ <field name="description">
+ <string>Dashboard Portlet</string>
+ </field>
+ <field name="applicationType">
+ <string>portlet</string>
+ </field>
+ <field name="applicationGroup">
+ <string>dashboard</string>
+ </field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList" item-type="java.lang.String">
+ <value>
+ <string>*:/platform/users</string>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.application.registry.Application">
+ <field name="categoryName">
+ <string>dashboard</string>
+ </field>
+ <field name="applicationName">
+ <string>GadgetPortlet</string>
+ </field>
+ <field name="displayName">
+ <string>Gadget Wrapper Portlet</string>
+ </field>
+ <field name="description">
+ <string>Gadget Wrapper Portlet</string>
+ </field>
+ <field name="applicationType">
+ <string>portlet</string>
+ </field>
+ <field name="applicationGroup">
+ <string>dashboard</string>
+ </field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList" item-type="java.lang.String">
+ <value>
+ <string>*:/platform/users</string>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+
+ <object-param>
+ <name>eXoGadgets</name>
+ <description>Gadgets</description>
+ <object type="org.exoplatform.application.registry.ApplicationCategory">
+ <field name="name">
+ <string>eXoGadgets</string>
+ </field>
+ <field name="displayName">
+ <string>Gadgets</string>
+ </field>
+ <field name="description">
+ <string>Gadgets</string>
+ </field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList" item-type="java.lang.String">
+ <value>
+ <string>*:/platform/users</string>
+ </value>
+ </collection>
+ </field>
+ <field name="applications">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object type="org.exoplatform.application.registry.Application">
+ <field name="categoryName">
+ <string>eXoGadgets</string>
+ </field>
+ <field name="applicationName">
+ <string>Todo</string>
+ </field>
+ <field name="displayName">
+ <string>Todo</string>
+ </field>
+ <field name="description">
+ <string>ToDo Gadget, easily manage and track your daily to-do list.</string>
+ </field>
+ <field name="applicationType">
+ <string>eXoGadget</string>
+ </field>
+ <field name="applicationGroup">
+ <string>eXoGadgets</string>
+ </field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList" item-type="java.lang.String">
+ <value>
+ <string>*:/platform/users</string>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.application.registry.Application">
+ <field name="categoryName">
+ <string>eXoGadgets</string>
+ </field>
+ <field name="applicationName">
+ <string>Calendar</string>
+ </field>
+ <field name="displayName">
+ <string>Calendar</string>
+ </field>
+ <field name="description">
+ <string>What date is it? Use this cool calendar to keep track of the date in style.
+ You can switch easily between daily, monthly or yearly view.
+ </string>
+ </field>
+ <field name="applicationType">
+ <string>eXoGadget</string>
+ </field>
+ <field name="applicationGroup">
+ <string>eXoGadgets</string>
+ </field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList" item-type="java.lang.String">
+ <value>
+ <string>*:/platform/users</string>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.application.registry.Application">
+ <field name="categoryName">
+ <string>eXoGadgets</string>
+ </field>
+ <field name="applicationName">
+ <string>Calculator</string>
+ </field>
+ <field name="displayName">
+ <string>Calculator</string>
+ </field>
+ <field name="description">
+ <string>This simple and useful calculator lets you perform most of the basic
+ arithmetic operations.
+ </string>
+ </field>
+ <field name="applicationType">
+ <string>eXoGadget</string>
+ </field>
+ <field name="applicationGroup">
+ <string>eXoGadgets</string>
+ </field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList" item-type="java.lang.String">
+ <value>
+ <string>*:/platform/users</string>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.application.registry.Application">
+ <field name="categoryName">
+ <string>eXoGadgets</string>
+ </field>
+ <field name="applicationName">
+ <string>rssAggregator</string>
+ </field>
+ <field name="displayName">
+ <string>Rss Reader</string>
+ </field>
+ <field name="description">
+ <string>Rss Reader</string>
+ </field>
+ <field name="applicationType">
+ <string>eXoGadget</string>
+ </field>
+ <field name="applicationGroup">
+ <string>eXoGadgets</string>
+ </field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList" item-type="java.lang.String">
+ <value>
+ <string>*:/platform/users</string>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component-plugin>
+ </component-plugins>
+ </component>
</configuration>
\ No newline at end of file
Modified: portal/branches/wsrp-integration/web/portal/src/main/webapp/groovy/webui/core/UIPopupWindow.gtmpl
===================================================================
--- portal/branches/wsrp-integration/web/portal/src/main/webapp/groovy/webui/core/UIPopupWindow.gtmpl 2009-10-29 17:39:04 UTC (rev 442)
+++ portal/branches/wsrp-integration/web/portal/src/main/webapp/groovy/webui/core/UIPopupWindow.gtmpl 2009-10-29 18:14:44 UTC (rev 443)
@@ -7,15 +7,19 @@
* version: $Id$
*/
%>
-<%
+<%
component = uicomponent.getUIComponent();
boolean showCloseButton = uicomponent.isShowCloseButton()
String popupId = uicomponent.getId();
+ String rsId = popupId;
+ if(popupId.indexOf('-')>0){
+ rsId = popupId.substring(0,popupId.lastIndexOf('-'));
+ }
def rcontext = _ctx.getRequestContext();
rcontext.getJavascriptManager().importJavascript('eXo.webui.UIPopupWindow');
rcontext.getJavascriptManager().addJavascript("eXo.webui.UIPopupWindow.init('$popupId', $uicomponent.show, $uicomponent.resizable, true, $uicomponent.showMask);");
- String title = popupId;
+ String title = rsId;
if(component != null) title = component.getId();
int width = uicomponent.getWindowWidth();
@@ -41,7 +45,7 @@
<% } else { %>
<div class="PopupTitleIconRight"><span></span></div>
<% } %>
- <div class="PopupTitle"><%=_ctx.appRes(popupId + ".title."+ title)%></div>
+ <div class="PopupTitle"><%=_ctx.appRes(rsId + ".title."+ title)%></div>
</div>
</div>
</div>
Modified: portal/branches/wsrp-integration/webui/core/src/main/java/org/exoplatform/webui/core/lifecycle/UIFormLifecycle.java
===================================================================
--- portal/branches/wsrp-integration/webui/core/src/main/java/org/exoplatform/webui/core/lifecycle/UIFormLifecycle.java 2009-10-29 17:39:04 UTC (rev 442)
+++ portal/branches/wsrp-integration/webui/core/src/main/java/org/exoplatform/webui/core/lifecycle/UIFormLifecycle.java 2009-10-29 18:14:44 UTC (rev 443)
@@ -1,16 +1,16 @@
/**
* Copyright (C) 2009 eXo Platform SAS.
- *
+ *
* 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
@@ -36,11 +36,7 @@
import java.util.ArrayList;
import java.util.List;
-/**
- * Author : Nhu Dinh Thuan
- * nhudinhthuan(a)yahoo.com
- * Jun 1, 2006
- */
+/** Author : Nhu Dinh Thuan nhudinhthuan(a)yahoo.com Jun 1, 2006 */
public class UIFormLifecycle extends Lifecycle<UIForm>
{
@@ -64,29 +60,43 @@
{
Event<UIComponent> event = uicomponent.createEvent(action, Event.Phase.DECODE, context);
if (event != null)
+ {
event.broadcast();
+ }
return;
}
UIComponent uiSubComponent = uicomponent.findComponentById(subComponentId);
Event<UIComponent> event = uiSubComponent.createEvent(action, Event.Phase.DECODE, context);
+ if (event == null)
+ {
+ event = uicomponent.createEvent(action, Event.Phase.DECODE, context);
+ }
if (event != null)
+ {
event.broadcast();
+ }
}
public void processAction(UIForm uicomponent, WebuiRequestContext context) throws Exception
{
String action = context.getRequestParameter(UIForm.ACTION);
if (action == null)
+ {
action = uicomponent.getSubmitAction();
+ }
if (action == null)
+ {
return;
+ }
Event<UIComponent> event = uicomponent.createEvent(action, Event.Phase.PROCESS, context);
if (event == null)
{
- event = uicomponent.<UIComponent> getParent().createEvent(action, Event.Phase.PROCESS, context);
+ event = uicomponent.<UIComponent>getParent().createEvent(action, Event.Phase.PROCESS, context);
}
if (event == null)
+ {
return;
+ }
UIApplication uiApp = uicomponent.getAncestorOfType(UIApplication.class);
List<UIComponent> children = uicomponent.getChildren();
validateChildren(children, uiApp, context);
@@ -121,7 +131,9 @@
for (UIFormInputBase input : inputs)
{
if (!input.isValid())
+ {
continue;
+ }
String inputValue = context.getRequestParameter(input.getId());
if (inputValue == null || inputValue.trim().length() == 0)
{
@@ -167,14 +179,20 @@
{
UIFormInputBase uiInput = (UIFormInputBase)uiChild;
if (!uiInput.isValid())
+ {
continue;
+ }
List<Validator> validators = uiInput.getValidators();
if (validators == null)
+ {
continue;
+ }
try
{
for (Validator validator : validators)
+ {
validator.validate(uiInput);
+ }
}
catch (MessageException ex)
{
@@ -198,7 +216,9 @@
UIFormMultiValueInputSet uiInput = (UIFormMultiValueInputSet)uiChild;
List<Validator> validators = uiInput.getValidators();
if (validators == null)
+ {
continue;
+ }
try
{
for (Validator validator : validators)
@@ -230,11 +250,15 @@
UIFormInputContainer uiInput = (UIFormInputContainer)uiChild;
List<Validator> validators = uiInput.getValidators();
if (validators == null)
+ {
continue;
+ }
try
{
for (Validator validator : validators)
+ {
validator.validate(uiInput);
+ }
}
catch (MessageException ex)
{
Modified: portal/branches/wsrp-integration/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIListPermissionSelector.java
===================================================================
--- portal/branches/wsrp-integration/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIListPermissionSelector.java 2009-10-29 17:39:04 UTC (rev 442)
+++ portal/branches/wsrp-integration/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIListPermissionSelector.java 2009-10-29 18:14:44 UTC (rev 443)
@@ -1,16 +1,16 @@
/**
* Copyright (C) 2009 eXo Platform SAS.
- *
+ *
* 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
@@ -32,8 +32,8 @@
import org.exoplatform.webui.core.UIPageIterator;
import org.exoplatform.webui.core.UITree;
import org.exoplatform.webui.event.Event;
+import org.exoplatform.webui.event.Event.Phase;
import org.exoplatform.webui.event.EventListener;
-import org.exoplatform.webui.event.Event.Phase;
import org.exoplatform.webui.exception.MessageException;
import org.exoplatform.webui.form.UIForm;
import org.exoplatform.webui.form.UIFormCheckBoxInput;
@@ -48,14 +48,8 @@
import java.util.MissingResourceException;
import java.util.ResourceBundle;
-/**
- * Created by The eXo Platform SARL
- * Author : Pham Dung Ha
- * ha.pham(a)exoplatform.com
- * May 7, 2007
- */
+/** Created by The eXo Platform SARL Author : Pham Dung Ha ha.pham(a)exoplatform.com May 7, 2007o */
@ComponentConfig(template = "system:/groovy/organization/webui/component/UIListPermissionSelector.gtmpl", events = {
- @EventConfig(phase = Phase.DECODE, listeners = UIListPermissionSelector.CloseActionListener.class),
@EventConfig(phase = Phase.DECODE, listeners = UIListPermissionSelector.DeleteActionListener.class, confirm = "UIAccessGroup.deleteAccessGroup"),
@EventConfig(phase = Phase.DECODE, listeners = UIPermissionSelector.SelectMembershipActionListener.class),
@EventConfig(phase = Phase.DECODE, listeners = UIListPermissionSelector.ChangePublicModeActionListener.class)})
@@ -103,7 +97,9 @@
{
Permission per = (Permission)ele;
if (per.getExpression().equals(permission.getExpression()))
+ {
return true;
+ }
}
return false;
}
@@ -119,7 +115,9 @@
public String[] getValue() throws Exception
{
if (publicMode_)
+ {
return new String[]{UserACL.EVERYONE};
+ }
UIPageIterator uiIterator = getChild(UIGrid.class).getUIPageIterator();
List<Object> values = uiIterator.getPageList().getAll();
String[] expPermissions = new String[values.size()];
@@ -145,11 +143,15 @@
break;
}
if (exp.trim().length() < 1)
+ {
continue;
+ }
Permission permission = new Permission();
permission.setPermissionExpression(exp);
if (existsPermission(list, permission))
+ {
continue;
+ }
list.add(permission);
}
UIPageIterator uiIterator = getChild(UIGrid.class).getUIPageIterator();
@@ -179,7 +181,9 @@
public void setMembership(String groupId, String membershipType) throws Exception
{
if (groupId.trim().length() < 1 || membershipType.trim().length() < 1)
+ {
return;
+ }
Permission permission = new Permission();
permission.setExpression(membershipType + ":" + groupId);
permission.setGroupId(groupId);
@@ -188,7 +192,9 @@
UIPageIterator uiIterator = getChild(UIGrid.class).getUIPageIterator();
list.addAll(uiIterator.getPageList().getAll());
if (existsPermission(list, permission))
+ {
return;
+ }
list.add(permission);
uiIterator.setPageList(new LazyPageList(new AccessGroupListAccess(list), 10));
}
@@ -228,7 +234,9 @@
UIFormGrid uiGrid = getChild(UIFormGrid.class);
uiGrid.setRendered(!publicMode_);
if (publicMode_)
+ {
uiGrid.getUIPageIterator().setPageList(new LazyPageList(new AccessGroupListAccess(null), 10));
+ }
}
static public class DeleteActionListener extends EventListener<UIListPermissionSelector>
@@ -245,7 +253,9 @@
UIForm uiForm = uiPermissions.getAncestorOfType(UIForm.class);
uiForm.broadcast(event, event.getExecutionPhase());
while (currentPage > pageIterator.getAvailablePage())
+ {
currentPage--;
+ }
pageIterator.setCurrentPage(currentPage);
event.getRequestContext().addUIComponentToUpdateByAjax(uiForm.getParent());
}
@@ -269,7 +279,9 @@
UIForm uiForm = uicom.getAncestorOfType(UIForm.class);
UIPermissionSelector uiPermission = uiForm.findFirstComponentOfType(UIPermissionSelector.class);
if (uiPermission != null)
+ {
uiPermission.setRendered(false);
+ }
if (uiForm != null)
{
uiForm.broadcast(event, event.getExecutionPhase());
@@ -279,19 +291,6 @@
}
}
-
- static public class CloseActionListener extends EventListener<UIListPermissionSelector>
- {
- public void execute(Event<UIListPermissionSelector> event) throws Exception
- {
- UIListPermissionSelector uicom = event.getSource();
- UIForm uiForm = uicom.getAncestorOfType(UIForm.class);
- if (uiForm != null)
- {
- uiForm.broadcast(event, event.getExecutionPhase());
- }
- }
- }
static public class EmptyIteratorValidator implements Validator
{
@@ -299,7 +298,9 @@
{
UIListPermissionSelector uiInputContainer = (UIListPermissionSelector)uiInput;
if (uiInputContainer.isPublicMode())
+ {
return;
+ }
UIFormPageIterator uiInputIterator = uiInputContainer.findFirstComponentOfType(UIFormPageIterator.class);
if (uiInputIterator.getAvailable() < 1)
{
Modified: portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/application/PortalStateManager.java
===================================================================
--- portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/application/PortalStateManager.java 2009-10-29 17:39:04 UTC (rev 442)
+++ portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/application/PortalStateManager.java 2009-10-29 18:14:44 UTC (rev 443)
@@ -1,16 +1,16 @@
/**
* Copyright (C) 2009 eXo Platform SAS.
- *
+ *
* 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
@@ -34,28 +34,26 @@
import org.exoplatform.webui.application.portlet.PortletRequestContext;
import org.exoplatform.webui.core.UIApplication;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpSession;
-
public class PortalStateManager extends StateManager
{
protected static Log log = ExoLogger.getLogger("portal:PortalStateManager");
- private ConcurrentMap<String, PortalApplicationState> uiApplications =
- new ConcurrentHashMap<String, PortalApplicationState>();
+ /** ConcurrentMap<SessionId, HashMap<PortalName, PortalApplicationState>> * */
+ private ConcurrentMap<String, HashMap<String, PortalApplicationState>> uiApplications =
+ new ConcurrentHashMap<String, HashMap<String, PortalApplicationState>>();
/**
- * This method is used to restore the UI component tree either the current request targets a portlet
- * or the portal.
- *
- * In both cases, if the tree is not stored already it is created and then stored in a local Map
- *
+ * This method is used to restore the UI component tree either the current request targets a portlet or the portal.
+ * <p/>
+ * In both cases, if the tree is not stored already it is created and then stored in a local Map
*/
@SuppressWarnings("unchecked")
public UIApplication restoreUIRootComponent(WebuiRequestContext context) throws Exception
@@ -66,17 +64,19 @@
/*
* If the request context is of type PortletRequestContext, we extract the parent context which will
* allow to get access to the PortalApplicationState object thanks to the session id used as the key for the
- * syncronised Map uiApplications
+ * synchronize Map uiApplications
*/
if (context instanceof PortletRequestContext)
{
WebuiRequestContext preqContext = (WebuiRequestContext)context.getParentAppRequestContext();
- PortalApplicationState state = uiApplications.get(preqContext.getSessionId());
PortletRequestContext pcontext = (PortletRequestContext)context;
String key = pcontext.getApplication().getApplicationId() + "/" + pcontext.getWindowId();
+ PortalApplicationState state = getApplicationState(preqContext);
UIApplication uiApplication = state.get(key);
if (uiApplication != null)
+ {
return uiApplication;
+ }
ConfigurationManager cmanager = app.getConfigurationManager();
String uirootClass = cmanager.getApplication().getUIRootComponent();
Class type = Thread.currentThread().getContextClassLoader().loadClass(uirootClass);
@@ -86,11 +86,10 @@
}
PortalRequestContext pcontext = (PortalRequestContext)context;
- PortalApplicationState state = uiApplications.get(pcontext.getSessionId());
+ PortalApplicationState state = getApplicationState(pcontext);
if (state != null)
{
- if ((!(Safe.equals(pcontext.getRemoteUser(), state.getUserName())))
- || (!pcontext.getPortalOwner().equals(state.getUIPortalApplication().getOwner())))
+ if (!Safe.equals(pcontext.getRemoteUser(), state.getUserName()))
{
clearSession(pcontext.getRequest().getSession());
state = null;
@@ -119,7 +118,7 @@
pcontext.setAttribute(UserPortalConfig.class, config);
UIPortalApplication uiApplication = (UIPortalApplication)app.createUIComponent(type, null, null, context);
state = new PortalApplicationState(uiApplication, pcontext.getRemoteUser());
- uiApplications.put(context.getSessionId(), state);
+ cacheApplicationState(pcontext.getSessionId(), pcontext.getPortalOwner(), state);
SessionManagerContainer pcontainer = (SessionManagerContainer)app.getApplicationServiceContainer();
pcontainer.createSessionContainer(context.getSessionId(), uiApplication.getOwner());
}
@@ -133,15 +132,40 @@
public void expire(String sessionId, WebuiApplication app)
{
- PortalApplicationState state = uiApplications.remove(sessionId);
- if (state != null)
- {
- log.warn("Session expires, remove application: " + state.getUIPortalApplication());
- }
+ uiApplications.remove(sessionId);
SessionManagerContainer pcontainer = (SessionManagerContainer)app.getApplicationServiceContainer();
pcontainer.removeSessionContainer(sessionId);
}
+ private PortalApplicationState getApplicationState(WebuiRequestContext context)
+ {
+ PortalRequestContext portalContext = null;
+ if (context instanceof PortalRequestContext)
+ {
+ portalContext = (PortalRequestContext)context;
+ }
+ else
+ {
+ portalContext = (PortalRequestContext)context.getParentAppRequestContext();
+ }
+ String portalName = portalContext.getPortalOwner();
+ String sessionId = portalContext.getSessionId();
+
+ HashMap<String, PortalApplicationState> appStates = uiApplications.get(sessionId);
+ return (appStates == null) ? null : appStates.get(portalName);
+ }
+
+ private void cacheApplicationState(String sessionId, String portalName, PortalApplicationState state)
+ {
+ HashMap<String, PortalApplicationState> appStates = uiApplications.get(sessionId);
+ if (appStates == null)
+ {
+ appStates = new HashMap<String, PortalApplicationState>();
+ uiApplications.put(sessionId, appStates);
+ }
+ appStates.put(portalName, state);
+ }
+
private UserPortalConfig getUserPortalConfig(PortalRequestContext context) throws Exception
{
ExoContainer appContainer = context.getApplication().getApplicationServiceContainer();
Modified: portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortlet.java
===================================================================
--- portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortlet.java 2009-10-29 17:39:04 UTC (rev 442)
+++ portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortlet.java 2009-10-29 18:14:44 UTC (rev 443)
@@ -151,6 +151,7 @@
private List<String> supportedPublicParams_;
private boolean portletInPortal_ = true;
private StateString navigationalState;
+// private Map<String, String[]> publicNavigationalStateChanges;
public UIPortlet()
{
@@ -545,9 +546,8 @@
if (publicParams != null)
{
Set<String> keys = publicParams.keySet();
- for (Iterator<String> iter = keys.iterator(); iter.hasNext();)
+ for (String key : keys)
{
- String key = iter.next();
if (supportsPublicParam(key))
{
publicParamsSupportedByPortlet.add(key);
@@ -650,18 +650,18 @@
}
// Navigational state
- StateString navigationalState = ParametersStateString.create(getRenderParameterMap(this));
+ StateString navigationalState = ParametersStateString.create(getRenderParameterMap());
invocation.setNavigationalState(navigationalState);
+ // Public navigational state
+ invocation.setPublicNavigationalState(this.getPublicParameters());
+
// Mode
invocation.setMode(Mode.create(getCurrentPortletMode().toString()));
// Window state
invocation.setWindowState(org.gatein.pc.api.WindowState.create(getCurrentWindowState().toString()));
- // Public navigational state
- invocation.setPublicNavigationalState(allParams);
-
//
StatefulPortletContext<C> preferencesPortletContext = getPortletContext();
@@ -718,9 +718,9 @@
}
/** This method returns all the parameters supported by the targeted portlets, both the private and public ones */
- private Map<String, String[]> getRenderParameterMap(UIPortlet uiPortlet)
+ private Map<String, String[]> getRenderParameterMap()
{
- Map<String, String[]> publicParams = uiPortlet.getPublicParameters();
+ Map<String, String[]> publicParams = getPublicParameters();
Map<String, String[]> renderParams;
if (navigationalState == null)
@@ -879,4 +879,9 @@
{
this.navigationalState = navigationalState;
}
+
+ /*void setPublicNavigationalStateUpdates(Map<String, String[]> publicNavigationalStateUpdates)
+ {
+ this.publicNavigationalStateChanges = publicNavigationalStateUpdates;
+ }*/
}
Modified: portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java
===================================================================
--- portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java 2009-10-29 17:39:04 UTC (rev 442)
+++ portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java 2009-10-29 18:14:44 UTC (rev 443)
@@ -167,6 +167,8 @@
StateString navigationalState = navStateResponse.getNavigationalState();
uiPortlet.setNavigationalState(navigationalState);
+ // todo: this might be needed for a proper handling of PRPs but need to understand UIPortlet behavior better first
+// uiPortlet.setPublicNavigationalStateUpdates(navStateResponse.getPublicNavigationalStateUpdates());
//
@@ -614,10 +616,8 @@
UIPortal uiPortal = Util.getUIPortal();
Map<String, String[]> publicParams = uiPortal.getPublicParameters();
- Iterator<String> keys = requestParams.keySet().iterator();
- while (keys.hasNext())
+ for (String key : requestParams.keySet())
{
- String key = keys.next();
if (uiPortlet.supportsPublicParam(key))
{
publicParams.put(key, requestParams.get(key));
Modified: portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationNodeSelector.java
===================================================================
--- portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationNodeSelector.java 2009-10-29 17:39:04 UTC (rev 442)
+++ portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationNodeSelector.java 2009-10-29 18:14:44 UTC (rev 443)
@@ -1,16 +1,16 @@
/**
* Copyright (C) 2009 eXo Platform SAS.
- *
+ *
* 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
@@ -55,9 +55,7 @@
import java.util.Locale;
import java.util.ResourceBundle;
-/**
- * Copied by The eXo Platform SARL Author May 28, 2009 3:07:15 PM
- */
+/** Copied by The eXo Platform SARL Author May 28, 2009 3:07:15 PM */
@ComponentConfigs({
@ComponentConfig(template = "system:/groovy/portal/webui/navigation/UINavigationNodeSelector.gtmpl", events = {@EventConfig(listeners = UINavigationNodeSelector.ChangeNodeActionListener.class)}),
@ComponentConfig(id = "NavigationNodePopupMenu", type = UIRightClickPopupMenu.class, template = "system:/groovy/webui/core/UIRightClickPopupMenu.gtmpl", events = {
@@ -138,17 +136,23 @@
private void selectNavigation()
{
if (navigations == null || navigations.size() < 1)
+ {
return;
+ }
if (selectedNode == null)
{
PageNavigation navigation = navigations.get(0);
selectedNode = new SelectedNode(navigation, null, null);
if (navigation.getNodes().size() > 0)
+ {
selectedNode.setNode(navigation.getNodes().get(0));
+ }
}
selectNavigation(selectedNode.getPageNavigation().getId());
if (selectedNode.getNode() != null)
+ {
selectPageNodeByUri(selectedNode.getNode().getUri());
+ }
}
public void selectNavigation(int id)
@@ -156,7 +160,9 @@
for (int i = 0; i < navigations.size(); i++)
{
if (navigations.get(i).getId() != id)
+ {
continue;
+ }
selectedNode = new SelectedNode(navigations.get(i), null, null);
selectPageNodeByUri(null);
UITree uiTree = getChild(UITree.class);
@@ -171,7 +177,9 @@
for (PageNavigation nav : navigations)
{
if (nav.getOwnerType().equals(PortalConfig.USER_TYPE))
+ {
continue;
+ }
String ownerId = nav.getOwnerId();
if (nav.getOwnerType().equals(PortalConfig.GROUP_TYPE))
{
@@ -190,7 +198,9 @@
{
node.setResolvedLabel(res);
if (node.getChildren() == null)
+ {
return;
+ }
for (PageNode childNode : node.getChildren())
{
resolveLabel(res, childNode);
@@ -200,7 +210,9 @@
public void selectPageNodeByUri(String uri)
{
if (selectedNode == null)
+ {
return;
+ }
UITree tree = getChild(UITree.class);
List<?> sibbling = tree.getSibbling();
tree.setSibbling(null);
@@ -220,16 +232,22 @@
public PageNode searchPageNodeByUri(PageNavigation pageNav, String uri)
{
if (pageNav == null || uri == null)
+ {
return null;
+ }
List<PageNode> pageNodes = pageNav.getNodes();
UITree uiTree = getChild(UITree.class);
for (PageNode ele : pageNodes)
{
PageNode returnPageNode = searchPageNodeByUri(ele, uri, uiTree);
if (returnPageNode == null)
+ {
continue;
+ }
if (uiTree.getSibbling() == null)
+ {
uiTree.setSibbling(pageNodes);
+ }
return returnPageNode;
}
return null;
@@ -238,19 +256,29 @@
private PageNode searchPageNodeByUri(PageNode pageNode, String uri, UITree tree)
{
if (pageNode.getUri().equals(uri))
+ {
return pageNode;
+ }
List<PageNode> children = pageNode.getChildren();
if (children == null)
+ {
return null;
+ }
for (PageNode ele : children)
{
PageNode returnPageNode = searchPageNodeByUri(ele, uri, tree);
if (returnPageNode == null)
+ {
continue;
+ }
if (tree.getSibbling() == null)
+ {
tree.setSibbling(children);
+ }
if (tree.getParentSelected() == null)
+ {
tree.setParentSelected(pageNode);
+ }
selectedNode.setParentNode(pageNode);
return returnPageNode;
}
@@ -260,14 +288,18 @@
public List<PageNavigation> getPageNavigations()
{
if (navigations == null)
+ {
navigations = new ArrayList<PageNavigation>();
+ }
return navigations;
}
public void addPageNavigation(PageNavigation navigation)
{
if (navigations == null)
+ {
navigations = new ArrayList<PageNavigation>();
+ }
navigations.add(navigation);
updateUI();
}
@@ -275,7 +307,9 @@
public void deletePageNavigation(PageNavigation navigation)
{
if (navigations == null || navigations.size() < 1)
+ {
return;
+ }
navigations.remove(navigation);
deleteNavigations.add(navigation);
selectedNode = null;
@@ -288,7 +322,9 @@
for (PageNavigation ele : getPageNavigations())
{
if (ele.getId() == id)
+ {
return ele;
+ }
}
return null;
}
@@ -299,9 +335,13 @@
if (uiPopupMenu != null)
{
if (navigations == null || navigations.size() < 1)
+ {
uiPopupMenu.setRendered(false);
+ }
else
+ {
uiPopupMenu.setRendered(true);
+ }
}
super.processRender(context);
}
@@ -354,17 +394,20 @@
{
parent = PageNavigationUtils.searchPageNodeByUri(pageNode, uri);
if (parent != null)
+ {
break;
+ }
}
}
if (parent == null)
+ {
parent = uiNodeSelector.getSelectedNavigation();
+ }
uiNodeForm.setSelectedParent(parent);
// set navigation owner, navigation type
- UINavigationManagement nodeManager = uiNodeSelector.getParent();
- uiNodeForm.setOwner(nodeManager.getOwner());
- uiNodeForm.setOwnerType(nodeManager.getOwnerType());
+ uiNodeForm.setOwner(uiNodeSelector.getSelectedNavigation().getOwnerId());
+ uiNodeForm.setOwnerType(uiNodeSelector.getSelectedNavigation().getOwnerType());
uiManagementPopup.setWindowSize(800, 500);
event.getRequestContext().addUIComponentToUpdateByAjax(uiManagementPopup.getParent());
@@ -392,7 +435,9 @@
{
selectedPageNode = PageNavigationUtils.searchPageNodeByUri(pageNode, uri);
if (selectedPageNode != null)
+ {
break;
+ }
}
}
@@ -462,13 +507,19 @@
UserACL userACL = uiApp.getApplicationComponent(UserACL.class);
if (!userACL.hasPermission(node))
{
- uiApp.addMessage(new ApplicationMessage("UIPageBrowser.msg.UserNotPermission", new String[]{pageId}, 1));;
+ uiApp.addMessage(new ApplicationMessage("UIPageBrowser.msg.UserNotPermission", new String[]{pageId}, 1));
+ ;
return;
}
}
UIPopupWindow uiManagementPopup = uiNodeSelector.getAncestorOfType(UIPopupWindow.class);
UIPageNodeForm2 uiNodeForm = uiApp.createUIComponent(UIPageNodeForm2.class, null, null);
uiManagementPopup.setUIComponent(uiNodeForm);
+
+ // set navigation owner, navigation type
+ uiNodeForm.setOwner(uiNodeSelector.getSelectedNavigation().getOwnerId());
+ uiNodeForm.setOwnerType(uiNodeSelector.getSelectedNavigation().getOwnerType());
+
uiNodeForm.setValues(selectedNode);
uiNodeForm.setSelectedParent(obj);
uiManagementPopup.setWindowSize(800, 500);
@@ -489,10 +540,14 @@
PageNavigation nav = uiNodeSelector.getSelectedNavigation();
if (nav == null)
+ {
return;
+ }
PageNode[] pageNodes = PageNavigationUtils.searchPageNodesByUri(nav, uri);
if (pageNodes == null)
+ {
return;
+ }
SelectedNode selectedNode = new SelectedNode(nav, pageNodes[0], pageNodes[1]);
selectedNode.setDeleteNode(false);
uiNodeSelector.setCopyNode(selectedNode);
@@ -509,7 +564,9 @@
super.execute(event);
UINavigationNodeSelector uiNodeSelector = event.getSource().getAncestorOfType(UINavigationNodeSelector.class);
if (uiNodeSelector.getCopyNode() == null)
+ {
return;
+ }
uiNodeSelector.getCopyNode().setDeleteNode(true);
}
}
@@ -537,7 +594,9 @@
event.getRequestContext().addUIComponentToUpdateByAjax(uiManagement);
SelectedNode selectedNode = uiNodeSelector.getCopyNode();
if (selectedNode == null)
+ {
return;
+ }
PageNode newNode = selectedNode.getNode().clone();
PageNavigation targetNav = uiNodeSelector.getSelectedNavigation();
@@ -610,7 +669,9 @@
}
List<PageNode> children = node.getChildren();
if (children == null || children.size() < 1)
+ {
return;
+ }
for (PageNode ele : children)
{
clonePageFromNode(ele, ownerType, ownerId, service);
@@ -623,14 +684,20 @@
child.setUri(newUri);
List<PageNode> children = child.getChildren();
if (children != null)
+ {
for (PageNode node : children)
+ {
setNewUri(child, node);
+ }
+ }
}
private boolean isExistChild(PageNode parent, PageNode child)
{
if (parent == null)
+ {
return false;
+ }
List<PageNode> nodes = parent.getChildren();
if (nodes == null)
{
@@ -640,7 +707,9 @@
for (PageNode node : nodes)
{
if (node.getName().equals(child.getName()))
+ {
return true;
+ }
}
return false;
}
@@ -649,11 +718,15 @@
{
List<PageNode> nodes = nav.getNodes();
if (nodes.size() == 0)
+ {
return false;
+ }
for (PageNode node : nodes)
{
if (node.getName().equals(child.getName()))
+ {
return true;
+ }
}
return false;
}
@@ -685,11 +758,17 @@
}
int k = children.indexOf(targetNode);
if (k < 0)
+ {
return;
+ }
if (k == 0 && i == -1)
+ {
return;
+ }
if (k == children.size() - 1 && i == 1)
+ {
return;
+ }
children.remove(k);
children.add(k + i, targetNode);
}
@@ -714,11 +793,15 @@
PageNavigation nav = uiNodeSelector.getSelectedNavigation();
if (nav == null)
+ {
return;
+ }
PageNode[] pageNodes = PageNavigationUtils.searchPageNodesByUri(nav, uri);
if (pageNodes == null)
+ {
return;
+ }
if (pageNodes[0] == null)
{
Modified: portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageActionListener.java
===================================================================
--- portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageActionListener.java 2009-10-29 17:39:04 UTC (rev 442)
+++ portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageActionListener.java 2009-10-29 18:14:44 UTC (rev 443)
@@ -1,16 +1,16 @@
/**
* Copyright (C) 2009 eXo Platform SAS.
- *
+ *
* 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
@@ -44,17 +44,11 @@
import org.exoplatform.webui.event.Event;
import org.exoplatform.webui.event.EventListener;
+import javax.portlet.WindowState;
import java.util.ArrayList;
import java.util.List;
-import javax.portlet.WindowState;
-
-/**
- * Created by The eXo Platform SAS
- * Author : Tran The Trong
- * trongtt(a)gmail.com
- * Jun 14, 2006
- */
+/** Created by The eXo Platform SAS Author : Tran The Trong trongtt(a)gmail.com Jun 14, 2006 */
public class UIPageActionListener
{
@@ -70,7 +64,7 @@
{
UserPortalConfigService configService = uiPortalApp.getApplicationComponent(UserPortalConfigService.class);
String remoteUser = Util.getPortalRequestContext().getRemoteUser();
- UserPortalConfig portalConfig = configService.getUserPortalConfig(uiPortal.getOwner(), remoteUser);
+ UserPortalConfig portalConfig = configService.getUserPortalConfig(Util.getPortalRequestContext().getPortalOwner(), remoteUser);
uiPortal.getChildren().clear();
PortalDataMapper.toUIPortal(uiPortal, portalConfig);
uiPortalApp.setModeState(UIPortalApplication.NORMAL_MODE);
@@ -93,7 +87,9 @@
List<PageNavigation> navigations = uiPortal.getNavigations();
String uri = pnevent.getTargetNodeUri();
if (uri == null || (uri = uri.trim()).length() < 1)
+ {
return;
+ }
if (uri.length() == 1 && uri.charAt(0) == '/')
{
for (PageNavigation nav : navigations)
@@ -126,7 +122,9 @@
}
}
if (uri.charAt(0) == '/')
+ {
uri = uri.substring(1);
+ }
int idx = uri.lastIndexOf("::");
if (idx < 0)
@@ -144,7 +142,9 @@
tempNode = tempNode.getChild(nodeNames[i]);
}
if (tempNode != null)
+ {
selectedPaths_.add(selectedNode = tempNode);
+ }
if (selectedNode != null)
{
@@ -155,7 +155,8 @@
// TODO tam.nguyen: filter navigation, select navigation up to user
if (selectedNode == null)
{
- filter : for (PageNavigation nav : navigations)
+ filter:
+ for (PageNavigation nav : navigations)
{
for (PageNode child : nav.getNodes())
{
@@ -169,7 +170,9 @@
}
uiPortal.setSelectedNode(selectedNode);
if (selectedNode == null)
+ {
selectedPaths_.add(uiPortal.getSelectedNode());
+ }
uiPortal.setSelectedPaths(selectedPaths_);
String selectedUri = (uiPortal.getSelectedNode() == null) ? null : uiPortal.getSelectedNode().getUri();
if (currentUri != null && !currentUri.equals(selectedUri))
@@ -210,7 +213,9 @@
tempNode = tempNode.getChild(nodeNames[i]);
}
if (tempNode != null)
+ {
selectedPaths_.add(selecttedNode = tempNode);
+ }
uiPortal.setSelectedNode(selecttedNode);
uiPortal.setSelectedNavigation(nav);
@@ -235,7 +240,7 @@
/**
* Update the layout of UIPortal if both ownerType and ownerId of navigation are changed
- *
+ *
* @param uiPortal
* @param formerNav
* @param newNav
@@ -243,7 +248,7 @@
* @throws Exception
*/
private void updateLayout(UIPortal uiPortal, PageNavigation formerNav, PageNavigation newNav,
- UIPortalApplication uiPortalApp) throws Exception
+ UIPortalApplication uiPortalApp) throws Exception
{
if (formerNav == null || newNav == null)
{
@@ -272,7 +277,7 @@
/**
* Rebuild UIPortal with updated UserPortalConfig
- *
+ *
* @param uiPortal
* @param portalConfig
* @throws Exception
@@ -349,7 +354,9 @@
Page page = (Page)PortalDataMapper.buildModelObject(uiPage);
UserPortalConfigService configService = uiPage.getApplicationComponent(UserPortalConfigService.class);
if (page.getChildren() == null)
+ {
page.setChildren(new ArrayList<ModelObject>());
+ }
configService.update(page);
}
break;
@@ -375,7 +382,9 @@
Page page = (Page)PortalDataMapper.buildModelObject(uiPage);
UserPortalConfigService configService = uiPage.getApplicationComponent(UserPortalConfigService.class);
if (page.getChildren() == null)
+ {
page.setChildren(new ArrayList<ModelObject>());
+ }
configService.update(page);
pcontext.setFullRender(false);
pcontext.setResponseComplete(true);
Modified: portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageCreationWizard.java
===================================================================
--- portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageCreationWizard.java 2009-10-29 17:39:04 UTC (rev 442)
+++ portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageCreationWizard.java 2009-10-29 18:14:44 UTC (rev 443)
@@ -1,16 +1,16 @@
/**
* Copyright (C) 2009 eXo Platform SAS.
- *
+ *
* 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
@@ -33,6 +33,7 @@
import org.exoplatform.portal.webui.util.PortalDataMapper;
import org.exoplatform.portal.webui.util.Util;
import org.exoplatform.portal.webui.workspace.UIPortalApplication;
+import org.exoplatform.portal.webui.workspace.UIPortalToolPanel;
import org.exoplatform.portal.webui.workspace.UIWorkingWorkspace;
import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.web.application.JavascriptManager;
@@ -50,10 +51,7 @@
import java.util.Date;
import java.util.List;
-/**
- * Created by The eXo Platform SARL Author : Dang Van Minh minhdv81(a)yahoo.com
- * Jun 23, 2006
- */
+/** Created by The eXo Platform SARL Author : Dang Van Minh minhdv81(a)yahoo.com Jun 23, 2006 */
@ComponentConfigs({
@ComponentConfig(template = "system:/groovy/webui/core/UIWizard.gtmpl", events = {
@EventConfig(listeners = UIPageCreationWizard.ViewStep1ActionListener.class),
@@ -108,7 +106,9 @@
{
List<PageNode> children = selectedNode.getChildren();
if (children == null)
+ {
children = new ArrayList<PageNode>();
+ }
children.add(pageNode);
selectedNode.setChildren((ArrayList<PageNode>)children);
}
@@ -116,7 +116,7 @@
{
pageNav.addNode(pageNode);
}
- pageNav.setModifier(RequestContext.<WebuiRequestContext> getCurrentInstance().getRemoteUser());
+ pageNav.setModifier(RequestContext.<WebuiRequestContext>getCurrentInstance().getRemoteUser());
uiNodeSelector.selectPageNodeByUri(pageNode.getUri());
service.create(page);
@@ -147,9 +147,13 @@
PageNode selectedPageNode = uiPageSetInfo.getSelectedPageNode();
List<PageNode> sibbling = null;
if (selectedPageNode != null)
+ {
sibbling = selectedPageNode.getChildren();
+ }
else
+ {
sibbling = navigation.getNodes();
+ }
if (sibbling != null)
{
for (PageNode ele : sibbling)
@@ -228,7 +232,8 @@
if (navigation == null)
{
uiPortalApp.addMessage(new ApplicationMessage("UIPageCreationWizard.msg.notSelectedPageNavigation",
- new String[]{}));;
+ new String[]{}));
+ ;
uiWizard.viewStep(2);
return;
}
@@ -323,11 +328,15 @@
setDefaultPermission(page, ownerType, ownerId);
if (page.getTitle() == null || page.getTitle().trim().length() == 0)
+ {
page.setTitle(pageNode.getName());
+ }
boolean isDesktopPage = Page.DESKTOP_PAGE.equals(page.getFactoryId());
if (isDesktopPage)
+ {
page.setShowMaxWindow(true);
+ }
UIPagePreview uiPagePreview = uiWizard.getChild(UIPagePreview.class);
UIPage uiPage;
@@ -373,6 +382,8 @@
}
uiPortalApp.setModeState(UIPortalApplication.NORMAL_MODE);
uiWizard.saveData();
+ UIPortalToolPanel toolPanel = uiWorkingWS.findFirstComponentOfType(UIPortalToolPanel.class);
+ toolPanel.setUIComponent(null);
uiWizard.updateUIPortal(uiPortalApp, event);
JavascriptManager jsManager = event.getRequestContext().getJavascriptManager();
jsManager.addJavascript("eXo.portal.portalMode=" + UIPortalApplication.NORMAL_MODE + ";");
Modified: portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageWizard.java
===================================================================
--- portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageWizard.java 2009-10-29 17:39:04 UTC (rev 442)
+++ portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageWizard.java 2009-10-29 18:14:44 UTC (rev 443)
@@ -1,16 +1,16 @@
/**
* Copyright (C) 2009 eXo Platform SAS.
- *
+ *
* 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
@@ -24,6 +24,7 @@
import org.exoplatform.portal.webui.portal.UIPortalComposer;
import org.exoplatform.portal.webui.util.Util;
import org.exoplatform.portal.webui.workspace.UIPortalApplication;
+import org.exoplatform.portal.webui.workspace.UIPortalToolPanel;
import org.exoplatform.portal.webui.workspace.UIWorkingWorkspace;
import org.exoplatform.web.application.JavascriptManager;
import org.exoplatform.webui.application.WebuiRequestContext;
@@ -32,9 +33,7 @@
import org.exoplatform.webui.event.Event;
import org.exoplatform.webui.event.EventListener;
-/**
- * Created by The eXo Platform SAS Mar 21, 2007
- */
+/** Created by The eXo Platform SAS Mar 21, 2007 */
public abstract class UIPageWizard extends UIWizard
{
@@ -160,6 +159,8 @@
UIWorkingWorkspace uiWorkingWS = uiPortalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
uiWorkingWS.findFirstComponentOfType(UIPortalComposer.class).setRendered(false);
uiWorkingWS.setRenderedChild(UIPortalApplication.UI_VIEWING_WS_ID);
+ UIPortalToolPanel toolPanel = uiWorkingWS.findFirstComponentOfType(UIPortalToolPanel.class);
+ toolPanel.setUIComponent(null);
pcontext.addUIComponentToUpdateByAjax(uiWorkingWS);
JavascriptManager jsManager = event.getRequestContext().getJavascriptManager();
jsManager.addJavascript("eXo.portal.portalMode=" + UIPortalApplication.NORMAL_MODE + ";");
Modified: portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java
===================================================================
--- portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java 2009-10-29 17:39:04 UTC (rev 442)
+++ portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java 2009-10-29 18:14:44 UTC (rev 443)
@@ -1,16 +1,16 @@
/**
* Copyright (C) 2009 eXo Platform SAS.
- *
+ *
* 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
@@ -57,10 +57,7 @@
import java.util.List;
-/**
- * Created by The eXo Platform SAS Author : Pham Thanh Tung
- * thanhtungty(a)gmail.com Jun 10, 2009
- */
+/** Created by The eXo Platform SAS Author : Pham Thanh Tung thanhtungty(a)gmail.com Jun 10, 2009 */
@ComponentConfigs({
@ComponentConfig(template = "app:/groovy/portal/webui/portal/UIPortalComposer.gtmpl", events = {
@EventConfig(listeners = UIPortalComposer.ViewPropertiesActionListener.class),
@@ -97,7 +94,9 @@
public void setPortalMode(int mode)
{
if (mode < 0 || mode > 4)
+ {
return;
+ }
getAncestorOfType(UIPortalApplication.class).setModeState(mode);
}
@@ -147,7 +146,7 @@
PortalConfig portalConfig = (PortalConfig)PortalDataMapper.buildModelObject(editPortal);
UserPortalConfigService configService = getApplicationComponent(UserPortalConfigService.class);
- configService.update(portalConfig);
+ //configService.update(portalConfig);
uiPortalApp.getUserPortalConfig().setPortal(portalConfig);
String remoteUser = prContext.getRemoteUser();
String ownerUser = prContext.getPortalOwner();
@@ -163,7 +162,9 @@
LocaleConfigService localeConfigService = uiPortalApp.getApplicationComponent(LocaleConfigService.class);
LocaleConfig localeConfig = localeConfigService.getLocaleConfig(portalConfig.getLocale());
if (localeConfig == null)
+ {
localeConfig = localeConfigService.getDefaultLocaleConfig();
+ }
// TODO dang.tung - change layout when portal get language from UIPortal
// (user and browser not support)
// ----------------------------------------------------------------------------------------------------
@@ -197,16 +198,22 @@
for (UIComponent child : children)
{
if (!child.isRendered() || child.getClass().equals(UIPortalComposer.class))
+ {
continue;
+ }
rcontext.addUIComponentToUpdateByAjax(child);
}
int portalMode = uiApp.getModeState();
if (portalMode != UIPortalApplication.NORMAL_MODE)
{
if (portalMode % 2 != 0)
+ {
Util.showComponentLayoutMode(UIPortlet.class);
+ }
else
+ {
Util.showComponentEditInViewMode(UIPortlet.class);
+ }
}
JavascriptManager jsManager = Util.getPortalRequestContext().getJavascriptManager();
jsManager.addJavascript("eXo.portal.portalMode=" + portalMode + ";");
@@ -303,7 +310,9 @@
uiWorkingWS.setRenderedChild(UIPortalApplication.UI_VIEWING_WS_ID);
if (uri == null)
+ {
uri = (uiPortal.getSelectedNode() != null) ? uiPortal.getSelectedNode().getUri() : null;
+ }
PageNodeEvent<UIPortal> pnevent = new PageNodeEvent<UIPortal>(uiPortal, PageNodeEvent.CHANGE_PAGE_NODE, uri);
uiPortal.broadcast(pnevent, Event.Phase.PROCESS);
prContext.addUIComponentToUpdateByAjax(uiWorkingWS);
@@ -334,21 +343,29 @@
String uri = null;
if (uiPortal == null)
+ {
siteBody.setUIComponent(editPortal);
+ }
// uiEditWS.setUIComponent(null);
// uiWorkingWS.removeChild(UIEditInlineWorkspace.class);
uiWorkingWS.getChild(UIEditInlineWorkspace.class).setRendered(false);
uiPortal = (UIPortal)siteBody.getUIComponent();
if (PortalProperties.SESSION_ALWAYS.equals(uiPortal.getSessionAlive()))
+ {
uiPortalApp.setSessionOpen(true);
+ }
else
+ {
uiPortalApp.setSessionOpen(false);
+ }
uiPortalApp.setModeState(UIPortalApplication.NORMAL_MODE);
uiWorkingWS.setRenderedChild(UIPortalApplication.UI_VIEWING_WS_ID);
if (uri == null)
+ {
uri = uiPortal.getSelectedNode() != null ? uiPortal.getSelectedNode().getUri() : null;
+ }
PageNodeEvent<UIPortal> pnevent = new PageNodeEvent<UIPortal>(uiPortal, PageNodeEvent.CHANGE_PAGE_NODE, uri);
uiPortal.broadcast(pnevent, Event.Phase.PROCESS);
prContext.addUIComponentToUpdateByAjax(uiWorkingWS);
@@ -409,19 +426,19 @@
switch (portalMode)
{
- case UIPortalApplication.APP_BLOCK_EDIT_MODE :
+ case UIPortalApplication.APP_BLOCK_EDIT_MODE:
uiPortalApp.setModeState(UIPortalApplication.APP_VIEW_EDIT_MODE);
break;
- case UIPortalApplication.APP_VIEW_EDIT_MODE :
+ case UIPortalApplication.APP_VIEW_EDIT_MODE:
uiPortalApp.setModeState(UIPortalApplication.APP_BLOCK_EDIT_MODE);
break;
- case UIPortalApplication.CONTAINER_BLOCK_EDIT_MODE :
+ case UIPortalApplication.CONTAINER_BLOCK_EDIT_MODE:
uiPortalApp.setModeState(UIPortalApplication.CONTAINER_VIEW_EDIT_MODE);
break;
- case UIPortalApplication.CONTAINER_VIEW_EDIT_MODE :
+ case UIPortalApplication.CONTAINER_VIEW_EDIT_MODE:
uiPortalApp.setModeState(UIPortalApplication.CONTAINER_BLOCK_EDIT_MODE);
break;
- default :
+ default:
uiPortalApp.setModeState(UIPortalApplication.NORMAL_MODE);
return;
}
@@ -519,9 +536,13 @@
UIPortal uiPortal = Util.getUIPortal();
UIPortalApplication uiPortalApp = Util.getUIPortalApplication();
if (PortalProperties.SESSION_ALWAYS.equals(uiPortal.getSessionAlive()))
+ {
uiPortalApp.setSessionOpen(true);
+ }
else
+ {
uiPortalApp.setSessionOpen(false);
+ }
uiPortalApp.setModeState(UIPortalApplication.NORMAL_MODE);
PageNodeEvent<UIPortal> pnevent =
new PageNodeEvent<UIPortal>(uiPortal, PageNodeEvent.CHANGE_PAGE_NODE, (uiPortal.getSelectedNode() != null
Modified: portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java
===================================================================
--- portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java 2009-10-29 17:39:04 UTC (rev 442)
+++ portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java 2009-10-29 18:14:44 UTC (rev 443)
@@ -1,16 +1,16 @@
/**
* Copyright (C) 2009 eXo Platform SAS.
- *
+ *
* 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
@@ -27,6 +27,7 @@
import org.exoplatform.portal.config.model.PortalConfig;
import org.exoplatform.portal.config.model.PortalProperties;
import org.exoplatform.portal.skin.SkinService;
+import org.exoplatform.portal.webui.util.PortalDataMapper;
import org.exoplatform.portal.webui.util.Util;
import org.exoplatform.portal.webui.workspace.UIMaskWorkspace;
import org.exoplatform.portal.webui.workspace.UIPortalApplication;
@@ -48,8 +49,8 @@
import org.exoplatform.webui.core.model.SelectItemCategory;
import org.exoplatform.webui.core.model.SelectItemOption;
import org.exoplatform.webui.event.Event;
+import org.exoplatform.webui.event.Event.Phase;
import org.exoplatform.webui.event.EventListener;
-import org.exoplatform.webui.event.Event.Phase;
import org.exoplatform.webui.form.UIFormInputItemSelector;
import org.exoplatform.webui.form.UIFormInputSet;
import org.exoplatform.webui.form.UIFormSelectBox;
@@ -59,8 +60,8 @@
import org.exoplatform.webui.form.validator.MandatoryValidator;
import org.exoplatform.webui.form.validator.StringLengthValidator;
import org.exoplatform.webui.organization.UIListPermissionSelector;
+import org.exoplatform.webui.organization.UIListPermissionSelector.EmptyIteratorValidator;
import org.exoplatform.webui.organization.UIPermissionSelector;
-import org.exoplatform.webui.organization.UIListPermissionSelector.EmptyIteratorValidator;
import java.util.ArrayList;
import java.util.Collection;
@@ -103,14 +104,16 @@
setSelectedTab(uiTemplateInput.getId());
createDefaultItem();
- UIFormInputSet uiPortalSetting = this.<UIFormInputSet> getChildById("PortalSetting");
+ UIFormInputSet uiPortalSetting = this.<UIFormInputSet>getChildById("PortalSetting");
UIFormStringInput uiNameInput = uiPortalSetting.getUIStringInput(FIELD_NAME);
uiNameInput.setEditable(true);
setActions(new String[]{"Save", "Close"});
if (initParams == null)
+ {
return;
+ }
WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
Param param = initParams.getParam("PortalTemplateConfigOption");
List<SelectItemCategory> portalTemplates = (List<SelectItemCategory>)param.getMapGroovyObject(context);
@@ -131,7 +134,7 @@
setSelectedTab("PortalSetting");
invokeGetBindingBean(Util.getUIPortal());
((UIFormStringInput)getChild(UIFormInputSet.class).getChildById(FIELD_NAME))
- .setValue(((PortalRequestContext)WebuiRequestContext.getCurrentInstance()).getPortalOwner());
+ .setValue(((PortalRequestContext)WebuiRequestContext.getCurrentInstance()).getPortalOwner());
setActions(new String[]{"Save", "Close"});
}
@@ -180,7 +183,9 @@
{
SelectItemOption<String> skinOption = new SelectItemOption<String>(skin, skin);
if (uiPortal.getSkin().equals(skin))
+ {
skinOption.setSelected(true);
+ }
listSkin.add(skinOption);
}
UIFormSelectBox uiSelectBox = new UIFormSelectBox(FIELD_SKIN, FIELD_SKIN, listSkin);
@@ -203,16 +208,16 @@
UIFormInputSet uiPermissionSetting = createUIComponent(UIFormInputSet.class, "PermissionSetting", null);
addUIComponentInput(uiPermissionSetting);
-
+
UIListPermissionSelector uiListPermissionSelector = createUIComponent(UIListPermissionSelector.class, null, null);
uiListPermissionSelector.configure("UIListPermissionSelector", "accessPermissions");
uiListPermissionSelector.addValidator(EmptyIteratorValidator.class);
uiPermissionSetting.addChild(uiListPermissionSelector);
- uiPermissionSetting.setSelectedComponent(uiListPermissionSelector.getId()) ;
-
-
+ uiPermissionSetting.setSelectedComponent(uiListPermissionSelector.getId());
+
+
UIPermissionSelector uiEditPermission = createUIComponent(UIPermissionSelector.class, null, null);
- uiEditPermission.setRendered(false) ;
+ uiEditPermission.setRendered(false);
uiEditPermission.addValidator(org.exoplatform.webui.organization.UIPermissionSelector.MandatoryValidator.class);
uiEditPermission.configure("UIPermissionSelector", "editPermission");
uiPermissionSetting.addChild(uiEditPermission);
@@ -236,6 +241,9 @@
UIPortal uiPortal = Util.getUIPortal();
uiForm.invokeSetBindingBean(uiPortal);
// uiPortal.refreshNavigation(localeConfigService.getLocaleConfig(uiPortal.getLocale()).getLocale()) ;
+ PortalConfig portalConfig = (PortalConfig)PortalDataMapper.buildModelObject(uiPortal);
+ UserPortalConfigService configService = uiForm.getApplicationComponent(UserPortalConfigService.class);
+ configService.update(portalConfig);
UIMaskWorkspace uiMaskWorkspace = uiForm.getParent();
uiMaskWorkspace.setUIComponent(null);
event.getRequestContext().addUIComponentToUpdateByAjax(uiMaskWorkspace);
Modified: portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMaskWorkspace.java
===================================================================
--- portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMaskWorkspace.java 2009-10-29 17:39:04 UTC (rev 442)
+++ portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMaskWorkspace.java 2009-10-29 18:14:44 UTC (rev 443)
@@ -1,16 +1,16 @@
/**
* Copyright (C) 2009 eXo Platform SAS.
- *
+ *
* 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
@@ -24,13 +24,12 @@
import org.exoplatform.webui.core.UIComponent;
import org.exoplatform.webui.core.UIComponentDecorator;
import org.exoplatform.webui.event.Event;
+import org.exoplatform.webui.event.Event.Phase;
import org.exoplatform.webui.event.EventListener;
-/**
- * Created by The eXo Platform SAS
- * Mar 13, 2007
- */
-@ComponentConfig(id = "UIMaskWorkspace", template = "system:/groovy/portal/webui/workspace/UIMaskWorkspace.gtmpl", events = @EventConfig(listeners = UIMaskWorkspace.CloseActionListener.class))
+/** Created by The eXo Platform SAS Mar 13, 2007 */
+@ComponentConfig(id = "UIMaskWorkspace", template = "system:/groovy/portal/webui/workspace/UIMaskWorkspace.gtmpl",
+ events = @EventConfig(phase = Phase.DECODE, listeners = UIMaskWorkspace.CloseActionListener.class))
public class UIMaskWorkspace extends UIComponentDecorator
{
@@ -67,7 +66,9 @@
{
this.isShow = bln;
if (bln == false)
+ {
isUpdated = false;
+ }
}
public boolean isUpdated()
@@ -113,7 +114,9 @@
uiMaskWorkspace = uiSource.getAncestorOfType(UIMaskWorkspace.class);
}
if (uiMaskWorkspace == null || !uiMaskWorkspace.isShow())
+ {
return;
+ }
uiMaskWorkspace.setUIComponent(null);
uiMaskWorkspace.setWindowSize(-1, -1);
event.getRequestContext().addUIComponentToUpdateByAjax(uiMaskWorkspace);
15 years, 1 month
gatein SVN: r442 - in portal/branches/performance: component/common/src/main/java/org/exoplatform/commons/utils and 1 other directory.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2009-10-29 13:39:04 -0400 (Thu, 29 Oct 2009)
New Revision: 442
Modified:
portal/branches/performance/component/common/src/main/java/org/exoplatform/commons/utils/Printer.java
portal/branches/performance/pom.xml
Log:
GTNPORTAL-133 : Chromattic memory leak
Modified: portal/branches/performance/component/common/src/main/java/org/exoplatform/commons/utils/Printer.java
===================================================================
--- portal/branches/performance/component/common/src/main/java/org/exoplatform/commons/utils/Printer.java 2009-10-29 17:30:25 UTC (rev 441)
+++ portal/branches/performance/component/common/src/main/java/org/exoplatform/commons/utils/Printer.java 2009-10-29 17:39:04 UTC (rev 442)
@@ -23,6 +23,8 @@
import java.io.Writer;
/**
+ * Extend the writer class by providing various method for printing text.
+ *
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
* @version $Revision$
*/
@@ -33,13 +35,13 @@
{
}
- public void println(Object o)
+ public final void println(Object o)
{
print(o);
println();
}
- public void println()
+ public final void println()
{
try
{
@@ -50,7 +52,7 @@
}
}
- public void print(Object o)
+ public final void print(Object o)
{
try
{
@@ -64,11 +66,10 @@
}
else
{
- String s = (o == null) ? "null" : o.toString();
- write(s);
+ write(o.toString());
}
}
- catch (IOException e)
+ catch (IOException ignore)
{
}
}
Modified: portal/branches/performance/pom.xml
===================================================================
--- portal/branches/performance/pom.xml 2009-10-29 17:30:25 UTC (rev 441)
+++ portal/branches/performance/pom.xml 2009-10-29 17:39:04 UTC (rev 442)
@@ -49,7 +49,7 @@
<org.jboss.identity.idm>1.0.0.Beta3</org.jboss.identity.idm>
<org.gatein.wsrp.version>1.0.0-Beta01</org.gatein.wsrp.version>
<org.gatein.mop.version>1.0.0-Beta09</org.gatein.mop.version>
- <version.chromattic>1.0.0-beta5</version.chromattic>
+ <version.chromattic>1.0.0-beta6</version.chromattic>
<version.reflect>1.0.0-beta3</version.reflect>
<!-- ************** -->
15 years, 1 month
gatein SVN: r441 - portal/branches/performance/packaging/module/src/main/javascript.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2009-10-29 13:30:25 -0400 (Thu, 29 Oct 2009)
New Revision: 441
Modified:
portal/branches/performance/packaging/module/src/main/javascript/portal.packaging.module.js
Log:
GTNPORTAL-61 : Update to Groovy 1.6.5
Modified: portal/branches/performance/packaging/module/src/main/javascript/portal.packaging.module.js
===================================================================
--- portal/branches/performance/packaging/module/src/main/javascript/portal.packaging.module.js 2009-10-28 18:54:30 UTC (rev 440)
+++ portal/branches/performance/packaging/module/src/main/javascript/portal.packaging.module.js 2009-10-29 17:30:25 UTC (rev 441)
@@ -90,7 +90,7 @@
new Project("org.exoplatform.portal", "exo.portal.component.scripting", "jar", module.version).
addDependency(module.component.xmlParser).
addDependency(new Project("rhino", "js", "jar", "1.6R5")).
- addDependency(new Project("org.codehaus.groovy", "groovy-all", "jar", "1.7-beta-2"));
+ addDependency(new Project("org.codehaus.groovy", "groovy-all", "jar", "1.6.5"));
module.component.web =
new Project("org.exoplatform.portal", "exo.portal.component.web", "jar", module.version).
15 years, 2 months
gatein SVN: r440 - in portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal: webui/application and 1 other directory.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2009-10-28 14:54:30 -0400 (Wed, 28 Oct 2009)
New Revision: 440
Modified:
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/application/ExoPortletInvocationContext.java
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortlet.java
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletForm.java
Log:
- Removed renderParametersMap in UIPortlet as it was not appropriately reflecting the navigational state and replaced it by a StateString instead.
This allows, in particular, handling of the case where the navigational state is opaque, coming from a remote producer. Still not sure why
public parameters are merged into the navigational state, though...
- Use constants instead of hardcoded values for parameter names where possible.
- Added methods to get the default WindowState or PortletMode if none was provided in the reponse, as this can be the case when interacting with
a remote producer.
- Removed unused code and cleaned up some.
Modified: portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java
===================================================================
--- portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java 2009-10-28 13:55:12 UTC (rev 439)
+++ portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java 2009-10-28 18:54:30 UTC (rev 440)
@@ -1,16 +1,16 @@
/**
* Copyright (C) 2009 eXo Platform SAS.
- *
+ *
* 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
@@ -38,6 +38,8 @@
import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.webui.core.lifecycle.HtmlValidator;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.io.Writer;
@@ -48,12 +50,9 @@
import java.util.Map;
import java.util.Set;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
/**
* This class extends the abstract WebuiRequestContext which itself extends the RequestContext one
- *
+ * <p/>
* It mainly implements the abstract methods and overide some.
*/
public class PortalRequestContext extends WebuiRequestContext
@@ -114,24 +113,34 @@
ajaxRequest_ = "true".equals(req.getParameter("ajaxRequest"));
String cache = req.getParameter(CACHE_LEVEL);
if (cache != null)
+ {
cacheLevel_ = cache;
+ }
requestURI_ = URLDecoder.decode(req.getRequestURI(), "UTF-8");
String pathInfo = req.getPathInfo();
if (pathInfo == null)
+ {
pathInfo = "/";
+ }
int colonIndex = pathInfo.indexOf("/", 1);
if (colonIndex < 0)
+ {
colonIndex = pathInfo.length();
+ }
portalOwner_ = pathInfo.substring(1, colonIndex);
nodePath_ = pathInfo.substring(colonIndex, pathInfo.length());
portalURI = requestURI_.substring(0, requestURI_.lastIndexOf(nodePath_)) + "/";
if (requestURI_.indexOf("/public/") >= 0)
+ {
accessPath = PUBLIC_ACCESS;
+ }
else if (requestURI_.indexOf("/private/") >= 0)
+ {
accessPath = PRIVATE_ACCESS;
+ }
//TODO use the encoding from the locale-config.xml file
response_.setContentType("text/html; charset=UTF-8");
@@ -156,7 +165,9 @@
{
String title = (String)request_.getAttribute(REQUEST_TITLE);
if (title != null)
+ {
return title;
+ }
UIPortal uiportal = Util.getUIPortal();
String resolvedLabel =
(uiportal.getSelectedNode() == null) ? null : uiportal.getSelectedNode().getResolvedLabel();
@@ -199,9 +210,8 @@
Map<String, String[]> unsortedParams = getRequest().getParameterMap();
Map<String, String[]> sortedParams = new HashMap<String, String[]>();
Set<String> keys = unsortedParams.keySet();
- for (Iterator<String> iter = keys.iterator(); iter.hasNext();)
+ for (String key : keys)
{
- String key = iter.next();
if (!key.startsWith(Constants.PARAMETER_ENCODER))
{
sortedParams.put(key, unsortedParams.get(key));
Modified: portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/application/ExoPortletInvocationContext.java
===================================================================
--- portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/application/ExoPortletInvocationContext.java 2009-10-28 13:55:12 UTC (rev 439)
+++ portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/application/ExoPortletInvocationContext.java 2009-10-28 18:54:30 UTC (rev 440)
@@ -53,6 +53,10 @@
private String portletId;
+ static final String INTERACTION_STATE_PARAM_NAME = "interactionstate";
+ static final String NAVIGATIONAL_STATE_PARAM_NAME = "navigationalstate";
+ static final String RESOURCE_STATE_PARAM_NAME = "resourcestate";
+
public ExoPortletInvocationContext(PortalRequestContext portalRequestContext, UIPortlet portlet)
{
super(new MarkupInfo(MediaType.create("text/html"), "UTF-8"));
@@ -119,13 +123,13 @@
StateString state = actionURL.getInteractionState();
if (state != null)
{
- appendParameter(baseURL, "interactionstate", state.getStringValue());
+ appendParameter(baseURL, INTERACTION_STATE_PARAM_NAME, state.getStringValue());
}
state = actionURL.getNavigationalState();
if (state != null)
{
- appendParameter(baseURL, "navigationalstate", state.getStringValue());
+ appendParameter(baseURL, NAVIGATIONAL_STATE_PARAM_NAME, state.getStringValue());
}
WindowState windowState = actionURL.getWindowState();
@@ -155,13 +159,13 @@
StateString resourceState = resourceURL.getResourceState();
if (resourceState != null)
{
- appendParameter(baseURL, "resourcestate", resourceState.getStringValue());
+ appendParameter(baseURL, RESOURCE_STATE_PARAM_NAME, resourceState.getStringValue());
}
resourceState = resourceURL.getNavigationalState();
if (resourceState != null)
{
- appendParameter(baseURL, "navigationalstate", resourceState.getStringValue());
+ appendParameter(baseURL, NAVIGATIONAL_STATE_PARAM_NAME, resourceState.getStringValue());
}
WindowState windowState = resourceURL.getWindowState();
@@ -208,7 +212,7 @@
StateString state = renderURL.getNavigationalState();
if (state != null)
{
- appendParameter(baseURL, "navigationalstate", state.getStringValue());
+ appendParameter(baseURL, NAVIGATIONAL_STATE_PARAM_NAME, state.getStringValue());
}
}
Modified: portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortlet.java
===================================================================
--- portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortlet.java 2009-10-28 13:55:12 UTC (rev 439)
+++ portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortlet.java 2009-10-28 18:54:30 UTC (rev 440)
@@ -49,6 +49,7 @@
import org.gatein.common.i18n.LocalizedString;
import org.gatein.common.net.media.MediaType;
import org.gatein.pc.api.Mode;
+import org.gatein.pc.api.ParametersStateString;
import org.gatein.pc.api.Portlet;
import org.gatein.pc.api.PortletContext;
import org.gatein.pc.api.PortletInvoker;
@@ -141,7 +142,6 @@
private String portletStyle;
private boolean showPortletMode = true;
- private Map<String, String[]> renderParametersMap_;
private PortletMode currentPortletMode_ = PortletMode.VIEW;
private WindowState currentWindowState_ = WindowState.NORMAL;
@@ -150,6 +150,7 @@
private List<QName> supportedProcessingEvents_;
private List<String> supportedPublicParams_;
private boolean portletInPortal_ = true;
+ private StateString navigationalState;
public UIPortlet()
{
@@ -307,16 +308,6 @@
return themeMap;
}
- public Map<String, String[]> getRenderParametersMap()
- {
- return renderParametersMap_;
- }
-
- public void setRenderParametersMap(Map<String, String[]> map)
- {
- renderParametersMap_ = map;
- }
-
public PortletMode getCurrentPortletMode()
{
return currentPortletMode_;
@@ -574,9 +565,8 @@
Map<String, String[]> publicParams = uiPortal.getPublicParameters();
Set<String> allPublicParamsNames = publicParams.keySet();
List<String> supportedPublicParamNames = getPublicRenderParamNames();
- for (Iterator<String> iter = allPublicParamsNames.iterator(); iter.hasNext();)
+ for (String oneOfAllParams : allPublicParamsNames)
{
- String oneOfAllParams = iter.next();
if (supportedPublicParamNames.contains(oneOfAllParams))
{
publicParamsMap.put(oneOfAllParams, publicParams.get(oneOfAllParams));
@@ -611,7 +601,7 @@
actionInvocation.setForm(allParams);
actionInvocation.setRequestContext(new AbstractRequestContext(servletRequest));
- String interactionState = servletRequest.getParameter("interactionstate");
+ String interactionState = servletRequest.getParameter(ExoPortletInvocationContext.INTERACTION_STATE_PARAM_NAME);
if (interactionState != null)
{
actionInvocation.setInteractionState(StateString.create(interactionState));
@@ -636,7 +626,7 @@
resourceInvocation.setCacheLevel(CacheLevel.valueOf(cachability));
}
- String resourceState = servletRequest.getParameter("resourcestate");
+ String resourceState = servletRequest.getParameter(ExoPortletInvocationContext.RESOURCE_STATE_PARAM_NAME);
if (resourceState != null)
{
resourceInvocation.setResourceState(StateString.create(resourceState));
@@ -659,9 +649,8 @@
throw new AssertionError();
}
- // Navigational state todo: fix me, this is stupid to first encode the Map to decode it afterwards
- String stateString = StateString.encodeAsOpaqueValue(getRenderParameterMap(this));
- StateString navigationalState = StateString.create(stateString);
+ // Navigational state
+ StateString navigationalState = ParametersStateString.create(getRenderParameterMap(this));
invocation.setNavigationalState(navigationalState);
// Mode
@@ -731,22 +720,37 @@
/** This method returns all the parameters supported by the targeted portlets, both the private and public ones */
private Map<String, String[]> getRenderParameterMap(UIPortlet uiPortlet)
{
- Map<String, String[]> renderParams = uiPortlet.getRenderParametersMap();
+ Map<String, String[]> publicParams = uiPortlet.getPublicParameters();
+ Map<String, String[]> renderParams;
- if (renderParams == null)
+ if (navigationalState == null)
{
- renderParams = new HashMap<String, String[]>();
- uiPortlet.setRenderParametersMap(renderParams);
+ return publicParams;
}
+ else
+ {
+ if (navigationalState instanceof ParametersStateString)
+ {
+ // if the navigational state is not opaque, retrieve the parameter map
+ ParametersStateString parametersStateString = (ParametersStateString)navigationalState;
+ renderParams = parametersStateString.getParameters();
+ }
+ else
+ {
+ // if we have an opaque navigation state, just add it as it to the param map under the proper key
+ renderParams = new HashMap<String, String[]>(publicParams.size() + 1);
+ renderParams.put(ExoPortletInvocationContext.NAVIGATIONAL_STATE_PARAM_NAME, new String[]{navigationalState.getStringValue()});
+ }
- /*
- * handle public params to only get the one supported by the targeted
- * portlet
- */
- Map<String, String[]> allParams = new HashMap<String, String[]>(renderParams);
- allParams.putAll(uiPortlet.getPublicParameters());
+ /*
+ * handle public params to only get the one supported by the targeted
+ * portlet
+ */
+ Map<String, String[]> allParams = new HashMap<String, String[]>(renderParams);
+ allParams.putAll(publicParams);
- return allParams;
+ return allParams;
+ }
}
//
@@ -870,4 +874,9 @@
currentPortlet.set(null);
}
}
+
+ void setNavigationalState(StateString navigationalState)
+ {
+ this.navigationalState = navigationalState;
+ }
}
Modified: portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java
===================================================================
--- portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java 2009-10-28 13:55:12 UTC (rev 439)
+++ portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java 2009-10-28 18:54:30 UTC (rev 440)
@@ -19,7 +19,6 @@
package org.exoplatform.portal.webui.application;
-import org.exoplatform.Constants;
import org.exoplatform.portal.application.PortalRequestContext;
import org.exoplatform.portal.pom.spi.wsrp.WSRP;
import org.exoplatform.portal.webui.page.UIPage;
@@ -37,6 +36,8 @@
import org.exoplatform.webui.event.Event.Phase;
import org.exoplatform.webui.event.EventListener;
import org.gatein.common.util.MultiValuedPropertyMap;
+import org.gatein.pc.api.Mode;
+import org.gatein.pc.api.ParametersStateString;
import org.gatein.pc.api.PortletContext;
import org.gatein.pc.api.StateString;
import org.gatein.pc.api.StatefulPortletContext;
@@ -49,7 +50,6 @@
import org.gatein.pc.api.invocation.response.UpdateNavigationalStateResponse;
import javax.portlet.PortletMode;
-import javax.portlet.ResourceURL;
import javax.portlet.WindowState;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -61,7 +61,6 @@
import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import java.util.Set;
/** May 29, 2006 */
public class UIPortletActionListener
@@ -146,11 +145,11 @@
* If the current node is displaying a usual layout page, also tells the
* page which portlet to render or not when the state is maximized
*/
- WindowState state = new WindowState(navStateResponse.getWindowState().toString());
+ WindowState state = new WindowState(getWindowStateOrDefault(navStateResponse));
setNextState(uiPortlet, state);
// update the portlet with the next mode to display
- PortletMode mode = new PortletMode(navStateResponse.getMode().toString());
+ PortletMode mode = new PortletMode(getPortletModeOrDefault(navStateResponse));
setNextMode(uiPortlet, mode);
// set the public params
@@ -165,9 +164,10 @@
*/
//
- Map<String, String[]> map =
- StateString.decodeOpaqueValue((navStateResponse.getNavigationalState()).getStringValue());
- uiPortlet.setRenderParametersMap(map);
+ StateString navigationalState = navStateResponse.getNavigationalState();
+ uiPortlet.setNavigationalState(navigationalState);
+
+
//
/*
@@ -305,9 +305,7 @@
try
{
PortalRequestContext context = (PortalRequestContext)event.getRequestContext();
- HttpServletRequest request = context.getRequest();
HttpServletResponse response = context.getResponse();
- String resourceId = request.getParameter(Constants.RESOURCE_ID_PARAMETER);
//
ResourceInvocation resourceInvocation = uiPortlet.create(ResourceInvocation.class, context);
@@ -386,53 +384,6 @@
}
}
- /** This method returns all the parameters supported by the targeted portlets, both the private and public ones */
- @SuppressWarnings({"unchecked"})
- private static Map getResourceParameterMap(UIPortlet uiPortlet, PortalRequestContext prcontext)
- {
-
- Map portletParams = new HashMap(prcontext.getPortletParameters());
-
- /*
- * For serveResource requests the portlet must receive any resource parameters that
- * were explicitly set on the ResourceURL that triggered the request. If
- * the cacheability level of that resource URL (see PLT.13.7) was PORTLET or PAGE,
- * the portlet must also receive the render parameters present in the request in
- * which the URL was created.
- *
- * If a resource parameter is set that has the same name as a render parameter,
- * the render parameter must be the last entry in the parameter value array.
- */
- String cacheLevel = prcontext.getCacheLevel();
- if (ResourceURL.PAGE.equals(cacheLevel) || ResourceURL.PORTLET.equals(cacheLevel))
- {
- Map renderParams = uiPortlet.getRenderParametersMap();
- if (renderParams != null)
- {
- Set keys = renderParams.keySet();
- for (Iterator iter = keys.iterator(); iter.hasNext();)
- {
- String key = (String)iter.next();
- if (portletParams.containsKey(key))
- {
- String[] renderValueArray = (String[])renderParams.get(key);
- String[] portletValueArray = (String[])portletParams.get(key);
- String[] resources = new String[renderValueArray.length + portletValueArray.length];
- System.arraycopy(portletValueArray, 0, resources, 0, portletValueArray.length);
- System.arraycopy(renderValueArray, 0, resources, portletValueArray.length, renderValueArray.length);
- portletParams.put(key, resources);
- }
- else
- {
- portletParams.put(key, renderParams.get(key));
- }
- }
- portletParams.putAll(renderParams);
- }
- }
- return portletParams;
- }
-
/**
* Process Events sent by the portlet API during the processAction() and serverResource() methods defined in Portlet
* API 2.0 (JSR 286)
@@ -553,11 +504,11 @@
* If the current node is displaying a usual layout page, also tells the
* page which portlet to render or not when the state is maximized
*/
- WindowState state = new WindowState(navResponse.getWindowState().toString());
+ WindowState state = new WindowState(getWindowStateOrDefault(navResponse));
setNextState(uiPortlet, state);
// update the portlet with the next mode to display
- PortletMode mode = new PortletMode(navResponse.getMode().toString());
+ PortletMode mode = new PortletMode(getPortletModeOrDefault(navResponse));
setNextMode(uiPortlet, mode);
//TODO: (mwringe) add this to the UpdateNavigationStateResponse.Event class instead of here
@@ -609,6 +560,26 @@
return null;
}
+ private static String getPortletModeOrDefault(UpdateNavigationalStateResponse navResponse)
+ {
+ Mode mode = navResponse.getMode();
+ if (mode == null)
+ {
+ mode = Mode.VIEW;
+ }
+ return mode.toString();
+ }
+
+ private static String getWindowStateOrDefault(UpdateNavigationalStateResponse navResponse)
+ {
+ org.gatein.pc.api.WindowState state = navResponse.getWindowState();
+ if (state == null)
+ {
+ state = org.gatein.pc.api.WindowState.NORMAL;
+ }
+ return state.toString();
+ }
+
/**
* This listener is called when a RenderURL url has been generated by the portlet container. In that case it means
* that the render() method of a targeted portlet will be directly called and that the existing navigational state
@@ -619,7 +590,7 @@
public void execute(Event<UIPortlet> event) throws Exception
{
UIPortlet uiPortlet = event.getSource();
- uiPortlet.setRenderParametersMap(null);
+ uiPortlet.setNavigationalState(null);
// set the public params
HttpServletRequest request = event.getRequestContext().getRequest();
@@ -627,7 +598,7 @@
//set render params
Map<String, String[]> renderParams = ((PortalRequestContext)event.getRequestContext()).getPortletParameters();
- uiPortlet.setRenderParametersMap(renderParams);
+ uiPortlet.setNavigationalState(ParametersStateString.create(renderParams));
}
}
Modified: portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletForm.java
===================================================================
--- portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletForm.java 2009-10-28 13:55:12 UTC (rev 439)
+++ portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletForm.java 2009-10-28 18:54:30 UTC (rev 440)
@@ -1,16 +1,16 @@
/**
* Copyright (C) 2009 eXo Platform SAS.
- *
+ *
* 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
@@ -41,8 +41,8 @@
import org.exoplatform.webui.core.lifecycle.UIContainerLifecycle;
import org.exoplatform.webui.core.lifecycle.UIFormLifecycle;
import org.exoplatform.webui.event.Event;
-import org.exoplatform.webui.event.EventListener;
import org.exoplatform.webui.event.Event.Phase;
+import org.exoplatform.webui.event.EventListener;
import org.exoplatform.webui.form.UIFormCheckBoxInput;
import org.exoplatform.webui.form.UIFormInputIconSelector;
import org.exoplatform.webui.form.UIFormInputInfo;
@@ -71,21 +71,14 @@
import org.gatein.pc.portlet.impl.spi.AbstractUserContext;
import org.gatein.pc.portlet.impl.spi.AbstractWindowContext;
+import javax.portlet.PortletMode;
+import javax.servlet.http.Cookie;
import java.util.ArrayList;
import java.util.Collections;
-import java.util.HashMap;
import java.util.List;
-import java.util.Map;
import java.util.ResourceBundle;
-import javax.portlet.PortletMode;
-import javax.servlet.http.Cookie;
-
-/**
- * Author : Nhu Dinh Thuan
- * nhudinhthuan(a)yahoo.com
- * Jun 8, 2006
- */
+/** Author : Nhu Dinh Thuan nhudinhthuan(a)yahoo.com Jun 8, 2006 */
@ComponentConfigs({
@ComponentConfig(lifecycle = UIFormLifecycle.class, template = "system:/groovy/portal/webui/portal/UIPortletForm.gtmpl", events = {
@EventConfig(listeners = UIPortletForm.SaveActionListener.class),
@@ -111,21 +104,21 @@
addUIFormInput(uiPortletPrefSet);
UIFormInputSet uiSettingSet = new UIFormInputSet("PortletSetting");
uiSettingSet.
- /*addUIFormInput(new UIFormStringInput("id", "id", null).
+ /*addUIFormInput(new UIFormStringInput("id", "id", null).
addValidator(MandatoryValidator.class).setEditable(false)).
addUIFormInput(new UIFormStringInput("windowId", "windowId", null).setEditable(false)).*/
- addUIFormInput(new UIFormInputInfo("displayName", "displayName", null)).addUIFormInput(
+ addUIFormInput(new UIFormInputInfo("displayName", "displayName", null)).addUIFormInput(
new UIFormStringInput("title", "title", null).addValidator(StringLengthValidator.class, 3, 60))
.addUIFormInput(
new UIFormStringInput("width", "width", null).addValidator(ExpressionValidator.class, "(^([1-9]\\d*)px$)?",
"UIPortletForm.msg.InvalidWidthHeight")).addUIFormInput(
- new UIFormStringInput("height", "height", null).addValidator(ExpressionValidator.class,
- "(^([1-9]\\d*)px$)?", "UIPortletForm.msg.InvalidWidthHeight")).addUIFormInput(
- new UIFormCheckBoxInput("showInfoBar", "showInfoBar", false)).addUIFormInput(
- new UIFormCheckBoxInput("showPortletMode", "showPortletMode", false)).addUIFormInput(
- new UIFormCheckBoxInput("showWindowState", "showWindowState", false)).addUIFormInput(
- new UIFormTextAreaInput("description", "description", null).addValidator(StringLengthValidator.class, 0,
- 255));
+ new UIFormStringInput("height", "height", null).addValidator(ExpressionValidator.class,
+ "(^([1-9]\\d*)px$)?", "UIPortletForm.msg.InvalidWidthHeight")).addUIFormInput(
+ new UIFormCheckBoxInput("showInfoBar", "showInfoBar", false)).addUIFormInput(
+ new UIFormCheckBoxInput("showPortletMode", "showPortletMode", false)).addUIFormInput(
+ new UIFormCheckBoxInput("showWindowState", "showWindowState", false)).addUIFormInput(
+ new UIFormTextAreaInput("description", "description", null).addValidator(StringLengthValidator.class, 0,
+ 255));
addUIFormInput(uiSettingSet);
UIFormInputIconSelector uiIconSelector = new UIFormInputIconSelector("Icon", "icon");
addUIFormInput(uiIconSelector);
@@ -321,25 +314,6 @@
uiPortlet_.update(propertyChanges);
}
- private Map<String, String[]> getRenderParameterMap(UIPortlet uiPortlet)
- {
- Map<String, String[]> renderParams = uiPortlet.getRenderParametersMap();
-
- if (renderParams == null)
- {
- renderParams = new HashMap<String, String[]>();
- uiPortlet.setRenderParametersMap(renderParams);
- }
-
- /*
- * handle public params to only get the one supported by the targeted portlet
- */
- Map<String, String[]> allParams = new HashMap<String, String[]>(renderParams);
- allParams.putAll(uiPortlet.getPublicParameters());
-
- return allParams;
- }
-
static public class SaveActionListener extends EventListener<UIPortletForm>
{
public void execute(final Event<UIPortletForm> event) throws Exception
15 years, 2 months
gatein SVN: r439 - in portal/branches/performance: component/portal/src/main/java/org/exoplatform/portal/pom/config and 2 other directories.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2009-10-28 09:55:12 -0400 (Wed, 28 Oct 2009)
New Revision: 439
Modified:
portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/config/Query.java
portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMDataStorage.java
portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/pom/config/tasks/SearchTask.java
portal/branches/performance/webui/portal/src/main/java/org/exoplatform/portal/webui/util/PortalDataMapper.java
Log:
- GTNPORTAL-117 : Wrong model portal request
- PortalDataMapper does not map the page storage id
Modified: portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/config/Query.java
===================================================================
--- portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/config/Query.java 2009-10-28 10:40:05 UTC (rev 438)
+++ portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/config/Query.java 2009-10-28 13:55:12 UTC (rev 439)
@@ -114,4 +114,35 @@
this.title_ = title_;
}
+ @Override
+ public String toString()
+ {
+ StringBuilder builder = new StringBuilder("Query[");
+ if (classType_ != null)
+ {
+ builder.append("class=").append(classType_.getSimpleName()).append(",");
+ }
+ if (ownerType_ != null)
+ {
+ builder.append("ownerType=").append(ownerType_).append(",");
+ }
+ if (ownerId_ != null)
+ {
+ builder.append("ownerId=").append(ownerId_).append(",");
+ }
+ if (name_ != null)
+ {
+ builder.append("name=").append(name_).append(",");
+ }
+ if (title_ != null)
+ {
+ builder.append("title=").append(title_).append(",");
+ }
+ if (builder.charAt(builder.length() - 1) == ',')
+ {
+ builder.setLength(builder.length() - 1);
+ }
+ builder.append(']');
+ return builder.toString();
+ }
}
Modified: portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMDataStorage.java
===================================================================
--- portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMDataStorage.java 2009-10-28 10:40:05 UTC (rev 438)
+++ portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMDataStorage.java 2009-10-28 13:55:12 UTC (rev 439)
@@ -217,7 +217,7 @@
{
return (LazyPageList<T>)executor.execute(new SearchTask.FindPortletPreferences((Query<PortletPreferences>)q)).getResult();
}
- else if (PortalData.class.equals(type) && "portal".equals(q.getOwnerType()))
+ else if (PortalData.class.equals(type))
{
return (LazyPageList<T>)executor.execute(new SearchTask.FindSite((Query<PortalData>)q)).getResult();
}
@@ -227,7 +227,7 @@
}
else
{
- throw new UnsupportedOperationException("Type " + type.getName() + " cannot be searched");
+ throw new UnsupportedOperationException("Could not perform search on query " + q);
}
}
Modified: portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/pom/config/tasks/SearchTask.java
===================================================================
--- portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/pom/config/tasks/SearchTask.java 2009-10-28 10:40:05 UTC (rev 438)
+++ portal/branches/performance/component/portal/src/main/java/org/exoplatform/portal/pom/config/tasks/SearchTask.java 2009-10-28 13:55:12 UTC (rev 439)
@@ -219,7 +219,9 @@
public void run(final POMSession session) throws Exception
{
Workspace workspace = session.getWorkspace();
- final Collection<? extends Site> portals = workspace.getSites(ObjectType.PORTAL_SITE);
+ String ownerType = q.getOwnerType();
+ ObjectType<Site> siteType = ownerType == null ? ObjectType.PORTAL_SITE : Mapper.parseSiteType(ownerType);
+ final Collection<? extends Site> portals = workspace.getSites(siteType);
ListAccess<PortalData> la = new ListAccess<PortalData>()
{
public PortalData[] load(int index, int length) throws Exception, IllegalArgumentException
Modified: portal/branches/performance/webui/portal/src/main/java/org/exoplatform/portal/webui/util/PortalDataMapper.java
===================================================================
--- portal/branches/performance/webui/portal/src/main/java/org/exoplatform/portal/webui/util/PortalDataMapper.java 2009-10-28 10:40:05 UTC (rev 438)
+++ portal/branches/performance/webui/portal/src/main/java/org/exoplatform/portal/webui/util/PortalDataMapper.java 2009-10-28 13:55:12 UTC (rev 439)
@@ -304,6 +304,7 @@
private static void toUIContainer(UIContainer uiContainer, Container model, boolean dashboard) throws Exception
{
+ uiContainer.setStorageId(model.getStorageId());
uiContainer.setId(model.getId());
uiContainer.setWidth(model.getWidth());
uiContainer.setHeight(model.getHeight());
@@ -426,7 +427,6 @@
Container container = (Container)model;
UIContainer uiTempContainer =
uiContainer.createUIComponent(context, UIContainer.class, container.getFactoryId(), null);
- uiTempContainer.setStorageId(container.getStorageId());
toUIContainer(uiTempContainer, (Container)model, dashboard);
uiComponent = uiTempContainer;
}
15 years, 2 months
gatein SVN: r438 - portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config.
by do-not-reply@jboss.org
Author: tam_nguyen
Date: 2009-10-28 06:40:05 -0400 (Wed, 28 Oct 2009)
New Revision: 438
Modified:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/UserACL.java
Log:
GTNPORTAL-81 NPE when clone node by John
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/UserACL.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/UserACL.java 2009-10-28 10:11:59 UTC (rev 437)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/UserACL.java 2009-10-28 10:40:05 UTC (rev 438)
@@ -373,10 +373,12 @@
}
page.setModifiable(false);
String[] accessPerms = page.getAccessPermissions();
- for (String per : accessPerms)
- {
- if (hasPermission(identity, per))
- return true;
+ if (accessPerms != null) {
+ for (String per : accessPerms)
+ {
+ if (hasPermission(identity, per))
+ return true;
+ }
}
return false;
}
15 years, 2 months
gatein SVN: r437 - in portal/trunk: web/portal/src/main/webapp/groovy/webui/core and 1 other directory.
by do-not-reply@jboss.org
Author: truong.le
Date: 2009-10-28 06:11:59 -0400 (Wed, 28 Oct 2009)
New Revision: 437
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UIGroupNavigationManagement.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UISiteManagement.java
portal/trunk/web/portal/src/main/webapp/groovy/webui/core/UIPopupWindow.gtmpl
Log:
GTNPORTAL-58: Error after click edit navigation in special case
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UIGroupNavigationManagement.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UIGroupNavigationManagement.java 2009-10-28 08:48:06 UTC (rev 436)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UIGroupNavigationManagement.java 2009-10-28 10:11:59 UTC (rev 437)
@@ -56,6 +56,7 @@
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
+import java.util.UUID;
/*
* Created by The eXo Platform SAS
@@ -90,6 +91,7 @@
UIRepeater repeater = createUIComponent(UIRepeater.class, "UIGroupNavigationGrid", null);
virtualList.setUIComponent(repeater);
UIPopupWindow editNavigation = addChild(UIPopupWindow.class, null, null);
+ editNavigation.setId(editNavigation.getId() + "-" + UUID.randomUUID().toString().replaceAll("-", ""));
}
public void loadNavigations() throws Exception
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UISiteManagement.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UISiteManagement.java 2009-10-28 08:48:06 UTC (rev 436)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UISiteManagement.java 2009-10-28 10:11:59 UTC (rev 437)
@@ -60,6 +60,7 @@
import java.util.Comparator;
import java.util.Iterator;
import java.util.List;
+import java.util.UUID;
import javax.servlet.http.HttpServletRequest;
@@ -88,6 +89,7 @@
{
UIPopupWindow editNavigation = addChild(UIPopupWindow.class, null, null);
editNavigation.setWindowSize(400, 400);
+ editNavigation.setId(editNavigation.getId()+ "-" + UUID.randomUUID().toString().replaceAll("-", ""));
//loadPortalConfigs();
}
Modified: portal/trunk/web/portal/src/main/webapp/groovy/webui/core/UIPopupWindow.gtmpl
===================================================================
--- portal/trunk/web/portal/src/main/webapp/groovy/webui/core/UIPopupWindow.gtmpl 2009-10-28 08:48:06 UTC (rev 436)
+++ portal/trunk/web/portal/src/main/webapp/groovy/webui/core/UIPopupWindow.gtmpl 2009-10-28 10:11:59 UTC (rev 437)
@@ -7,15 +7,19 @@
* version: $Id$
*/
%>
-<%
+<%
component = uicomponent.getUIComponent();
boolean showCloseButton = uicomponent.isShowCloseButton()
String popupId = uicomponent.getId();
+ String rsId = popupId;
+ if(popupId.indexOf('-')>0){
+ rsId = popupId.substring(0,popupId.lastIndexOf('-'));
+ }
def rcontext = _ctx.getRequestContext();
rcontext.getJavascriptManager().importJavascript('eXo.webui.UIPopupWindow');
rcontext.getJavascriptManager().addJavascript("eXo.webui.UIPopupWindow.init('$popupId', $uicomponent.show, $uicomponent.resizable, true, $uicomponent.showMask);");
- String title = popupId;
+ String title = rsId;
if(component != null) title = component.getId();
int width = uicomponent.getWindowWidth();
@@ -41,7 +45,7 @@
<% } else { %>
<div class="PopupTitleIconRight"><span></span></div>
<% } %>
- <div class="PopupTitle"><%=_ctx.appRes(popupId + ".title."+ title)%></div>
+ <div class="PopupTitle"><%=_ctx.appRes(rsId + ".title."+ title)%></div>
</div>
</div>
</div>
15 years, 2 months