gatein SVN: r4866 - in portal/branches/branch-GTNPORTAL-1592: webui/portal/src/main/java/org/exoplatform/portal/webui/login and 1 other directory.
by do-not-reply@jboss.org
Author: phuong_vu
Date: 2010-10-28 03:54:19 -0400 (Thu, 28 Oct 2010)
New Revision: 4866
Modified:
portal/branches/branch-GTNPORTAL-1592/web/portal/src/main/webapp/groovy/portal/webui/UILoginForm.gtmpl
portal/branches/branch-GTNPORTAL-1592/webui/portal/src/main/java/org/exoplatform/portal/webui/login/UILoginForm.java
Log:
GTNPORTAL-1544 Always show Loading Progress bar when click Discard button on SignIn form
Modified: portal/branches/branch-GTNPORTAL-1592/web/portal/src/main/webapp/groovy/portal/webui/UILoginForm.gtmpl
===================================================================
--- portal/branches/branch-GTNPORTAL-1592/web/portal/src/main/webapp/groovy/portal/webui/UILoginForm.gtmpl 2010-10-28 07:06:34 UTC (rev 4865)
+++ portal/branches/branch-GTNPORTAL-1592/web/portal/src/main/webapp/groovy/portal/webui/UILoginForm.gtmpl 2010-10-28 07:54:19 UTC (rev 4866)
@@ -22,22 +22,20 @@
<div class="MiddleRightLoginDecorator">
<div class="LoginDecoratorBackground">
<div class="LoginDetailBox">
- <% uiform.begin(); %>
- <!--<form class="UIForm" id="$uicomponent.id" name="loginForm" action="<%= rcontext.getRequestContextPath() + "/login"%>" method="post" style="margin: 0px;">
- <input type="hidden" name="<%= uiform.ACTION %>" value=""/>-->
+ <form class="UIForm" id="$uicomponent.id" name="loginForm" action="<%= rcontext.getRequestContextPath() + "/login"%>" method="post" style="margin: 0px;">
<input type="hidden" name="initialURI" value="<%=session.getAttribute("initialURI"); %>"/>
<div class="VerticalLayout">
<table class="UIFormGrid">
<tr class="UserNameField">
<td class="FieldLabel"><%=_ctx.appRes("UILoginForm.label.UserName")%></td>
- <td><% uiform.renderChild(0)%></td>
+ <td><input class="UserName" name="username"/></td>
</tr>
<tr class="PasswordField" id="UIPortalLoginFormControl" onkeypress="eXo.portal.UIPortalControl.onEnterPress(event)">
<td class="FieldLabel"><%=_ctx.appRes("UILoginForm.label.password")%></td>
- <td><% uiform.renderChild(1)%></td>
+ <td><input class="Password" type="password" name="password"/></td>
</tr>
<tr class="RememberField" onkeypress="eXo.portal.UIPortalControl.onEnterPress(event)">
- <td class="FieldLabel"><% uiform.renderChild(2)%></td>
+ <td class="FieldLabel"><input type="checkbox" class="checkbox" value="true" name="rememberme"/></td>
<td><%=_ctx.appRes("UILoginForm.label.RememberOnComputer")%></td>
</tr>
</table>
@@ -69,7 +67,7 @@
</table>
</div>
</div>
- <%uiform.end()%>
+ </form>
</div>
</div>
</div>
@@ -84,7 +82,6 @@
<script>
function login(ele) {
var formEle = eXo.core.DOMUtil.findAncestorByTagName(ele,'form');
- formEle.action = eXo.env.portal.context + "/login";
formEle.submit();
}
</script>
Modified: portal/branches/branch-GTNPORTAL-1592/webui/portal/src/main/java/org/exoplatform/portal/webui/login/UILoginForm.java
===================================================================
--- portal/branches/branch-GTNPORTAL-1592/webui/portal/src/main/java/org/exoplatform/portal/webui/login/UILoginForm.java 2010-10-28 07:06:34 UTC (rev 4865)
+++ portal/branches/branch-GTNPORTAL-1592/webui/portal/src/main/java/org/exoplatform/portal/webui/login/UILoginForm.java 2010-10-28 07:54:19 UTC (rev 4866)
@@ -20,17 +20,13 @@
package org.exoplatform.portal.webui.login;
import org.exoplatform.portal.webui.workspace.UIMaskWorkspace;
-import org.exoplatform.web.login.InitiateLoginServlet;
+import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.EventConfig;
-import org.exoplatform.webui.core.lifecycle.UIFormLifecycle;
+import org.exoplatform.webui.core.UIComponent;
import org.exoplatform.webui.event.Event;
import org.exoplatform.webui.event.EventListener;
import org.exoplatform.webui.event.Event.Phase;
-import org.exoplatform.webui.form.UIForm;
-import org.exoplatform.webui.form.UIFormCheckBoxInput;
-import org.exoplatform.webui.form.UIFormStringInput;
-import org.exoplatform.webui.form.validator.MandatoryValidator;
/**
* Created by The eXo Platform SARL
@@ -38,26 +34,16 @@
* nhudinhthuan(a)exoplatform.com
* Jul 11, 2006
*/
-@ComponentConfig(lifecycle = UIFormLifecycle.class, template = "system:/groovy/portal/webui/UILoginForm.gtmpl", events = {
+@ComponentConfig(template = "system:/groovy/portal/webui/UILoginForm.gtmpl", events = {
@EventConfig(phase = Phase.DECODE, listeners = UIMaskWorkspace.CloseActionListener.class),
@EventConfig(phase = Phase.DECODE, listeners = UILoginForm.ForgetPasswordActionListener.class)})
-public class UILoginForm extends UIForm
+public class UILoginForm extends UIComponent
{
- final static String USER_NAME = "username";
- final static String PASSWORD = "password";
-
public UILoginForm() throws Exception
{
- addUIFormInput(new UIFormStringInput(USER_NAME, USER_NAME, null).addValidator(MandatoryValidator.class))
- .addUIFormInput(
- new UIFormStringInput(PASSWORD, PASSWORD, null).setType(UIFormStringInput.PASSWORD_TYPE).addValidator(
- MandatoryValidator.class));
- addUIFormInput(new UIFormCheckBoxInput<String>(InitiateLoginServlet.COOKIE_NAME,
- InitiateLoginServlet.COOKIE_NAME, Boolean.TRUE.toString()));
}
- //TODO: dang.tung - forget password
static public class ForgetPasswordActionListener extends EventListener<UILoginForm>
{
public void execute(Event<UILoginForm> event) throws Exception
@@ -68,4 +54,18 @@
event.getRequestContext().addUIComponentToUpdateByAjax(uiLogin);
}
}
+
+ @Override
+ public void processDecode(WebuiRequestContext context) throws Exception
+ {
+ super.processDecode(context);
+ String action = context.getRequestParameter(context.getActionParameterName());
+ Event<UIComponent> event = createEvent(action, Event.Phase.DECODE, context);
+ if (event != null)
+ {
+ event.broadcast();
+ }
+ }
+
+
}
14 years, 2 months
gatein SVN: r4864 - portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-10-27 13:31:21 -0400 (Wed, 27 Oct 2010)
New Revision: 4864
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortlet.java
Log:
- GTNPORTAL-1607: Use constant PortalContext.
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortlet.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortlet.java 2010-10-27 15:39:51 UTC (rev 4863)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortlet.java 2010-10-27 17:31:21 UTC (rev 4864)
@@ -118,6 +118,8 @@
private static final String WSRP_PREFER_OPERATION = "wsrp-preferOperation";
private static final String WSRP_REQUIRES_REWRITE = "wsrp-requiresRewrite";
private static final String WSRP_NAVIGATIONAL_VALUES = "wsrp-navigationalValues";
+ private static final AbstractPortalContext PORTAL_CONTEXT = new AbstractPortalContext(Collections.singletonMap(
+ "javax.portlet.markup.head.element.support", "true"));
/** . */
private String storageId;
@@ -863,8 +865,7 @@
//TODO: ExoUserContext impl not tested
invocation.setUserContext(new ExoUserContext(servletRequest, userProfile));
invocation.setWindowContext(new AbstractWindowContext(storageName));
- invocation.setPortalContext(new AbstractPortalContext(Collections.singletonMap(
- "javax.portlet.markup.head.element.support", "true")));
+ invocation.setPortalContext(PORTAL_CONTEXT);
invocation.setSecurityContext(new AbstractSecurityContext(servletRequest));
//
14 years, 2 months
gatein SVN: r4863 - in portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/wsrp: portal and 3 other directories.
by do-not-reply@jboss.org
Author: mwringe
Date: 2010-10-27 11:39:51 -0400 (Wed, 27 Oct 2010)
New Revision: 4863
Added:
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/wsrp/portal/
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/wsrp/portal/group/
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/wsrp/portal/group/platform/
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/wsrp/portal/group/platform/administrators/
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/wsrp/portal/group/platform/administrators/navigation.xml
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/wsrp/portal/group/platform/administrators/pages.xml
Modified:
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/wsrp/wsrp-configuration.xml
Log:
GTNPORTAL-911: add the wsrp admin to the adminstration node using the extension mechanism. This will prevent users from having to manually add the wsrp admin portlet.
Added: portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/wsrp/portal/group/platform/administrators/navigation.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/wsrp/portal/group/platform/administrators/navigation.xml (rev 0)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/wsrp/portal/group/platform/administrators/navigation.xml 2010-10-27 15:39:51 UTC (rev 4863)
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ 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.
+
+-->
+
+<node-navigation
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_objects_1_0 http://www.gatein.org/xml/ns/gatein_objects_1_0"
+ xmlns="http://www.gatein.org/xml/ns/gatein_objects_1_0">
+ <priority>2</priority>
+
+ <page-nodes>
+ <!-- TODO: enable when the extension mechanism can handle child nodes properly -->
+<!-- <node>
+ <uri>administration</uri>
+ <name>administration</name>
+ <label>#{administration.title}</label> -->
+ <node>
+ <!-- <uri>administration/wsrpConfiguration</uri> -->
+ <uri>wsrpConfiguration</uri>
+ <name>wsrpConfiguration</name>
+ <!-- TODO: add a proper i18n label here -->
+ <label>WSRP</label>
+ <page-reference>group::/platform/administrators::wsrpConfiguration</page-reference>
+ </node>
+<!-- </node> -->
+ </page-nodes>
+</node-navigation>
Added: portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/wsrp/portal/group/platform/administrators/pages.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/wsrp/portal/group/platform/administrators/pages.xml (rev 0)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/wsrp/portal/group/platform/administrators/pages.xml 2010-10-27 15:39:51 UTC (rev 4863)
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ 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.
+
+-->
+
+<page-set
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_objects_1_0 http://www.gatein.org/xml/ns/gatein_objects_1_0"
+ xmlns="http://www.gatein.org/xml/ns/gatein_objects_1_0">
+
+ <page>
+ <name>wsrpConfiguration</name>
+ <title>WSRP Admin</title>
+ <access-permissions>manager:/platform/administrators</access-permissions>
+ <edit-permission>manager:/platform/administrators</edit-permission>
+ <portlet-application>
+ <portlet>
+ <application-ref>wsrp-admin-gui</application-ref>
+ <portlet-ref>WSRPConfigurationPortlet</portlet-ref>
+ </portlet>
+ <title>WSRP Admin</title>
+ <access-permissions>manager:/platform/administrators</access-permissions>
+ <show-info-bar>false</show-info-bar>
+ </portlet-application>
+ </page>
+
+</page-set>
Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/wsrp/wsrp-configuration.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/wsrp/wsrp-configuration.xml 2010-10-27 14:33:53 UTC (rev 4862)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/wsrp/wsrp-configuration.xml 2010-10-27 15:39:51 UTC (rev 4863)
@@ -149,6 +149,41 @@
</component-plugin>
</external-component-plugins>
+ <external-component-plugins>
+ <target-component>org.exoplatform.portal.config.UserPortalConfigService</target-component>
+ <component-plugin>
+ <!-- The name of the plugin -->
+ <name>new.portal.config.user.listener</name>
+ <!-- The name of the method to call on the UserPortalConfigService in order to register the NewPortalConfigs -->
+ <set-method>initListener</set-method>
+ <!-- The full qualified name of the NewPortalConfigListener -->
+ <type>org.exoplatform.portal.config.NewPortalConfigListener</type>
+ <description>this listener init the portal configuration</description>
+ <init-params>
+ <object-param>
+ <name>group.configuration</name>
+ <description>description</description>
+ <object type="org.exoplatform.portal.config.NewPortalConfig">
+ <field name="predefinedOwner">
+ <collection type="java.util.HashSet">
+ <value>
+ <string>platform/administrators</string>
+ </value>
+ </collection>
+ </field>
+ <field name="ownerType">
+ <string>group</string>
+ </field>
+ <field name="templateLocation">
+ <string>war:/conf/wsrp/portal</string>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins>
+
+
<!--<external-component-plugins>
<target-component>org.exoplatform.commons.chromattic.ChromatticManager</target-component>
<component-plugin>
14 years, 2 months
gatein SVN: r4862 - epp/portal/branches/EPP_5_1_Branch/webui/framework/src/main/java/org/exoplatform/webui/core/lifecycle.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-10-27 10:33:53 -0400 (Wed, 27 Oct 2010)
New Revision: 4862
Modified:
epp/portal/branches/EPP_5_1_Branch/webui/framework/src/main/java/org/exoplatform/webui/core/lifecycle/WebuiBindingContext.java
Log:
JBEPP-588: Check null to catch exception of WebuiBindingContext.appRes
Modified: epp/portal/branches/EPP_5_1_Branch/webui/framework/src/main/java/org/exoplatform/webui/core/lifecycle/WebuiBindingContext.java
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/webui/framework/src/main/java/org/exoplatform/webui/core/lifecycle/WebuiBindingContext.java 2010-10-27 12:28:29 UTC (rev 4861)
+++ epp/portal/branches/EPP_5_1_Branch/webui/framework/src/main/java/org/exoplatform/webui/core/lifecycle/WebuiBindingContext.java 2010-10-27 14:33:53 UTC (rev 4862)
@@ -89,7 +89,7 @@
public String appRes(String mesgKey) throws Exception
{
- String value;
+ String value = "";
try
{
ResourceBundle res = rcontext_.getApplicationResourceBundle();
@@ -99,7 +99,8 @@
{
if (PropertyManager.isDevelopping())
log.warn("Can not find resource bundle for key : " + mesgKey);
- value = mesgKey.substring(mesgKey.lastIndexOf('.') + 1);
+ if(mesgKey != null)
+ value = mesgKey.substring(mesgKey.lastIndexOf('.') + 1);
}
return value;
}
14 years, 2 months
gatein SVN: r4861 - portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-10-27 08:28:29 -0400 (Wed, 27 Oct 2010)
New Revision: 4861
Modified:
portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/MOPConsumerStructureProvider.java
portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/WSRPServiceIntegration.java
Log:
- GTNPORTAL-1600, GTNWSRP-112: Made MOPConsumerStructureProvider listen to page events so that the internal page information structure is updated accordingly.
- Updated listeners registration to use proper method version since we're using eXo Kernel 2.2.5-GA now.
Modified: portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/MOPConsumerStructureProvider.java
===================================================================
--- portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/MOPConsumerStructureProvider.java 2010-10-27 12:22:03 UTC (rev 4860)
+++ portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/MOPConsumerStructureProvider.java 2010-10-27 12:28:29 UTC (rev 4861)
@@ -24,11 +24,15 @@
package org.gatein.portal.wsrp;
import org.exoplatform.container.ExoContainer;
+import org.exoplatform.portal.config.DataStorage;
import org.exoplatform.portal.mop.Described;
import org.exoplatform.portal.pom.config.POMSession;
import org.exoplatform.portal.pom.config.POMSessionManager;
+import org.exoplatform.portal.pom.data.Mapper;
import org.exoplatform.portal.pom.data.PageKey;
import org.exoplatform.portal.pom.spi.wsrp.WSRP;
+import org.exoplatform.services.listener.Event;
+import org.exoplatform.services.listener.Listener;
import org.gatein.common.util.ParameterValidation;
import org.gatein.mop.api.content.Customization;
import org.gatein.mop.api.workspace.ObjectType;
@@ -54,35 +58,40 @@
* @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
* @version $Revision$
*/
-public class MOPConsumerStructureProvider implements ConsumerStructureProvider
+public class MOPConsumerStructureProvider extends Listener<DataStorage, org.exoplatform.portal.config.model.Page> implements ConsumerStructureProvider
{
+ private static final String PAGES_CHILD_NAME = "pages";
private final POMSessionManager pomManager;
private Map<String, PageInfo> pageInfos;
private Map<String, String> windowIdToUUIDs;
+ private boolean pagesHaveBeenInitialized;
public MOPConsumerStructureProvider(ExoContainer container)
{
pomManager = (POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
windowIdToUUIDs = new HashMap<String, String>();
+ pageInfos = new HashMap<String, PageInfo>();
}
public List<String> getPageIdentifiers()
{
- if (pageInfos == null)
+ if (!pagesHaveBeenInitialized)
{
+ // initialize page information
POMSession session = pomManager.getSession();
Workspace workspace = session.getWorkspace();
Collection<Site> sites = workspace.getSites(ObjectType.PORTAL_SITE);
- pageInfos = new HashMap<String, PageInfo>();
for (Site site : sites)
{
- Page page = site.getRootPage().getChild("pages");
+ Page page = getPagesFrom(site);
if (page != null)
{
- processPage(page, true);
+ addPage(page, true);
}
}
+
+ pagesHaveBeenInitialized = true;
}
LinkedList<String> identifiers = new LinkedList<String>(pageInfos.keySet());
@@ -90,8 +99,16 @@
return identifiers;
}
- private void processPage(Page page, boolean ignoreCurrent)
+ private Page getPagesFrom(Site site)
{
+ // a site contains a root page with templates and pages
+ // more info at http://code.google.com/p/chromattic/wiki/MOPUseCases
+
+ return site.getRootPage().getChild(PAGES_CHILD_NAME);
+ }
+
+ private void addPage(Page page, boolean ignoreCurrent)
+ {
if (!ignoreCurrent)
{
Described described = page.adapt(Described.class);
@@ -106,7 +123,7 @@
{
for (Page child : children)
{
- processPage(child, false);
+ addPage(child, false);
}
}
}
@@ -185,6 +202,55 @@
session.close(true);
}
+ @Override
+ public void onEvent(Event<DataStorage, org.exoplatform.portal.config.model.Page> event) throws Exception
+ {
+ String eventName = event.getEventName();
+
+ // get the MOP page from the event data
+ org.exoplatform.portal.config.model.Page portalPage = event.getData();
+ Site site = pomManager.getSession().getWorkspace().getSite(Mapper.parseSiteType(portalPage.getOwnerType()), portalPage.getOwnerId());
+ Page page = getPagesFrom(site).getChild(portalPage.getName());
+
+ if (page != null)
+ {
+ if (DataStorage.PAGE_CREATED.equals(eventName))
+ {
+ // add information for new page
+ addPage(page, false);
+ }
+ else if (DataStorage.PAGE_REMOVED.equals(eventName))
+ {
+ removePage(page);
+ }
+ else if (DataStorage.PAGE_UPDATED.equals(eventName))
+ {
+ removePage(page);
+ addPage(page, false);
+ }
+ }
+ }
+
+ private void removePage(Page page)
+ {
+ Described described = page.adapt(Described.class);
+ String name = described.getName();
+
+ PageInfo pageInfo = pageInfos.get(name);
+ if (pageInfo != null)
+ {
+ // remove window information associated to the page
+ List<String> windows = pageInfo.getChildrenWindows();
+ for (String window : windows)
+ {
+ windowIdToUUIDs.remove(window);
+ }
+
+ // remove page info
+ pageInfos.remove(name);
+ }
+ }
+
private static class PageInfo
{
private String uuid;
Modified: portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/WSRPServiceIntegration.java
===================================================================
--- portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/WSRPServiceIntegration.java 2010-10-27 12:22:03 UTC (rev 4860)
+++ portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/WSRPServiceIntegration.java 2010-10-27 12:28:29 UTC (rev 4861)
@@ -27,6 +27,7 @@
import org.exoplatform.container.ExoContainerContext;
import org.exoplatform.container.configuration.ConfigurationManager;
import org.exoplatform.container.xml.InitParams;
+import org.exoplatform.portal.config.DataStorage;
import org.exoplatform.portal.pc.ExoKernelIntegration;
import org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator;
import org.exoplatform.services.listener.ListenerService;
@@ -267,20 +268,26 @@
// add our Session event listener to the ListenerService for use in org.exoplatform.web.GenericHttpListener
ListenerService listenerService = (ListenerService)container.getComponentInstanceOfType(ListenerService.class);
SessionEventListenerAndBroadcaster sessionEventBroadcaster = new SessionEventListenerAndBroadcaster();
- sessionEventBroadcaster.setName("org.exoplatform.web.GenericHttpListener.sessionCreated");
- listenerService.addListener(sessionEventBroadcaster);
- sessionEventBroadcaster.setName("org.exoplatform.web.GenericHttpListener.sessionDestroyed");
- listenerService.addListener(sessionEventBroadcaster);
+ // events from org.exoplatform.web.GenericHttpListener
+ listenerService.addListener("org.exoplatform.web.GenericHttpListener.sessionCreated", sessionEventBroadcaster);
+ listenerService.addListener("org.exoplatform.web.GenericHttpListener.sessionDestroyed", sessionEventBroadcaster);
+
try
{
consumerRegistry = new JCRConsumerRegistry(container);
consumerRegistry.setFederatingPortletInvoker(federatingPortletInvoker);
consumerRegistry.setSessionEventBroadcaster(sessionEventBroadcaster);
+ // create ConsumerStructureProvider and register it to listen to page events
+ MOPConsumerStructureProvider structureprovider = new MOPConsumerStructureProvider(container);
+ listenerService.addListener(DataStorage.PAGE_CREATED, structureprovider);
+ listenerService.addListener(DataStorage.PAGE_REMOVED, structureprovider);
+ listenerService.addListener(DataStorage.PAGE_UPDATED, structureprovider);
+
// migration service
MigrationService migrationService = new JCRMigrationService(container);
- migrationService.setStructureProvider(new MOPConsumerStructureProvider(container));
+ migrationService.setStructureProvider(structureprovider);
consumerRegistry.setMigrationService(migrationService);
consumerRegistry.start();
14 years, 2 months
gatein SVN: r4860 - in epp/portal/branches/EPP_5_1_Branch: webui/portal/src/main/java/org/exoplatform/portal/webui/application and 1 other directory.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-10-27 08:22:03 -0400 (Wed, 27 Oct 2010)
New Revision: 4860
Modified:
epp/portal/branches/EPP_5_1_Branch/web/portal/src/main/webapp/groovy/portal/webui/application/UIGadget.gtmpl
epp/portal/branches/EPP_5_1_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java
Log:
JBEPP-587: Shouldn't display edit icon with gadgets which haven't gadget preferences
Modified: epp/portal/branches/EPP_5_1_Branch/web/portal/src/main/webapp/groovy/portal/webui/application/UIGadget.gtmpl
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/web/portal/src/main/webapp/groovy/portal/webui/application/UIGadget.gtmpl 2010-10-27 12:02:52 UTC (rev 4859)
+++ epp/portal/branches/EPP_5_1_Branch/web/portal/src/main/webapp/groovy/portal/webui/application/UIGadget.gtmpl 2010-10-27 12:22:03 UTC (rev 4860)
@@ -39,8 +39,10 @@
<div class="<%=isMini ? "RestoreGadget": "MinimizeGadget";%> MinimizeAction IconControl"
onclick="eXo.gadget.UIGadget.minimizeGadget(this)" onmousedown="event.cancelBubble=true;" style="display:none;"
title="<%=isMini ? unminiTitle : miniTitle%>" miniTitle="$miniTitle" unminiTitle="$unminiTitle"><span></span></div>
- <div class="EditGadget IconControl" onclick="eXo.gadget.UIGadget.editGadget('$id')" onmousedown="event.cancelBubble=true;" title="<%=_ctx.appRes("UIGadget.tooltip.editGadget")%>"><span></span></div>
- <div class="GadgetDragHandleArea"><span></span></div>
+ <% if(uicomponent.isSettingUserPref()) { %>
+ <div class="EditGadget IconControl" onclick="eXo.gadget.UIGadget.editGadget('$id')" onmousedown="event.cancelBubble=true;" title="<%=_ctx.appRes("UIGadget.tooltip.editGadget")%>"><span></span></div>
+ <% } %>
+ <div class="GadgetDragHandleArea"><span></span></div>
<div class="GadgetTitle" style="display: none; float: none; width: auto; margin-right: 75px"><%= uicomponent.getApplicationName() %></div>
</div>
</div>
Modified: epp/portal/branches/EPP_5_1_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java 2010-10-27 12:02:52 UTC (rev 4859)
+++ epp/portal/branches/EPP_5_1_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java 2010-10-27 12:22:03 UTC (rev 4860)
@@ -38,6 +38,7 @@
import org.exoplatform.webui.event.Event;
import org.exoplatform.webui.event.EventListener;
import org.exoplatform.webui.exception.MessageException;
+import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
@@ -88,6 +89,16 @@
public static final String HOME_VIEW = "home";
public static final String CANVAS_VIEW = "canvas";
+
+ public static final String METADATA_GADGETS = "gadgets";
+
+ public static final String METADATA_USERPREFS = "userPrefs";
+
+ public static final String METADATA_USERPREFS_TYPE = "type";
+
+ public static final String METADATA_USERPREFS_TYPE_HIDDEN = "hidden";
+
+ public static final String METADATA_USERPREFS_TYPE_LIST = "list";
public String view = HOME_VIEW;
@@ -205,7 +216,7 @@
String strMetadata = GadgetUtil.fetchGagdetMetadata(getUrl());
metadata_ = new JSONObject(strMetadata);
}
- JSONObject obj = metadata_.getJSONArray("gadgets").getJSONObject(0);
+ JSONObject obj = metadata_.getJSONArray(METADATA_GADGETS).getJSONObject(0);
String token = GadgetUtil.createToken(this.getUrl(), new Random().nextLong());
obj.put("secureToken", token);
return metadata_.toString();
@@ -215,6 +226,39 @@
return null;
}
}
+ /**
+ * Check if content of gadget has <UserPref>? (Content is parsed from gadget specification in .xml file)
+ * @return boolean
+ */
+ public boolean isSettingUserPref()
+ {
+ try
+ {
+ if(metadata_ != null)
+ {
+ JSONObject obj = metadata_.getJSONArray(METADATA_GADGETS).getJSONObject(0);
+ JSONObject userPrefs = obj.getJSONObject(METADATA_USERPREFS);
+ JSONArray names = userPrefs.names();
+ int count = names.length();
+ if(count > 0)
+ {
+ for(int i = 0; i < count; i++)
+ {
+ JSONObject o = (JSONObject) userPrefs.get(names.get(i).toString());
+ if(!(o.get(METADATA_USERPREFS_TYPE).equals(METADATA_USERPREFS_TYPE_HIDDEN) ||
+ o.get(METADATA_USERPREFS_TYPE).equals(METADATA_USERPREFS_TYPE_LIST)))
+ return true;
+ }
+ return false;
+ }
+ }
+ return false;
+ }
+ catch (Exception e)
+ {
+ return false;
+ }
+ }
@Override
public boolean isRendered()
14 years, 2 months
gatein SVN: r4859 - in epp/portal/branches/EPP_5_1_Branch: webui/core/src/main/java/org/exoplatform/webui/form and 1 other directory.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-10-27 08:02:52 -0400 (Wed, 27 Oct 2010)
New Revision: 4859
Modified:
epp/portal/branches/EPP_5_1_Branch/web/eXoResources/src/main/webapp/javascript/eXo/webui/UICalendar.js
epp/portal/branches/EPP_5_1_Branch/webui/core/src/main/java/org/exoplatform/webui/form/UIFormDateTimeInput.java
Log:
JBEPP-586: Error with mini-calendar in Content Search form
Modified: epp/portal/branches/EPP_5_1_Branch/web/eXoResources/src/main/webapp/javascript/eXo/webui/UICalendar.js
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/web/eXoResources/src/main/webapp/javascript/eXo/webui/UICalendar.js 2010-10-27 11:41:42 UTC (rev 4858)
+++ epp/portal/branches/EPP_5_1_Branch/web/eXoResources/src/main/webapp/javascript/eXo/webui/UICalendar.js 2010-10-27 12:02:52 UTC (rev 4859)
@@ -68,7 +68,7 @@
}
UICalendar.prototype.show = function() {
- document.onmousedown = new Function('eXo.webui.UICalendar.hide()') ;
+ document.onclick = new Function('eXo.webui.UICalendar.hide()') ;
var re = /^(\d{1,2}\/\d{1,2}\/\d{1,4})\s*(\s+\d{1,2}:\d{1,2}:\d{1,2})?$/i ;
this.selectedDate = new Date() ;
@@ -150,35 +150,27 @@
clndr.firstChild.style.top = -heightCal.offsetHeight + 'px';
}
- var drag = document.getElementById("BlockCaledar");
- var component = eXo.core.DOMUtil.findAncestorByClass(drag, "UICalendarComponent");
- var calendar = eXo.core.DOMUtil.findFirstChildByClass(drag, "div", "UICalendar");
- var innerWidth = drag.offsetWidth;
- drag.onmousedown = function(evt) {
- var event = evt || window.event;
- event.cancelBubble = true;
- drag.style.position = "absolute";
- if(eXo.core.Browser.isIE7()) drag.style.height = calendar.offsetHeight + "px";
- drag.style.width = innerWidth + "px";
- eXo.core.DragDrop.init(null, drag, component, event);
- }
-
- //
- var primary = eXo.core.DOMUtil.findAncestorById(this.dateField, "UIECMSearch");
- if (primary && eXo.core.Browser.isFF()) {
- calendar = clndr.firstChild;
- calendar.style.top = "0px";
- calendar.style.left = this.dateField.offsetLeft - this.dateField.offsetWidth - 32 + "px";
- }
+ eXo.webui.UICalendar.initDragDrop();
+
+ var drag = document.getElementById("BlockCaledar");
+ var calendar = eXo.core.DOMUtil.findFirstChildByClass(drag, "div", "UICalendar");
+ var primary = eXo.core.DOMUtil.findAncestorById(this.dateField, "UIECMSearch");
+ if (primary && eXo.core.Browser.isFF()) {
+ calendar = clndr.firstChild;
+ calendar.style.top = "0px";
+ calendar.style.left = this.dateField.offsetLeft - this.dateField.offsetWidth - 32 + "px";
+ }
}
UICalendar.prototype.hide = function() {
if (this.dateField) {
document.getElementById(this.calendarId).firstChild.style.display = 'none' ;
// this.dateField.parentNode.style.position = '' ;
+ this.dateField.blur();
this.dateField = null ;
}
- document.onmousedown = null ;
+ document.onclick = null ;
+ //document.onmousedown = null;
}
/* TODO: Move HTML code to a javascript template file (.jstmpl) */
@@ -188,7 +180,7 @@
var startDayOfWeek = this.getDayOfWeek(this.currentDate.getFullYear(), this.currentDate.getMonth() + 1, dayOfMonth) ;
var daysInMonth = this.getDaysInMonth(this.currentDate.getFullYear(), this.currentDate.getMonth()) ;
var clazz = null;
- var table = '<div id="BlockCaledar" class="BlockCalendar">' ;
+ var table = '<div id="BlockCaledar" class="BlockCalendar" onclick="event.cancelBubble = true">' ;
table += '<div class="UICalendar" onmousedown="event.cancelBubble = true">' ;
table += ' <table class="MonthYearBox">' ;
table += ' <tr>' ;
@@ -258,13 +250,41 @@
this.currentDate.setMonth(this.currentDate.getMonth() + change) ;
var clndr = document.getElementById(this.calendarId) ;
clndr.firstChild.lastChild.innerHTML = this.renderCalendar() ;
+
+ eXo.webui.UICalendar.initDragDrop();
}
+UICalendar.prototype.initDragDrop = function() {
+ var drag = document.getElementById("BlockCaledar");
+ var component = eXo.core.DOMUtil.findAncestorByClass(drag, "UICalendarComponent");
+ var calendar = eXo.core.DOMUtil.findFirstChildByClass(drag, "div", "UICalendar");
+ var innerWidth = drag.offsetWidth;
+
+ eXo.core.DragDrop2.init(drag, component);
+ component.onDragStart = function() {
+ if(eXo.core.Browser.isIE7()) drag.style.height = calendar.offsetHeight + "px";
+ drag.style.width = innerWidth + "px";
+ }
+
+// var calendar = eXo.core.DOMUtil.findFirstChildByClass(drag, "div", "UICalendar");
+// var innerWidth = drag.offsetWidth;
+// drag.onmousedown = function(evt) {
+// var event = evt || window.event;
+// event.cancelBubble = true;
+// drag.style.position = "absolute";
+// if(eXo.core.Browser.isIE7()) drag.style.height = calendar.offsetHeight + "px";
+// drag.style.width = innerWidth + "px";
+// eXo.core.DragDrop2.init(drag, component);
+// }
+}
+
UICalendar.prototype.changeYear = function(change) {
this.currentDate.setFullYear(this.currentDate.getFullYear() + change) ;
this.currentDay = 0 ;
var clndr = document.getElementById(this.calendarId) ;
clndr.firstChild.lastChild.innerHTML = this.renderCalendar() ;
+
+ eXo.webui.UICalendar.initDragDrop();
}
UICalendar.prototype.setDate = function(year, month, day) {
Modified: epp/portal/branches/EPP_5_1_Branch/webui/core/src/main/java/org/exoplatform/webui/form/UIFormDateTimeInput.java
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/webui/core/src/main/java/org/exoplatform/webui/form/UIFormDateTimeInput.java 2010-10-27 11:41:42 UTC (rev 4858)
+++ epp/portal/branches/EPP_5_1_Branch/webui/core/src/main/java/org/exoplatform/webui/form/UIFormDateTimeInput.java 2010-10-27 12:02:52 UTC (rev 4859)
@@ -234,6 +234,6 @@
w.write(value_.toString());
w.write('\'');
}
- w.write(" onmousedown='event.cancelBubble = true' />");
+ w.write(" onclick='event.cancelBubble = true'/>");
}
}
14 years, 2 months
gatein SVN: r4858 - epp/portal/branches/EPP_5_1_Branch/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-10-27 07:41:42 -0400 (Wed, 27 Oct 2010)
New Revision: 4858
Modified:
epp/portal/branches/EPP_5_1_Branch/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIPermissionForm.java
Log:
JBEPP-585: Can't change access permission on category from public to limited by group
Modified: epp/portal/branches/EPP_5_1_Branch/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIPermissionForm.java
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIPermissionForm.java 2010-10-27 11:03:35 UTC (rev 4857)
+++ epp/portal/branches/EPP_5_1_Branch/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIPermissionForm.java 2010-10-27 11:41:42 UTC (rev 4858)
@@ -20,6 +20,7 @@
package org.exoplatform.applicationregistry.webui.component;
import org.exoplatform.application.registry.Application;
+import org.exoplatform.application.registry.ApplicationCategory;
import org.exoplatform.application.registry.ApplicationRegistryService;
import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.webui.application.WebuiRequestContext;
@@ -95,7 +96,9 @@
service.update(application_);
Application selectedApplication = getApplication();
UIApplicationOrganizer uiApplicationOrganizer = getAncestorOfType(UIApplicationOrganizer.class);
+ ApplicationCategory selectedCategory = uiApplicationOrganizer.getSelectedCategory();
uiApplicationOrganizer.reload();
+ uiApplicationOrganizer.setSelectedCategory(selectedCategory);
uiApplicationOrganizer.setSelectedApplication(selectedApplication);
}
14 years, 2 months
gatein SVN: r4857 - in epp/portal/branches/EPP_5_1_Branch/portlet/dashboard/src/main: webapp/groovy/gadget/webui/component and 1 other directory.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-10-27 07:03:35 -0400 (Wed, 27 Oct 2010)
New Revision: 4857
Modified:
epp/portal/branches/EPP_5_1_Branch/portlet/dashboard/src/main/java/org/exoplatform/gadget/webui/component/UIGadgetPortlet.java
epp/portal/branches/EPP_5_1_Branch/portlet/dashboard/src/main/webapp/groovy/gadget/webui/component/UIGadgetViewMode.gtmpl
Log:
JBEPP-584: Misleading error message when Gadget does not exist
Modified: epp/portal/branches/EPP_5_1_Branch/portlet/dashboard/src/main/java/org/exoplatform/gadget/webui/component/UIGadgetPortlet.java
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/portlet/dashboard/src/main/java/org/exoplatform/gadget/webui/component/UIGadgetPortlet.java 2010-10-27 11:03:25 UTC (rev 4856)
+++ epp/portal/branches/EPP_5_1_Branch/portlet/dashboard/src/main/java/org/exoplatform/gadget/webui/component/UIGadgetPortlet.java 2010-10-27 11:03:35 UTC (rev 4857)
@@ -75,6 +75,14 @@
{
return GadgetUtil.reproduceUrl(gadget.getUrl(), gadget.isLocal());
}
+ else
+ {
+ if (log.isWarnEnabled())
+ {
+ log.warn("The local gadget '" + gadgetName + "' was not found, nothing rendered");
+ }
+ return null;
+ }
}
catch (Exception e)
{
@@ -94,6 +102,11 @@
uiApplication.addMessage(new ApplicationMessage("UIGadgetPortlet.msg.url-invalid", null));
}
+ return getMetadata(url);
+ }
+
+ public String getMetadata(String url)
+ {
String metadata_ = GadgetUtil.fetchGagdetMetadata(url);
try
{
Modified: epp/portal/branches/EPP_5_1_Branch/portlet/dashboard/src/main/webapp/groovy/gadget/webui/component/UIGadgetViewMode.gtmpl
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/portlet/dashboard/src/main/webapp/groovy/gadget/webui/component/UIGadgetViewMode.gtmpl 2010-10-27 11:03:25 UTC (rev 4856)
+++ epp/portal/branches/EPP_5_1_Branch/portlet/dashboard/src/main/webapp/groovy/gadget/webui/component/UIGadgetViewMode.gtmpl 2010-10-27 11:03:35 UTC (rev 4857)
@@ -5,19 +5,23 @@
import org.exoplatform.webui.application.portlet.PortletRequestContext;
def hostName = GadgetUtil.getRelGadgetServerUrl();
- def rcontext = _ctx.getRequestContext() ;
- def windowId = rcontext.getWindowId();
- def id = uicomponent.getId() + "-" + windowId ;
- def url = uicomponent.getParent().getUrl();
- def metadata = uicomponent.getParent().getMetadata();
- def userPref = null;//uicomponent.getUserPref() ;
- JavascriptManager jsmanager = rcontext.getJavascriptManager();
- jsmanager.importJavascript("eXo.gadget.UIGadget") ;
- jsmanager.addCustomizedOnLoadScript("eXo.gadget.UIGadget.createGadget('$url','$id', $metadata, $userPref, 'canvas', '$hostName');") ;
- java.util.Map<String, String> metadataMap = GadgetUtil.getMapMetadata(url) ;
- String height = "auto" ;
- if(metadataMap.containsKey("height") && Integer.parseInt(metadataMap.get("height")) > 0)
- height = (Integer.parseInt(metadataMap.get("height")) + 10) + "px" ;
+ def rcontext = _ctx.getRequestContext() ;
+ def windowId = rcontext.getWindowId();
+ def id = uicomponent.getId() + "-" + windowId ;
+ def url = uicomponent.getParent().getUrl();
+ def height = "auto" ;
+
+ if(url != null) {
+ def metadata = uicomponent.getParent().getMetadata(url);
+ def userPref = null;
+ JavascriptManager jsmanager = rcontext.getJavascriptManager();
+ jsmanager.importJavascript("eXo.gadget.UIGadget") ;
+ jsmanager.addCustomizedOnLoadScript("eXo.gadget.UIGadget.createGadget('$url','$id', $metadata, $userPref, 'canvas', '$hostName');") ;
+ java.util.Map<String, String> metadataMap = GadgetUtil.getMapMetadata(url) ;
+
+ if(metadataMap.containsKey("height") && Integer.parseInt(metadataMap.get("height")) > 0)
+ height = (Integer.parseInt(metadataMap.get("height")) + 10) + "px" ;
+ }
%>
<div class="UIGadgetViewMode" id="$id" style="height: <%=height%>;"></div>
14 years, 2 months
gatein SVN: r4856 - portal/branches/branch-GTNPORTAL-1592/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIPopup/UIPopupCategory.
by do-not-reply@jboss.org
Author: kien_nguyen
Date: 2010-10-27 07:03:25 -0400 (Wed, 27 Oct 2010)
New Revision: 4856
Modified:
portal/branches/branch-GTNPORTAL-1592/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIPopup/UIPopupCategory/Stylesheet.css
Log:
GTNPORTAL-793 Use portlet mode display name instead of name
Modified: portal/branches/branch-GTNPORTAL-1592/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIPopup/UIPopupCategory/Stylesheet.css
===================================================================
--- portal/branches/branch-GTNPORTAL-1592/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIPopup/UIPopupCategory/Stylesheet.css 2010-10-27 10:36:41 UTC (rev 4855)
+++ portal/branches/branch-GTNPORTAL-1592/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIPopup/UIPopupCategory/Stylesheet.css 2010-10-27 11:03:25 UTC (rev 4856)
@@ -121,7 +121,8 @@
padding-left: 18px; /* orientation=lt */
padding-right: 18px; /* orientation=rt */
height: 22px;
- line-height: 22px;
+ line-height: 22px;
+ overflow: hidden;
background: url('/eXoResources/skin/DefaultSkin/skinIcons/16x16/icons/GrayNextArrow.gif') no-repeat left center; /* orientation=lt */
background: url('/eXoResources/skin/DefaultSkin/skinIcons/16x16/icons/GrayNextArrow-rt.gif') no-repeat right center; /* orientation=rt */
}
\ No newline at end of file
14 years, 2 months