gatein SVN: r4876 - portal/trunk/component/web/resources/src/main/java/org/exoplatform/portal/resource.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2010-10-30 07:57:04 -0400 (Sat, 30 Oct 2010)
New Revision: 4876
Modified:
portal/trunk/component/web/resources/src/main/java/org/exoplatform/portal/resource/SkinService.java
Log:
attunement
Modified: portal/trunk/component/web/resources/src/main/java/org/exoplatform/portal/resource/SkinService.java
===================================================================
--- portal/trunk/component/web/resources/src/main/java/org/exoplatform/portal/resource/SkinService.java 2010-10-30 09:54:44 UTC (rev 4875)
+++ portal/trunk/component/web/resources/src/main/java/org/exoplatform/portal/resource/SkinService.java 2010-10-30 11:57:04 UTC (rev 4876)
@@ -64,9 +64,7 @@
import javax.servlet.ServletContext;
@Managed
-@NameTemplate({
- @Property(key = "view", value = "portal"),
- @Property(key = "service", value = "management"),
+@NameTemplate({@Property(key = "view", value = "portal"), @Property(key = "service", value = "management"),
@Property(key = "type", value = "skin")})
@ManagedDescription("Skin service")
@RESTEndpoint(path = "skinservice")
@@ -170,17 +168,12 @@
};
//
- FutureExoCache<String, CachedStylesheet, Orientation> ltCache = new FutureExoCache<String, CachedStylesheet, Orientation>(loader, new ConcurrentFIFOExoCache<String, CachedStylesheet>(200));
- FutureExoCache<String, CachedStylesheet, Orientation> rtCache = new FutureExoCache<String, CachedStylesheet, Orientation>(loader, new ConcurrentFIFOExoCache<String, CachedStylesheet>(200));
-
-
- //
this.compressor = compressor;
portalSkins_ = new LinkedHashMap<SkinKey, SkinConfig>();
skinConfigs_ = new LinkedHashMap<SkinKey, SkinConfig>(20);
availableSkins_ = new HashSet<String>(5);
- this.ltCache = ltCache;
- this.rtCache = rtCache;
+ ltCache = new FutureExoCache<String, CachedStylesheet, Orientation>(loader, new ConcurrentFIFOExoCache<String, CachedStylesheet>(200));
+ rtCache = new FutureExoCache<String, CachedStylesheet, Orientation>(loader, new ConcurrentFIFOExoCache<String, CachedStylesheet>(200));
portletThemes_ = new HashMap<String, Set<String>>();
portalContainerName = context.getPortalContainerName();
mainResolver = new MainResourceResolver(portalContainerName, skinConfigs_);
@@ -274,8 +267,6 @@
log.debug("Adding Portal skin : Bind " + key + " to " + skinConfig);
}
}
-
- //
ltCache.remove(cssPath);
rtCache.remove(cssPath);
}
@@ -353,12 +344,17 @@
/**
*
- * Register the Skin for available portal Skins. Do not replace existing skin.
+ * Register the Skin for available portal Skins. Do not replace existed Skin
*
- * @param module skin module identifier
- * @param skinName skin name
- * @param cssPath path uri to the css file. This is relative to the root context, use leading '/'
- * @param cssData the data
+ * @param module
+ * skin module identifier
+ * @param skinName
+ * skin name
+ * @param cssPath
+ * path uri to the css file. This is relative to the root context,
+ * use leading '/'
+ * @param scontext
+ * the webapp's {@link javax.servlet.ServletContext}
*/
public void addSkin(String module, String skinName, String cssPath, String cssData)
{
@@ -369,8 +365,6 @@
{
skinConfigs_.put(key, new SimpleSkin(this, module, skinName, cssPath));
}
-
- // Evict
ltCache.remove(cssPath);
rtCache.remove(cssPath);
}
@@ -474,6 +468,7 @@
//
FutureExoCache<String, CachedStylesheet, Orientation> cache = orientation == Orientation.LT ? ltCache : rtCache;
CachedStylesheet cachedCss = cache.get(orientation, path);
+
cachedCss.writeTo(renderer.getOutput());
}
else
@@ -493,7 +488,7 @@
*/
public String getMergedCSS(String cssPath)
{
- CachedStylesheet stylesheet = ltCache.get(null, cssPath);
+ CachedStylesheet stylesheet = ltCache.get(Orientation.LT, cssPath);
return stylesheet != null ? stylesheet.getText() : null;
}
@@ -780,7 +775,7 @@
/**
* Get Suffix of Orientation
- * @param orientation the orientation
+ * @param orientation
* @return Suffix of Orientation
*/
String getSuffix(Orientation orientation)
14 years, 1 month
gatein SVN: r4875 - in portal/branches/branch-GTNPORTAL-1592: web/portal/src/main/webapp/groovy/portal/webui/page and 1 other directories.
by do-not-reply@jboss.org
Author: phuong_vu
Date: 2010-10-30 05:54:44 -0400 (Sat, 30 Oct 2010)
New Revision: 4875
Modified:
portal/branches/branch-GTNPORTAL-1592/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIPopupWindow.js
portal/branches/branch-GTNPORTAL-1592/web/portal/src/main/webapp/groovy/portal/webui/page/UIPageSelector2.gtmpl
portal/branches/branch-GTNPORTAL-1592/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageSelector2.java
Log:
GTNPORTAL-1609 Can't do any action after open 3 Popup Window
Modified: portal/branches/branch-GTNPORTAL-1592/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIPopupWindow.js
===================================================================
--- portal/branches/branch-GTNPORTAL-1592/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIPopupWindow.js 2010-10-29 16:26:26 UTC (rev 4874)
+++ portal/branches/branch-GTNPORTAL-1592/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIPopupWindow.js 2010-10-30 09:54:44 UTC (rev 4875)
@@ -69,17 +69,20 @@
UIPopupWindow.prototype.showMask = function(popup, isShowPopup) {
var mask = popup.previousSibling;
+ //Make sure mask is not TextNode because of previousSibling property
+ if (mask && mask.className != "MaskLayer") {
+ mask = null;
+ }
if(isShowPopup) {
//Modal if popup is portal component
if (eXo.core.DOMUtil.findAncestorByClass(popup, "PORTLET-FRAGMENT") == null) {
- eXo.core.UIMaskLayer.createMask(popup.parentNode, popup, 1) ;
+ if(!mask) eXo.core.UIMaskLayer.createMask(popup.parentNode, popup, 1) ;
} else {
- //If popup is portlet's component, modal with just its parent
- eXo.core.UIMaskLayer.createMaskForFrame(popup.parentNode, popup, 1) ;
+ //If popup is portlet's component, modal with just its parent
+ if(!mask) eXo.core.UIMaskLayer.createMaskForFrame(popup.parentNode, popup, 1) ;
}
- } else {
- //Make sure mask is not TextNode because of previousSibling property
- if(mask != null && mask.className == "MaskLayer") eXo.core.UIMaskLayer.removeMask(mask) ;
+ } else {
+ if(mask) eXo.core.UIMaskLayer.removeMask(mask) ;
}
} ;
Modified: portal/branches/branch-GTNPORTAL-1592/web/portal/src/main/webapp/groovy/portal/webui/page/UIPageSelector2.gtmpl
===================================================================
--- portal/branches/branch-GTNPORTAL-1592/web/portal/src/main/webapp/groovy/portal/webui/page/UIPageSelector2.gtmpl 2010-10-29 16:26:26 UTC (rev 4874)
+++ portal/branches/branch-GTNPORTAL-1592/web/portal/src/main/webapp/groovy/portal/webui/page/UIPageSelector2.gtmpl 2010-10-30 09:54:44 UTC (rev 4875)
@@ -108,7 +108,7 @@
</div>
<% } %>
- <div class="ActionButton SimpleStyle" onclick="javascript: eXo.webui.UIPopupWindow.show('<%=uicomponent.getChild(UIPopupWindow.class).getId();%>');">
+ <div class="ActionButton SimpleStyle" onclick="javascript: eXo.webui.UIPopupWindow.show('<%=uicomponent.getChild(UIPopupWindow.class).getId();%>', true);">
<div class="ButtonLeft">
<div class="ButtonRight">
<div class="ButtonMiddle">
Modified: portal/branches/branch-GTNPORTAL-1592/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageSelector2.java
===================================================================
--- portal/branches/branch-GTNPORTAL-1592/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageSelector2.java 2010-10-29 16:26:26 UTC (rev 4874)
+++ portal/branches/branch-GTNPORTAL-1592/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageSelector2.java 2010-10-30 09:54:44 UTC (rev 4875)
@@ -65,6 +65,7 @@
super("UIPageSelector2", null);
UIFormPopupWindow uiPopup = addChild(UIFormPopupWindow.class, null, "PopupPageSelector2");
uiPopup.setWindowSize(900, 400);
+ uiPopup.setShowMask(true);
uiPopup.setRendered(false);
UIPageBrowser uiPageBrowser = createUIComponent(UIPageBrowser.class, "SelectPage", null);
uiPopup.setUIComponent(uiPageBrowser);
14 years, 1 month
gatein SVN: r4874 - in portal/trunk/component: web/resources/src/main/java/org/exoplatform/portal/resource and 1 other directory.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2010-10-29 12:26:26 -0400 (Fri, 29 Oct 2010)
New Revision: 4874
Modified:
portal/trunk/component/common/src/main/java/org/exoplatform/commons/cache/future/FutureExoCache.java
portal/trunk/component/web/resources/src/main/java/org/exoplatform/portal/resource/SkinService.java
Log:
GTNPORTAL-1611 : iUse FutureCache in SkinService as it avoids concurrent creation of the same skin that is now expensive due to resource compression
Modified: portal/trunk/component/common/src/main/java/org/exoplatform/commons/cache/future/FutureExoCache.java
===================================================================
--- portal/trunk/component/common/src/main/java/org/exoplatform/commons/cache/future/FutureExoCache.java 2010-10-29 15:02:06 UTC (rev 4873)
+++ portal/trunk/component/common/src/main/java/org/exoplatform/commons/cache/future/FutureExoCache.java 2010-10-29 16:26:26 UTC (rev 4874)
@@ -41,6 +41,16 @@
this.cache = cache;
}
+ public void clear()
+ {
+ cache.clearCache();
+ }
+
+ public void remove(K key)
+ {
+ cache.remove(key);
+ }
+
@Override
protected V get(K key)
{
Modified: portal/trunk/component/web/resources/src/main/java/org/exoplatform/portal/resource/SkinService.java
===================================================================
--- portal/trunk/component/web/resources/src/main/java/org/exoplatform/portal/resource/SkinService.java 2010-10-29 15:02:06 UTC (rev 4873)
+++ portal/trunk/component/web/resources/src/main/java/org/exoplatform/portal/resource/SkinService.java 2010-10-29 16:26:26 UTC (rev 4874)
@@ -19,6 +19,8 @@
package org.exoplatform.portal.resource;
+import org.exoplatform.commons.cache.future.FutureExoCache;
+import org.exoplatform.commons.cache.future.Loader;
import org.exoplatform.commons.utils.BinaryOutput;
import org.exoplatform.commons.utils.ByteArrayOutput;
import org.exoplatform.commons.utils.PropertyManager;
@@ -34,6 +36,7 @@
import org.exoplatform.management.rest.annotations.RESTEndpoint;
import org.exoplatform.portal.resource.compressor.ResourceCompressor;
import org.exoplatform.portal.resource.compressor.ResourceType;
+import org.exoplatform.services.cache.concurrent.ConcurrentFIFOExoCache;
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
import org.exoplatform.services.resources.Orientation;
@@ -55,14 +58,15 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.servlet.ServletContext;
@Managed
-@NameTemplate({@Property(key = "view", value = "portal"), @Property(key = "service", value = "management"),
+@NameTemplate({
+ @Property(key = "view", value = "portal"),
+ @Property(key = "service", value = "management"),
@Property(key = "type", value = "skin")})
@ManagedDescription("Skin service")
@RESTEndpoint(path = "skinservice")
@@ -117,9 +121,9 @@
private final HashSet<String> availableSkins_;
- private final Map<String, CachedStylesheet> ltCache;
+ private final FutureExoCache<String, CachedStylesheet, Orientation> ltCache;
- private final Map<String, CachedStylesheet> rtCache;
+ private final FutureExoCache<String, CachedStylesheet, Orientation> rtCache;
private final Map<String, Set<String>> portletThemes_;
@@ -142,12 +146,41 @@
public SkinService(ExoContainerContext context, ResourceCompressor compressor)
{
+ Loader<String, CachedStylesheet, Orientation> loader = new Loader<String, CachedStylesheet, Orientation>()
+ {
+ public CachedStylesheet retrieve(Orientation context, String key) throws Exception
+ {
+ StringBuffer sb = new StringBuffer();
+ processCSS(sb, key, context, true);
+ String css;
+ try
+ {
+ StringWriter output = new StringWriter();
+ SkinService.this.compressor.compress(new StringReader(sb.toString()), output, ResourceType.STYLESHEET);
+ css = output.toString();
+ }
+ catch (Exception e)
+ {
+ log.warn("Error when compressing CSS " + key + " for orientation " + context + " will use normal CSS instead", e);
+ css = sb.toString();
+ }
+
+ return new CachedStylesheet(css);
+ }
+ };
+
+ //
+ FutureExoCache<String, CachedStylesheet, Orientation> ltCache = new FutureExoCache<String, CachedStylesheet, Orientation>(loader, new ConcurrentFIFOExoCache<String, CachedStylesheet>(200));
+ FutureExoCache<String, CachedStylesheet, Orientation> rtCache = new FutureExoCache<String, CachedStylesheet, Orientation>(loader, new ConcurrentFIFOExoCache<String, CachedStylesheet>(200));
+
+
+ //
this.compressor = compressor;
portalSkins_ = new LinkedHashMap<SkinKey, SkinConfig>();
skinConfigs_ = new LinkedHashMap<SkinKey, SkinConfig>(20);
availableSkins_ = new HashSet<String>(5);
- ltCache = new ConcurrentHashMap<String, CachedStylesheet>();
- rtCache = new ConcurrentHashMap<String, CachedStylesheet>();
+ this.ltCache = ltCache;
+ this.rtCache = rtCache;
portletThemes_ = new HashMap<String, Set<String>>();
portalContainerName = context.getPortalContainerName();
mainResolver = new MainResourceResolver(portalContainerName, skinConfigs_);
@@ -241,18 +274,10 @@
log.debug("Adding Portal skin : Bind " + key + " to " + skinConfig);
}
}
- try
- {
- StringWriter output = new StringWriter();
- compressor.compress(new StringReader(cssData), output, ResourceType.STYLESHEET);
- cssData = output.toString();
- }
- catch (Exception e)
- {
- log.debug("Error when compressing CSS, will use normal CSS instead", e);
- }
- ltCache.put(cssPath, new CachedStylesheet(cssData));
- rtCache.put(cssPath, new CachedStylesheet(cssData));
+
+ //
+ ltCache.remove(cssPath);
+ rtCache.remove(cssPath);
}
@@ -328,17 +353,12 @@
/**
*
- * Register the Skin for available portal Skins. Do not replace existed Skin
+ * Register the Skin for available portal Skins. Do not replace existing skin.
*
- * @param module
- * skin module identifier
- * @param skinName
- * skin name
- * @param cssPath
- * path uri to the css file. This is relative to the root context,
- * use leading '/'
- * @param scontext
- * the webapp's {@link javax.servlet.ServletContext}
+ * @param module skin module identifier
+ * @param skinName skin name
+ * @param cssPath path uri to the css file. This is relative to the root context, use leading '/'
+ * @param cssData the data
*/
public void addSkin(String module, String skinName, String cssPath, String cssData)
{
@@ -349,8 +369,10 @@
{
skinConfigs_.put(key, new SimpleSkin(this, module, skinName, cssPath));
}
- ltCache.put(cssPath, new CachedStylesheet(cssData));
- rtCache.put(cssPath, new CachedStylesheet(cssData));
+
+ // Evict
+ ltCache.remove(cssPath);
+ rtCache.remove(cssPath);
}
/**
@@ -450,28 +472,8 @@
}
//
- Map<String, CachedStylesheet> cache = orientation == Orientation.LT ? ltCache : rtCache;
- CachedStylesheet cachedCss = cache.get(path);
- if (cachedCss == null)
- {
- StringBuffer sb = new StringBuffer();
- processCSS(sb, path, orientation, true);
- String css;
- try
- {
- StringWriter output = new StringWriter();
- compressor.compress(new StringReader(sb.toString()), output, ResourceType.STYLESHEET);
- css = output.toString();
- }
- catch (Exception e)
- {
- log.debug("Error when compressing CSS, will use normal CSS instead", e);
- css = sb.toString();
- }
-
- cachedCss = new CachedStylesheet(css);
- cache.put(path, cachedCss);
- }
+ FutureExoCache<String, CachedStylesheet, Orientation> cache = orientation == Orientation.LT ? ltCache : rtCache;
+ CachedStylesheet cachedCss = cache.get(orientation, path);
cachedCss.writeTo(renderer.getOutput());
}
else
@@ -491,7 +493,7 @@
*/
public String getMergedCSS(String cssPath)
{
- CachedStylesheet stylesheet = ltCache.get(cssPath);
+ CachedStylesheet stylesheet = ltCache.get(null, cssPath);
return stylesheet != null ? stylesheet.getText() : null;
}
@@ -778,7 +780,7 @@
/**
* Get Suffix of Orientation
- * @param orientation
+ * @param orientation the orientation
* @return Suffix of Orientation
*/
String getSuffix(Orientation orientation)
14 years, 1 month
gatein SVN: r4873 - 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-29 11:02:06 -0400 (Fri, 29 Oct 2010)
New Revision: 4873
Modified:
portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/MOPConsumerStructureProvider.java
Log:
- GTNPORTAL-126: Make PageInfo maintain window name -> uuid mapping instead of it being done at the top level to avoid collisions (previous implementation was quite stupid, actually!) :/
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-28 15:55:36 UTC (rev 4872)
+++ portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/MOPConsumerStructureProvider.java 2010-10-29 15:02:06 UTC (rev 4873)
@@ -47,6 +47,7 @@
import org.gatein.pc.api.StatefulPortletContext;
import org.gatein.wsrp.api.context.ConsumerStructureProvider;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
@@ -63,13 +64,11 @@
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>();
}
@@ -112,8 +111,8 @@
if (!ignoreCurrent)
{
Described described = page.adapt(Described.class);
- PageInfo pageInfo = new PageInfo(page.getObjectId());
- pageInfos.put(described.getName(), pageInfo);
+ PageInfo pageInfo = new PageInfo(page.getObjectId(), described.getName());
+ pageInfos.put(pageInfo.getName(), pageInfo);
UIContainer container = page.getRootComponent();
processContainer(container, pageInfo);
}
@@ -146,8 +145,8 @@
{
Described described = component.adapt(Described.class);
String name = described.getName();
- windowIdToUUIDs.put(name, component.getObjectId());
- pageInfo.addWindow(name);
+
+ pageInfo.addWindow(name, component.getObjectId());
}
else if (ObjectType.CONTAINER.equals(type))
{
@@ -162,7 +161,8 @@
public void assignPortletToWindow(PortletContext portletContext, String windowId, String pageId, String exportedPortletHandle)
{
- String uuid = windowIdToUUIDs.get(windowId);
+ PageInfo pageInfo = pageInfos.get(pageId);
+ String uuid = pageInfo.getWindowUUID(windowId);
ParameterValidation.throwIllegalArgExceptionIfNull(uuid, "UUID for " + windowId);
// get the window
@@ -195,8 +195,12 @@
// Change the window's name so that it's less confusing to users
Described described = window.adapt(Described.class);
- described.setName(exportedPortletHandle + " (remote)"); // should be the same as ApplicationRegistryService.REMOTE_DISPLAY_NAME_SUFFIX
+ String newName = exportedPortletHandle + " (remote)";
+ described.setName(newName); // should be the same as ApplicationRegistryService.REMOTE_DISPLAY_NAME_SUFFIX
+ // update window mappings
+ pageInfo.updateWindowName(windowId, newName);
+
// mark page for cache invalidation otherwise DataCache will use the previous customization id when trying to set
// the portlet state in UIPortlet.setState and will not find it resulting in an error
Page page = window.getPage();
@@ -243,13 +247,6 @@
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);
}
@@ -257,13 +254,14 @@
private static class PageInfo
{
- private String uuid;
- private List<String> childrenWindows;
+ private final String uuid;
+ private final Map<String, String> childrenWindows = new HashMap<String, String>();
+ private final String name;
- private PageInfo(String uuid)
+ private PageInfo(String uuid, String name)
{
this.uuid = uuid;
- childrenWindows = new LinkedList<String>();
+ this.name = name;
}
public String getUUID()
@@ -273,12 +271,42 @@
public List<String> getChildrenWindows()
{
- return childrenWindows;
+ return new ArrayList<String>(childrenWindows.keySet());
}
- public void addWindow(String windowName)
+ public void addWindow(String windowName, String uuid)
{
- childrenWindows.add(windowName);
+ // add suffix in case we have several windows with the same name in the page
+ if (childrenWindows.containsKey(windowName))
+ {
+ if (windowName.endsWith("|"))
+ {
+ windowName += "|";
+ }
+ else
+ {
+ windowName += windowName + " |";
+ }
+ }
+
+ childrenWindows.put(windowName, uuid);
}
+
+ public void updateWindowName(String oldWindowName, String newWindowName)
+ {
+ String windowUUID = getWindowUUID(oldWindowName);
+ childrenWindows.remove(oldWindowName);
+ childrenWindows.put(newWindowName, windowUUID);
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public String getWindowUUID(String windowId)
+ {
+ return childrenWindows.get(windowId);
+ }
}
}
14 years, 1 month
gatein SVN: r4872 - portal/branches/branch-GTNPORTAL-1592/web/portal/src/main/webapp/WEB-INF/classes/locale/portal.
by do-not-reply@jboss.org
Author: ndkhoiits
Date: 2010-10-28 11:55:36 -0400 (Thu, 28 Oct 2010)
New Revision: 4872
Modified:
portal/branches/branch-GTNPORTAL-1592/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_ar.xml
Log:
GTNPORTAL-1547 Display 2 languages in message with StringLengthValidator when change to Arabic
Modified: portal/branches/branch-GTNPORTAL-1592/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_ar.xml
===================================================================
--- portal/branches/branch-GTNPORTAL-1592/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_ar.xml 2010-10-28 15:55:25 UTC (rev 4871)
+++ portal/branches/branch-GTNPORTAL-1592/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_ar.xml 2010-10-28 15:55:36 UTC (rev 4872)
@@ -84,13 +84,13 @@
<UITestForm>
<label>وجهات إضافة التطبيقات </label>
</UITestForm>
- <StringLengthValidator>
- <msg>
- <length-invalid> "{2}" يجب أن يكون لحصل "{0}" طوله بين "{1}" و
- </length-invalid>
- </msg>
- </StringLengthValidator>
</EmptyFieldValidator>
+ <StringLengthValidator>
+ <msg>
+ <length-invalid> "{2}" يجب أن يكون لحصل "{0}" طوله بين "{1}" و
+ </length-invalid>
+ </msg>
+ </StringLengthValidator>
<!--
#############################################################################
# Email Address Validator #
14 years, 2 months
gatein SVN: r4871 - in portal/trunk: component/wsrp/src/main/java/org/gatein/portal/wsrp and 1 other directory.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-10-28 11:55:25 -0400 (Thu, 28 Oct 2010)
New Revision: 4871
Modified:
portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/MOPConsumerStructureProvider.java
portal/trunk/pom.xml
Log:
- GTNWSRP-143: Update MOPConsumerStructureProvider to API change and use new specified parameter to update window name so that it's less confusing for users.
- Updated to PC 2.2.0-CR01 and WSRP-2.0.0-CR01-SNAPSHOT.
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-28 15:29:33 UTC (rev 4870)
+++ portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/MOPConsumerStructureProvider.java 2010-10-28 15:55:25 UTC (rev 4871)
@@ -160,7 +160,7 @@
}
}
- public void assignPortletToWindow(PortletContext portletContext, String windowId, String pageId)
+ public void assignPortletToWindow(PortletContext portletContext, String windowId, String pageId, String exportedPortletHandle)
{
String uuid = windowIdToUUIDs.get(windowId);
ParameterValidation.throwIllegalArgExceptionIfNull(uuid, "UUID for " + windowId);
@@ -193,6 +193,10 @@
// and re-customize
window.customize(WSRP.CONTENT_TYPE, portletId, wsrp);
+ // Change the window's name so that it's less confusing to users
+ Described described = window.adapt(Described.class);
+ described.setName(exportedPortletHandle + " (remote)"); // should be the same as ApplicationRegistryService.REMOTE_DISPLAY_NAME_SUFFIX
+
// mark page for cache invalidation otherwise DataCache will use the previous customization id when trying to set
// the portlet state in UIPortlet.setState and will not find it resulting in an error
Page page = window.getPage();
Modified: portal/trunk/pom.xml
===================================================================
--- portal/trunk/pom.xml 2010-10-28 15:29:33 UTC (rev 4870)
+++ portal/trunk/pom.xml 2010-10-28 15:55:25 UTC (rev 4871)
@@ -46,9 +46,9 @@
<nl.captcha.simplecaptcha.version>1.1.1-GA-Patch01</nl.captcha.simplecaptcha.version>
<org.gatein.common.version>2.0.3-GA</org.gatein.common.version>
<org.gatein.wci.version>2.0.2-GA</org.gatein.wci.version>
- <org.gatein.pc.version>2.2.0-Beta06</org.gatein.pc.version>
+ <org.gatein.pc.version>2.2.0-CR01</org.gatein.pc.version>
<org.picketlink.idm>1.1.6.GA</org.picketlink.idm>
- <org.gatein.wsrp.version>2.0.0-Beta03</org.gatein.wsrp.version>
+ <org.gatein.wsrp.version>2.0.0-CR01-SNAPSHOT</org.gatein.wsrp.version>
<org.gatein.mop.version>1.0.3-GA</org.gatein.mop.version>
<org.slf4j.version>1.5.6</org.slf4j.version>
<rhino.version>1.6R5</rhino.version>
14 years, 2 months
gatein SVN: r4870 - in components/wsrp/trunk: api/src/main/java/org/gatein/wsrp/api/context and 1 other directory.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-10-28 11:29:33 -0400 (Thu, 28 Oct 2010)
New Revision: 4870
Modified:
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerBean.java
components/wsrp/trunk/api/src/main/java/org/gatein/wsrp/api/context/ConsumerStructureProvider.java
Log:
- GTNWSRP-117: automatically select window if there's only one associated with selected page to bypass the fact that select event might not be triggered by JSF
- GTNWSRP-143: pass selected exported portlet handle to assignPortletToWindow method so that it can be used to update the window name.
Modified: components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerBean.java
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerBean.java 2010-10-28 14:27:24 UTC (rev 4869)
+++ components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerBean.java 2010-10-28 15:29:33 UTC (rev 4870)
@@ -619,10 +619,11 @@
int importCount = 0;
for (SelectablePortletHandle importedPortlet : portletsToImport)
{
- PortletContext portletContext = info.getPortletContextFor(importedPortlet.getHandle());
+ String handle = importedPortlet.getHandle();
+ PortletContext portletContext = info.getPortletContextFor(handle);
if (portletContext != null)
{
- structureProvider.assignPortletToWindow(portletContext, importedPortlet.getWindow(), importedPortlet.getPage());
+ structureProvider.assignPortletToWindow(portletContext, importedPortlet.getWindow(), importedPortlet.getPage(), handle);
importCount++;
}
}
@@ -734,6 +735,16 @@
{
page = (String)event.getNewValue();
+ // if we only have one window, select it automatically as a select event might not be triggerer if there's only one :/
+ if (page != null)
+ {
+ List<String> windows = provider.getWindowIdentifiersFor(page);
+ if (ParameterValidation.existsAndIsNotEmpty(windows) && windows.size() == 1)
+ {
+ window = windows.get(0);
+ }
+ }
+
// bypass the rest of the life cycle and re-display page
FacesContext.getCurrentInstance().renderResponse();
}
Modified: components/wsrp/trunk/api/src/main/java/org/gatein/wsrp/api/context/ConsumerStructureProvider.java
===================================================================
--- components/wsrp/trunk/api/src/main/java/org/gatein/wsrp/api/context/ConsumerStructureProvider.java 2010-10-28 14:27:24 UTC (rev 4869)
+++ components/wsrp/trunk/api/src/main/java/org/gatein/wsrp/api/context/ConsumerStructureProvider.java 2010-10-28 15:29:33 UTC (rev 4870)
@@ -37,5 +37,5 @@
List<String> getWindowIdentifiersFor(String pageId);
- void assignPortletToWindow(PortletContext portletContext, String windowId, String pageId);
+ void assignPortletToWindow(PortletContext portletContext, String windowId, String pageId, String exportedPortletHandle);
}
14 years, 2 months
gatein SVN: r4869 - in portal/trunk/docs: reference-guide and 1 other directories.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-10-28 10:27:24 -0400 (Thu, 28 Oct 2010)
New Revision: 4869
Modified:
portal/trunk/docs/pom.xml
portal/trunk/docs/reference-guide/pom.xml
portal/trunk/docs/user-guide/pom.xml
Log:
Parent not in sync for version, not sure why...
Modified: portal/trunk/docs/pom.xml
===================================================================
--- portal/trunk/docs/pom.xml 2010-10-28 10:08:10 UTC (rev 4868)
+++ portal/trunk/docs/pom.xml 2010-10-28 14:27:24 UTC (rev 4869)
@@ -26,7 +26,7 @@
<parent>
<groupId>org.exoplatform.portal</groupId>
<artifactId>exo.portal.parent</artifactId>
- <version>3.0.1-GA-SNAPSHOT</version>
+ <version>3.2.0-Beta01-SNAPSHOT</version>
</parent>
<groupId>org.gatein.doc</groupId>
Modified: portal/trunk/docs/reference-guide/pom.xml
===================================================================
--- portal/trunk/docs/reference-guide/pom.xml 2010-10-28 10:08:10 UTC (rev 4868)
+++ portal/trunk/docs/reference-guide/pom.xml 2010-10-28 14:27:24 UTC (rev 4869)
@@ -28,7 +28,7 @@
<parent>
<groupId>org.gatein.doc</groupId>
<artifactId>docs-aggregator</artifactId>
- <version>3.0.1-GA-SNAPSHOT</version>
+ <version>3.2.0-Beta01-SNAPSHOT</version>
</parent>
<groupId>org.gatein.doc</groupId>
Modified: portal/trunk/docs/user-guide/pom.xml
===================================================================
--- portal/trunk/docs/user-guide/pom.xml 2010-10-28 10:08:10 UTC (rev 4868)
+++ portal/trunk/docs/user-guide/pom.xml 2010-10-28 14:27:24 UTC (rev 4869)
@@ -25,11 +25,10 @@
<modelVersion>4.0.0</modelVersion>
- <!-- FIXME parent not in sync with current hierarchy -->
<parent>
<groupId>org.gatein.doc</groupId>
<artifactId>docs-aggregator</artifactId>
- <version>3.0.1-GA-SNAPSHOT</version>
+ <version>3.2.0-Beta01-SNAPSHOT</version>
</parent>
<artifactId>gatein-user-guide-en</artifactId>
14 years, 2 months
gatein SVN: r4868 - in portal/branches/branch-GTNPORTAL-1592/web/eXoResources/src/main/webapp/javascript/eXo: portal and 1 other directory.
by do-not-reply@jboss.org
Author: ndkhoiits
Date: 2010-10-28 06:08:10 -0400 (Thu, 28 Oct 2010)
New Revision: 4868
Modified:
portal/branches/branch-GTNPORTAL-1592/web/eXoResources/src/main/webapp/javascript/eXo/core/DragDrop.js
portal/branches/branch-GTNPORTAL-1592/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalDragDrop.js
Log:
GTNPORTAL-1566 Fix some DnD problems, when edit layout
Modified: portal/branches/branch-GTNPORTAL-1592/web/eXoResources/src/main/webapp/javascript/eXo/core/DragDrop.js
===================================================================
--- portal/branches/branch-GTNPORTAL-1592/web/eXoResources/src/main/webapp/javascript/eXo/core/DragDrop.js 2010-10-28 08:28:45 UTC (rev 4867)
+++ portal/branches/branch-GTNPORTAL-1592/web/eXoResources/src/main/webapp/javascript/eXo/core/DragDrop.js 2010-10-28 10:08:10 UTC (rev 4868)
@@ -101,19 +101,20 @@
} ;
DragDrop.prototype.onDrop = function(evt) {
- /* should not remove this or move this line to destroy since the onMouseMove method keep calling */
- if(eXo.core.DragDrop.dropCallback != null) {
- var dndEvent = eXo.core.DragDrop.dndEvent ;
- dndEvent.backupMouseEvent = evt ;
- var dragObject = dndEvent.dragObject ;
+ if(!evt) evt = window.event ;
+ /* should not remove this or move this line to destroy since the onMouseMove method keep calling */
+ if(eXo.core.DragDrop.dropCallback != null) {
+ var dndEvent = eXo.core.DragDrop.dndEvent ;
+ dndEvent.backupMouseEvent = evt ;
+ var dragObject = dndEvent.dragObject ;
- var foundTarget = eXo.core.DragDrop.findDropableTarget(dndEvent, eXo.core.DragDrop.dropableTargets, evt) ;
- var junkMove = eXo.core.DragDrop.isJunkMove(dragObject, foundTarget) ;
+ var foundTarget = eXo.core.DragDrop.findDropableTarget(dndEvent, eXo.core.DragDrop.dropableTargets, evt) ;
+ var junkMove = eXo.core.DragDrop.isJunkMove(dragObject, foundTarget) ;
- dndEvent.update(foundTarget, junkMove) ;
- eXo.core.DragDrop.dropCallback (dndEvent) ;
- }
- eXo.core.DragDrop.destroy() ;
+ dndEvent.update(foundTarget, junkMove) ;
+ eXo.core.DragDrop.dropCallback (dndEvent) ;
+ }
+ eXo.core.DragDrop.destroy() ;
} ;
DragDrop.prototype.onCancel = function(evt) {
Modified: portal/branches/branch-GTNPORTAL-1592/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalDragDrop.js
===================================================================
--- portal/branches/branch-GTNPORTAL-1592/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalDragDrop.js 2010-10-28 08:28:45 UTC (rev 4867)
+++ portal/branches/branch-GTNPORTAL-1592/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalDragDrop.js 2010-10-28 10:08:10 UTC (rev 4868)
@@ -86,9 +86,12 @@
dndEvent.dragObject = cloneObject ;
dndEvent.dragObject.isAddingNewly = isAddingNewly;
} else {
+ var componentBlockWidth = 300;
+
previewBlock = PortalDragDrop.createPreview();
+ previewBlock.style.height = dragObject.offsetHeight + "px";
dragObject.parentNode.insertBefore(previewBlock, dragObject);
- dragObject.style.width = "300px";
+ dragObject.style.width = componentBlockWidth + "px";
var componentBlock = eXo.core.DOMUtil.findFirstDescendantByClass(dragObject, "div", "UIComponentBlock") ;
var editBlock = eXo.core.DOMUtil.findFirstChildByClass(componentBlock, "div", "EDITION-BLOCK");
if(editBlock) {
@@ -99,10 +102,20 @@
dragObject.isAddingNewly = isAddingNewly;
dragObject = dndEvent.dragObject;
dragObject.style.position = "absolute" ;
- if(eXo.core.I18n.isLT()) dragObject.style.left = originalDragObjectLeft + "px" ;
- else dragObject.style.right = (PortalDragDrop.positionRootObj.offsetWidth - originalDragObjectLeft - dragObject.offsetWidth) + "px" ;
dragObject.style.top = originalDragObjectTop + "px" ;
+ var dragObjectLeft = originalDragObjectLeft;
+ if (PortalDragDrop.deltaXDragObjectAndMouse > componentBlockWidth/2) {
+ if ((PortalDragDrop.backupDragObjectWidth - PortalDragDrop.deltaXDragObjectAndMouse) > componentBlockWidth/2) {
+ dragObjectLeft = originalDragObjectLeft + PortalDragDrop.deltaXDragObjectAndMouse - componentBlockWidth/2;
+ } else {
+ dragObjectLeft = originalDragObjectLeft + PortalDragDrop.backupDragObjectWidth - componentBlockWidth;
+ }
+ }
+
+ if (eXo.core.I18n.isLT()) dragObject.style.left = dragObjectLeft + "px";
+ else dragObject.style.right = PortalDragDrop.positionRootObj.offsetWidth - dragObject.offsetWidth - dragObjectLeft + "px";
+
eXo.portal.isInDragging = true;
}
@@ -110,7 +123,14 @@
var dragObject = dndEvent.dragObject ;
/* Control Scroll */
eXo.portal.PortalDragDrop.scrollOnDrag(dndEvent) ;
- if(!dndEvent.foundTargetObject) return;
+ if(!dndEvent.foundTargetObject) {
+ if (!dndEvent.lastFoundTargetObject) {
+ return;
+ } else {
+ dndEvent.foundTargetObject = dndEvent.lastFoundTargetObject;
+ }
+ }
+
var uiComponentLayout ;
if(dndEvent.foundTargetObject.className == "UIPage") {
uiComponentLayout = DOMUtil.findFirstDescendantByClass(dndEvent.foundTargetObject, "div", "VIEW-PAGE");
@@ -149,7 +169,7 @@
}
dndEvent.foundTargetObject.listComponentInTarget = listComponent ;
- var insertPosition = eXo.portal.PortalDragDrop.findInsertPosition(listComponent, dragObject, "row") ;
+ var insertPosition = eXo.portal.PortalDragDrop.findInsertPosition(listComponent, "row", dndEvent.backupMouseEvent) ;
dndEvent.foundTargetObject.foundIndex = insertPosition ;
/* Insert preview block */
@@ -179,7 +199,7 @@
}
dndEvent.foundTargetObject.listComponentInTarget = listComponent ;
- var insertPosition = eXo.portal.PortalDragDrop.findInsertPosition(listComponent, dragObject, "column") ;
+ var insertPosition = eXo.portal.PortalDragDrop.findInsertPosition(listComponent, "column", dndEvent.backupMouseEvent) ;
dndEvent.foundTargetObject.foundIndex = insertPosition ;
/* Insert preview block */
@@ -203,11 +223,15 @@
hasChanged = false;
}
//When dragObject is outside
- var targetElement = dndEvent.foundTargetObject;
- if(!targetElement || targetElement.foundIndex == null) {
- hasChanged = false;
- }
- //When dragobject is next to preview object (position is not changed)
+ if (!dndEvent.foundTargetObject) {
+ dndEvent.foundTargetObject = dndEvent.lastFoundTargetObject;
+ }
+
+ var targetElement = dndEvent.foundTargetObject;
+ if(!targetElement || targetElement.foundIndex == null) {
+ hasChanged = false;
+ }
+ //When dragobject is next to preview object (position is not changed)
if(!dndEvent.dragObject.isAddingNewly) {
var DOMUtil = eXo.core.DOMUtil;
var previewClass = "DragAndDropPreview";
@@ -229,7 +253,7 @@
}
}
- if(dndEvent.foundTargetObject != null || (dndEvent.backupMouseEvent && dndEvent.backupMouseEvent.keyCode != 27)) {
+ if(dndEvent.backupMouseEvent && dndEvent.backupMouseEvent.keyCode != 27) {
eXo.portal.PortalDragDrop.doDropCallback(dndEvent) ;
} else {
if(dndEvent.dragObject.parentNode.nodeName.toLowerCase() == "td") {
@@ -359,13 +383,18 @@
var mouseY = eXo.core.Browser.findMouseYInClient(dndEvent.backupMouseEvent) ;
var deltaTop = mouseY - (Math.round(browserHeight * 5/6)) ;
var deltaBottom = mouseY - (Math.round(browserHeight/6)) ;
+ var currentDragObjPos = parseInt(dndEvent.dragObject.style.top);
if(deltaTop > 0) {
- document.documentElement.scrollTop += deltaTop - 5 ;
+ document.documentElement.scrollTop += deltaTop - 5;
+ currentDragObjPos += deltaTop - 5;
}
if(deltaBottom < 0 && document.documentElement.scrollTop > 0) {
document.documentElement.scrollTop += deltaBottom ;
+ currentDragObjPos += deltaBottom;
}
+
+ dndEvent.dragObject.style.top = currentDragObjPos + "px";
};
/**
@@ -374,29 +403,29 @@
*
* @param layout {string} the layout type which is "row" or "column"
*/
-PortalDragDrop.prototype.findInsertPosition = function(components, dragObject, layout) {
- if(layout == "row") {
- for(var i = 0; i < components.length; i++) {
- var componentTop = eXo.core.Browser.findPosY(components[i]) ;
- var dragObjectTop = eXo.core.Browser.findPosY(dragObject) ;
- var componentMiddle = componentTop + Math.round(components[i].offsetHeight / 2) ;
-
- if(dragObjectTop > componentMiddle) continue ;
- else return i;
- }
- return -1 ;
-
- } else {
- var dragObjectX = eXo.core.Browser.findPosX(dragObject) ;
- for(var i = 0; i < components.length; i++) {
- var componentInTD = eXo.core.DOMUtil.getChildrenByTagName(components[i] ,"div")[0] ;
- var componentX = eXo.core.Browser.findPosX(components[i]) ;
+PortalDragDrop.prototype.findInsertPosition = function(components, layout, mouseEvent) {
+ var Browser = eXo.core.Browser;
+ if (layout == "row") {
+ for (var i = 0; i < components.length; i++) {
+ var componentTop = Browser.findPosY(components[i]);
+ var mouseYInPage = Browser.findMouseYInPage(mouseEvent);
+ var componentMIddle = componentTop + Math.round(components[i].offsetHeight / 2);
+ if (mouseYInPage > componentMIddle) continue;
+ else return i;
+ }
- if(dragObjectX > componentX) continue ;
- else return i ;
- }
- return -1 ;
- }
+ return -1;
+ } else {
+ for (var i = 0; i < components.length; i++) {
+ var mouseXInPage = Browser.findMouseXInPage(mouseEvent);
+ var componentInTD = eXo.core.DOMUtil.getChildrenByTagName(components[i], "div")[0];
+ var componentX = Browser.findPosX(components[i]);
+ if (mouseXInPage > componentX) continue;
+ else return i
+ }
+
+ return -1
+ }
};
/**
14 years, 2 months
gatein SVN: r4867 - in portal/branches/branch-GTNPORTAL-1592/web: portal/src/main/webapp/groovy/portal/webui/application and 1 other directory.
by do-not-reply@jboss.org
Author: kien_nguyen
Date: 2010-10-28 04:28:45 -0400 (Thu, 28 Oct 2010)
New Revision: 4867
Modified:
portal/branches/branch-GTNPORTAL-1592/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UITabSystem/UIVerticalSlideTabs/Stylesheet.css
portal/branches/branch-GTNPORTAL-1592/web/portal/src/main/webapp/groovy/portal/webui/application/UIApplicationList.gtmpl
Log:
GTNPORTAL-1107 page editor rendering of long portlet names
Modified: portal/branches/branch-GTNPORTAL-1592/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UITabSystem/UIVerticalSlideTabs/Stylesheet.css
===================================================================
--- portal/branches/branch-GTNPORTAL-1592/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UITabSystem/UIVerticalSlideTabs/Stylesheet.css 2010-10-28 07:54:19 UTC (rev 4866)
+++ portal/branches/branch-GTNPORTAL-1592/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UITabSystem/UIVerticalSlideTabs/Stylesheet.css 2010-10-28 08:28:45 UTC (rev 4867)
@@ -225,7 +225,7 @@
}
.UIVerticalSlideTabs .VTabStyle4 .SelectedTab {
- background: transparent url(background/VTabStyle4.gif) repeat-x left top;
+ background: #dadada url(background/VTabStyle4.gif) repeat-x left top;
line-height: 21px;
padding: 0px 0px 0px 8px;
cursor: pointer;
Modified: portal/branches/branch-GTNPORTAL-1592/web/portal/src/main/webapp/groovy/portal/webui/application/UIApplicationList.gtmpl
===================================================================
--- portal/branches/branch-GTNPORTAL-1592/web/portal/src/main/webapp/groovy/portal/webui/application/UIApplicationList.gtmpl 2010-10-28 07:54:19 UTC (rev 4866)
+++ portal/branches/branch-GTNPORTAL-1592/web/portal/src/main/webapp/groovy/portal/webui/application/UIApplicationList.gtmpl 2010-10-28 08:28:45 UTC (rev 4867)
@@ -36,7 +36,6 @@
<%
for(application in uicomponent.getApplications()) {
String applicationLabel = application.getDisplayName();
- if(applicationLabel.length() > 30) applicationLabel = applicationLabel.substring(0, 27) + "...";
String srcBG = application.getIconURL();
String srcBGError = "/eXoResources/skin/sharedImages/Icon80x80/DefaultPortlet.png";
%>
14 years, 2 months