[gatein-commits] gatein SVN: r4965 - in portal/trunk: component/common/src/main/java/org/exoplatform/resolver and 38 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Sun Nov 7 22:40:21 EST 2010


Author: trong.tran
Date: 2010-11-07 22:40:16 -0500 (Sun, 07 Nov 2010)
New Revision: 4965

Added:
   portal/trunk/server/jboss/patch-ear/src/main/jboss/bin/exokey.pem
   portal/trunk/server/jboss/patch-ear/src/main/jboss/bin/oauthkey.pem
   portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIPortalComponent/background/ArrowDown.gif
   portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UIColumnContainer.gtmpl
   portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/container/UIColumnContainer.java
Modified:
   portal/trunk/component/common/src/main/java/org/exoplatform/commons/xml/DOMSerializer.java
   portal/trunk/component/common/src/main/java/org/exoplatform/resolver/ResourceResolver.java
   portal/trunk/component/common/src/test/java/org/exoplatform/commons/xml/TestDOMSerializer.java
   portal/trunk/component/web/api/src/main/java/org/exoplatform/web/GenericHttpListener.java
   portal/trunk/component/web/security/src/main/java/org/exoplatform/web/login/ErrorLoginServlet.java
   portal/trunk/examples/portal/war/src/main/webapp/WEB-INF/web.xml
   portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component/UIUserToolBarSitePortlet.java
   portal/trunk/portlet/exoadmin/src/main/webapp/groovy/applicationregistry/webui/component/UIGadgetInfo.gtmpl
   portal/trunk/portlet/exoadmin/src/main/webapp/skin/applicationregistry/webui/component/UIApplicationRegistryPortlet/DefaultStylesheet.css
   portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/core/DOMUtil.js
   portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/core/DragDrop.js
   portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalDragDrop.js
   portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js
   portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js
   portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIItemSelector.js
   portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIPopup.js
   portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIPopupWindow.js
   portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIVerticalSlideTabs.js
   portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIPage/Stylesheet.css
   portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIPortalComponent/Stylesheet.css
   portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIForms/UIForm/Stylesheet.css
   portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIPopup/UIPopupCategory/Stylesheet.css
   portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UISelector/UIItemSelector/Stylesheet.css
   portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UISelector/UIItemSelector/background/TemplateContainer.jpg
   portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UITabSystem/UIVerticalSlideTabs/Stylesheet.css
   portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_ar.xml
   portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties
   portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_fr.properties
   portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties
   portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/uiconf/portal/webui/container/ContainerConfigOption.groovy
   portal/trunk/web/portal/src/main/webapp/WEB-INF/web.xml
   portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/UILoginForm.gtmpl
   portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/application/UIApplicationList.gtmpl
   portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UITableColumnContainer.gtmpl
   portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/page/UIPageSelector2.gtmpl
   portal/trunk/web/portal/src/main/webapp/groovy/webui/core/UIPopupWindow.gtmpl
   portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIPageIterator.java
   portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/account/UIUserSelector.java
   portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/application/ConfigurationManager.java
   portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/config/Component.java
   portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java
   portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletLifecycle.java
   portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/login/UILoginForm.java
   portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageForm.java
   portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageSelector2.java
   portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/util/PortalDataMapper.java
   portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIPortalApplication.java
Log:
GTNPORTAL-1592 Merge the works from branch into trunk

Modified: portal/trunk/component/common/src/main/java/org/exoplatform/commons/xml/DOMSerializer.java
===================================================================
--- portal/trunk/component/common/src/main/java/org/exoplatform/commons/xml/DOMSerializer.java	2010-11-06 16:11:39 UTC (rev 4964)
+++ portal/trunk/component/common/src/main/java/org/exoplatform/commons/xml/DOMSerializer.java	2010-11-08 03:40:16 UTC (rev 4965)
@@ -21,7 +21,9 @@
 
 import org.gatein.common.logging.Logger;
 import org.gatein.common.logging.LoggerFactory;
+import org.gatein.common.text.EntityEncoder;
 import org.w3c.dom.Attr;
+import org.w3c.dom.CDATASection;
 import org.w3c.dom.CharacterData;
 import org.w3c.dom.Element;
 import org.w3c.dom.NamedNodeMap;
@@ -145,10 +147,14 @@
          for (int i = 0;i < length;i++)
          {
             Node child = children.item(i);
-            if (child instanceof CharacterData)
+            if(child instanceof CDATASection)
             {
-               writer.writeCData(((CharacterData)child).getData());
+               writer.writeCData(((CDATASection)child).getData());
             }
+            else if (child instanceof CharacterData)
+            {
+               writeTextData(writer, ((CharacterData)child).getData());
+            }
             else if (child instanceof Element)
             {
                serialize((Element)child, writer);
@@ -159,4 +165,26 @@
          writer.writeEndElement();
       }
    }
+   
+   private static void writeTextData(XMLStreamWriter writer, String data) throws XMLStreamException
+   {
+      StringBuilder builder = new StringBuilder();
+      
+      for(int i = 0; i < data.length(); i++)
+      {
+         char c = data.charAt(i);
+         String encodedValue = EntityEncoder.FULL.lookup(c);
+         
+         if(encodedValue == null)
+         {
+            builder.append(c);
+         }
+         else
+         {
+            builder.append(encodedValue);
+         }
+      }
+      
+      writer.writeCharacters(builder.toString());
+   }
 }

Modified: portal/trunk/component/common/src/main/java/org/exoplatform/resolver/ResourceResolver.java
===================================================================
--- portal/trunk/component/common/src/main/java/org/exoplatform/resolver/ResourceResolver.java	2010-11-06 16:11:39 UTC (rev 4964)
+++ portal/trunk/component/common/src/main/java/org/exoplatform/resolver/ResourceResolver.java	2010-11-08 03:40:16 UTC (rev 4965)
@@ -26,21 +26,60 @@
 import java.util.List;
 
 /**
+ * This abstract class provide an abstract way to retrieve different resources in different contexts (war, jar....) <br/>
+ * For example, to retrieve resource from an portlet, we implement <br/>
+ * {@link org.exoplatform.resolver.PortletResourceResolver} <br/>
+ * <br/>
+ * In gatein, we have caching machanism which use {@link org.exoplatform.resolver.ResourceKey} <br/> 
+ * as key to determine cached resource, ResourceKey is generated by ResourceResolver.createResourceKey method <br/>
+ * <br/>
+ * By default, createResourceKey method return difference ResourceKey<br/>  
+ * if we call that method on difference ResourceResolver instances (even with the same resource url)<br/>
+ * <br/>
+ * To make our caching machanism work properly,please make sure you use the same ResourceResolver<br/> 
+ * or override the createResourceKey method of abstract class ResourceResolver<br/> 
+ * and return the same ResourceKey for the same resource url<br/>
+ * <br/>
  * Created by The eXo Platform SAS
  * Mar 15, 2006
  */
 abstract public class ResourceResolver
 {
 
+   /**
+    * Return URL object to resource
+    * @param url - String path (specific to certain context) to resource
+    * @throws Exception
+    */
    abstract public URL getResource(String url) throws Exception;
 
+   /**
+    * Return InputStream object to resource
+    * @param url - String path (specific to certain context) to resource
+    * @throws Exception
+    */
    abstract public InputStream getInputStream(String url) throws Exception;
 
+   /**
+    * Return List of URL object to resource 
+    * @param url - String path (specific to certain context) to resource
+    * @throws Exception
+    */
    abstract public List<URL> getResources(String url) throws Exception;
 
+   /**
+    * Return List of InputStream object to resource
+    * @param url - String path (specific to certain context) to resource
+    * @throws Exception
+    */
    abstract public List<InputStream> getInputStreams(String url) throws Exception;
 
    @SuppressWarnings("unused")
+   /**
+    * Return web path to resource (/context/pathToResource)
+    * You should overidde this method in case of web context
+    * @param url - String path (specific to certain context) to resource
+    */
    public String getWebAccessPath(String url)
    {
       throw new RuntimeException("This method is not supported");
@@ -54,21 +93,44 @@
       throw new RuntimeException("unsupported method");
    }
 
+   /**
+    * Return {@link org.exoplatform.resolver.ResourceKey} object<br/>
+    * <br/>
+    * Default implementation will return difference ResourceKey instance<br/>  
+    * if we call that method on difference ResourceResolver instances (even with the same resource url)<br/>
+    * <br/> 
+    * If you create new ResourceResolver each time you need access to a resource, please overidde this method<br/>
+    * and return the same ResourceKey for the same url<br/>
+    * @param url - String path (specific to certain context) to resource
+    */
    public ResourceKey createResourceKey(String url)
    {
       return new ResourceKey(hashCode(), url);
    }
 
+   /**
+    * Return resource id
+    * @param url - String path (specific to certain context) to resource
+    */
    public String createResourceId(String url)
    {
       return hashCode() + ":" + url;
    }
 
+   /**
+    * Return if this can resolve resource with specific url
+    * @param url String path to resource
+    */
    public boolean isResolvable(String url)
    {
       return url.startsWith(getResourceScheme());
    }
 
+   /**
+    * Return resource as array of bytes
+    * @param url - String path (specific to certain context) to resource
+    * @throws Exception
+    */
    public byte[] getResourceContentAsBytes(String url) throws Exception
    {
       InputStream is = getInputStream(url);
@@ -83,6 +145,11 @@
       return output.toByteArray();
    }
 
+   /**
+    * Return if resource has been modified since specific time
+    * @param url- String path (specific to certain context) to resource
+    * @param lastAccess
+    */
    abstract public boolean isModified(String url, long lastAccess);
 
    protected String removeScheme(String url)

Modified: portal/trunk/component/common/src/test/java/org/exoplatform/commons/xml/TestDOMSerializer.java
===================================================================
--- portal/trunk/component/common/src/test/java/org/exoplatform/commons/xml/TestDOMSerializer.java	2010-11-06 16:11:39 UTC (rev 4964)
+++ portal/trunk/component/common/src/test/java/org/exoplatform/commons/xml/TestDOMSerializer.java	2010-11-08 03:40:16 UTC (rev 4965)
@@ -58,6 +58,16 @@
    {
       assertSerialization("<meta http-equiv=\"Content-Type\"/>", "<meta http-equiv='Content-Type'></meta>");
    }
+   
+   public void testOrdinaryTextElement() throws Exception
+   {
+      assertSerialization("<div>Blah Blah</div>", "<div>Blah Blah</div>");
+   }
+   
+   public void testCDATaElement() throws Exception
+   {
+      assertSerialization("<div><![CDATA[Test Content]]></div>", "<div><![CDATA[Test Content]]></div>");
+   }
 
    private void assertSerialization(String expectedMarkup, String markup) throws Exception
    {

Modified: portal/trunk/component/web/api/src/main/java/org/exoplatform/web/GenericHttpListener.java
===================================================================
--- portal/trunk/component/web/api/src/main/java/org/exoplatform/web/GenericHttpListener.java	2010-11-06 16:11:39 UTC (rev 4964)
+++ portal/trunk/component/web/api/src/main/java/org/exoplatform/web/GenericHttpListener.java	2010-11-08 03:40:16 UTC (rev 4965)
@@ -19,6 +19,7 @@
 
 package org.exoplatform.web;
 
+import org.exoplatform.commons.utils.PropertyManager;
 import org.exoplatform.container.ExoContainer;
 import org.exoplatform.container.ExoContainerContext;
 import org.exoplatform.container.PortalContainer;
@@ -140,7 +141,19 @@
             PortalContainer.setInstance(portalContainer);
             hasBeenSet = true;
          }
-         broadcast(portalContainer, CONTEXT_DESTROYED, event);
+         final String ctxName = event.getServletContext().getServletContextName();
+         if (!PortalContainer.isPortalContainerNameDisabled(ctxName) && portalContainer instanceof PortalContainer)
+         {
+            // The portal container corresponding to the current servlet context could be found
+            broadcast(portalContainer, CONTEXT_DESTROYED, event);
+         }
+         else if (PropertyManager.isDevelopping())
+         {
+            log.info("The portal environment could not be set for the webapp '" + ctxName
+                  + "' because this servlet context has not been defined as a "
+                  + "dependency of any portal container or it is a disabled portal"
+                  + " container, the contextDestroyed event will be ignored");
+         }
       }
       catch (Exception ex)
       {

Modified: portal/trunk/component/web/security/src/main/java/org/exoplatform/web/login/ErrorLoginServlet.java
===================================================================
--- portal/trunk/component/web/security/src/main/java/org/exoplatform/web/login/ErrorLoginServlet.java	2010-11-06 16:11:39 UTC (rev 4964)
+++ portal/trunk/component/web/security/src/main/java/org/exoplatform/web/login/ErrorLoginServlet.java	2010-11-08 03:40:16 UTC (rev 4965)
@@ -65,6 +65,11 @@
       unregisterTokenCookie(req);
       // Clear the token cookie
       clearTokenCookie(req, resp);
+      
+      //nguyenanhkien2a at gmail.com: We set content-type here for using RequestDispatcher.include() method below
+      //We can't use RequestDispatcher.forward() if we want to use some response information for output such as clearing cookies, etc
+      resp.setContentType("text/html; charset=UTF-8");
+      
       // This allows the customer to define another login page without changing the portal
       context.getRequestDispatcher("/login/jsp/login.jsp").include(req, resp);
    }

Modified: portal/trunk/examples/portal/war/src/main/webapp/WEB-INF/web.xml
===================================================================
--- portal/trunk/examples/portal/war/src/main/webapp/WEB-INF/web.xml	2010-11-06 16:11:39 UTC (rev 4964)
+++ portal/trunk/examples/portal/war/src/main/webapp/WEB-INF/web.xml	2010-11-08 03:40:16 UTC (rev 4965)
@@ -73,6 +73,16 @@
 		<filter-name>CacheUserProfileFilter</filter-name>
 		<filter-class>org.exoplatform.web.CacheUserProfileFilter</filter-class>
 	</filter>
+   
+   <filter>
+      <filter-name>PortalContainerFilter</filter-name>
+      <filter-class>org.exoplatform.container.web.PortalContainerFilter</filter-class>
+   </filter>
+   
+   <filter-mapping>
+      <filter-name>PortalContainerFilter</filter-name>
+      <url-pattern>/*</url-pattern>
+   </filter-mapping>
 
 	<filter-mapping>
 		<filter-name>GenericFilter</filter-name>

Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component/UIUserToolBarSitePortlet.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component/UIUserToolBarSitePortlet.java	2010-11-06 16:11:39 UTC (rev 4964)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component/UIUserToolBarSitePortlet.java	2010-11-08 03:40:16 UTC (rev 4965)
@@ -60,7 +60,8 @@
 
    public String getPortalURI(String portalName)
    {
-      return Util.getPortalRequestContext().getPortalURI().replace(getCurrentPortal(), portalName);
+      String currentPortalURI = Util.getPortalRequestContext().getPortalURI();
+      return currentPortalURI.substring(0, currentPortalURI.lastIndexOf(getCurrentPortal())) + portalName + "/";
    }
 
    public PageNavigation getCurrentPortalNavigation() throws Exception

Modified: portal/trunk/portlet/exoadmin/src/main/webapp/groovy/applicationregistry/webui/component/UIGadgetInfo.gtmpl
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/webapp/groovy/applicationregistry/webui/component/UIGadgetInfo.gtmpl	2010-11-06 16:11:39 UTC (rev 4964)
+++ portal/trunk/portlet/exoadmin/src/main/webapp/groovy/applicationregistry/webui/component/UIGadgetInfo.gtmpl	2010-11-08 03:40:16 UTC (rev 4965)
@@ -21,7 +21,7 @@
 		<div class="Refresh16x16Icon ControlIcon" title="<%=_ctx.appRes("UIGadgetInfo.title.refresh")%>" onclick="<%= uicomponent.event("Refresh") %>"><span></span></div>
 		<div class="ClearBoth"><span></span></div>
 	</div>
- 	<div class="Application">
+ 	<div class="Application ClearFix">
  		<div class="PortletIcons">
 				<img src="$gadgetThumbnail" onError="src='$srcBGError'" alt=""/>
 		</div>

Modified: portal/trunk/portlet/exoadmin/src/main/webapp/skin/applicationregistry/webui/component/UIApplicationRegistryPortlet/DefaultStylesheet.css
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/webapp/skin/applicationregistry/webui/component/UIApplicationRegistryPortlet/DefaultStylesheet.css	2010-11-06 16:11:39 UTC (rev 4964)
+++ portal/trunk/portlet/exoadmin/src/main/webapp/skin/applicationregistry/webui/component/UIApplicationRegistryPortlet/DefaultStylesheet.css	2010-11-08 03:40:16 UTC (rev 4965)
@@ -17,505 +17,514 @@
  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  */
 
-/**	
- * Created by The eXo Platform SARL
- * Modifile : Nguyen Ngoc Thuy
- * May 8, 2007
- * version: $Id$
- */	
- 
-.UIWindow .UIApplicationRegistryPortlet {
-	overflow: visible;
-}
-
-.UIApplicationRegistryPortlet {
-	overflow: auto;
-	background: white;
-}
-
-.UIApplicationRegistryPortlet .CategoryContainer .EditIcon	{
-	float: none;
-}
-
-.UIApplicationRegistryPortlet .UIControlbar {
-	background: url('DefaultSkin/background/ControlIcon.gif') repeat-x center -222px;
-	border: 1px solid #b7b7b7;
-	height: 23px; line-height: 23px;
-	padding: 0px 10px;
-	margin: 5px 0px;
-}
-
-.UIApplicationRegistryPortlet .UIControlbar .IconControl {
-	float: left; /* orientation=lt */
-	float: right; /* orientation=rt */
-	cursor: pointer;
-	background-image: url('DefaultSkin/background/ControlIcon.gif'); /* orientation=lt */
-	background-image: url('DefaultSkin/background/ControlIcon-rt.gif'); /* orientation=rt */
-	background-repeat: no-repeat;
-	padding-left: 25px; /* orientation=lt */
-	padding-right: 25px; /* orientation=rt */
-	line-height: 23px;
-	margin: 0px 15px 0px 7px; /* orientation=lt */
-	margin: 0px 7px 0px 15px; /* orientation=rt */
-	width: auto; 
-	height: auto;
-}
-
-.UIApplicationRegistryPortlet .UIControlbar .AddNewIcon {
-	background-position: left top; /* orientation=lt */
-	background-position: right top; /* orientation=rt */
-}
-
-.UIApplicationRegistryPortlet .AddIcon {
-	background: url('DefaultSkin/background/ControlIcon.gif') no-repeat left -247px; /* orientation=lt */
-	background: url('DefaultSkin/background/ControlIcon-rt.gif') no-repeat right -247px; /* orientation=rt */
-	width: 19px;
-	height: 20px;
-}
-
-.UIApplicationRegistryPortlet .ReloadIcon {
-	background: url('DefaultSkin/background/ControlIcon.gif') no-repeat left -273px; /* orientation=lt */
-	background: url('DefaultSkin/background/ControlIcon-rt.gif') no-repeat right -273px; /* orientation=rt */
-	width: 19px;
-	height: 20px;
-}
-
-.UIApplicationRegistryPortlet .UIControlbar .AddCategoryIcon {
-	background-position: left -46px; /* orientation=lt */
-	background-position: right -46px; /* orientation=rt */
-}
-
-.UIApplicationRegistryPortlet .CreateNewIcon {
-	background: url('DefaultSkin/background/ControlIcon.gif') no-repeat left -25px; /* orientation=lt */	
-	background: url('DefaultSkin/background/ControlIcon-rt.gif') no-repeat right -25px; /* orientation=rt */
-	width: 19px;
-	height: 20px;
-}
-
-.UIApplicationRegistryPortlet .UIControlbar .ImportIcon {
-	background-position: left -69px; /* orientation=lt */
-	background-position: right -69px; /* orientation=rt */
-	float: right; /* orientation=lt */
-	float: left; /* orientation=rt */
-}
-
-.UIApplicationRegistryPortlet .CopyGadgetIcon {
-	background: url('DefaultSkin/background/ControlIcon.gif') repeat-x left -69px; /* orientation=lt */
-	background: url('DefaultSkin/background/ControlIcon-rt.gif') repeat-x right -69px; /* orientation=rt */
-	width: 23px;
-	height: 22px;
-}
-
-.UIApplicationRegistryPortlet .AppRegistryContainer {
-	height: 100%;
-	border: 1px solid #b7b7b7;
-	background: url('DefaultSkin/background/Repeat-Y16x2.gif') repeat-y left top; /* orientation=lt */
-	background: url('DefaultSkin/background/Repeat-Y16x2-rt.gif') repeat-y right top; /* orientation=rt */
-}
-
-.UIApplicationRegistryPortlet .AppRegistryContainer .AppRegistryControl {
-	float: left; /* orientation=lt */
-	float: right; /* orientation=rt */
-	width: 239px;
-}
-
-.UIApplicationRegistryPortlet .AppRegistryContainer .ControlArea {
-	padding: 5px 2px 5px 5px; /* orientation=lt */
-	padding: 5px 5px 5px 2px; /* orientation=rt */
-}
-
-.UIApplicationRegistryPortlet .AppRegistryControl .CategoryContent {
-	padding: 1px;
-	background: white;
-	border: 1px solid #d7d7d7;
-}
-
-.UIApplicationRegistryPortlet .AppRegistryControl .Border {
-	border: 1px solid #d7d7d7;	
-	padding: 1px; margin: 1px;
-}
-
-.UIApplicationRegistryPortlet .AppRegistryControl .TitleCategory {
-	background: url('DefaultSkin/background/AppRegistryControl.gif') repeat-x left top;
-	height: 17px;
-	padding: 10px 5px 0px 5px;
-	color: white;
-	font-weight: bold;
-	letter-spacing: 2px;
-	text-transform: uppercase;
-}
-
-.UIApplicationRegistryPortlet .CategoryContent .ListContent {
-	border: 1px solid #d7d7d7;
-	margin: 5px;
-}
-
-.UIApplicationRegistryPortlet .CategoryContent .ItemContent {
-	line-height: 26px;
-	height: 26px;
-	background: url('DefaultSkin/background/AppRegistryControl.gif') no-repeat -453px bottom;
-	padding: 0px 5px;
-}
-
-.UIApplicationRegistryPortlet .CategoryContent a.TabLabel:hover {
-	color: #058ee6;
-}
-
-.UIApplicationRegistryPortlet .CategoryContent .SelectedItem .TabLabel {
-	color: #058ee6;
-}
-
-.UIApplicationRegistryPortlet .CategoryContent a.TabLabel {
-	display: block;
-	float: left; /* orientation=lt */
-	float: right; /* orientation=rt */
-	background: url('DefaultSkin/background/ControlIcon.gif') repeat-y left -92px; /* orientation=lt */
-	background: url('DefaultSkin/background/ControlIcon-rt.gif') repeat-y right -92px; /* orientation=rt */
-	padding: 0px 0px 0px 20px; /* orientation=lt */
-	padding: 0px 20px 0px 0px; /* orientation=rt */
-	cursor: pointer;
-	width: 160px; 
-	overflow: hidden;
-	white-space: nowrap;
-}
-
-.UIApplicationRegistryPortlet .CategoryContent .ControlIcon {
-	display: block;
-	float: right; /* orientation=lt */
-	float: left; /* orientation=rt */
-	margin: 3px;
-	filter: alpha(opacity=30);
-	-moz-opacity: 0.3;
-}
-
-.UIApplicationRegistryPortlet .ListItem .SelectedItem a.TabLabel {
-	font-weight: bold;
-	padding-left: 3px; /* orientation=lt */
-	padding-right: 3px; /* orientation=rt */
-}
-
-.UIApplicationRegistryPortlet .CategoryContent .ItemContent:hover {
-	background-color: #9d9d9d;
-}
-
-.UIApplicationRegistryPortlet .CategoryContent .ItemContent:hover a {
-	color: white;
-}
-
-.UIApplicationRegistryPortlet .UIVerticalSlideTabs {
-	margin: 1px 1px 1px 0px;
-}
-
-.UIApplicationRegistryPortlet .UIVerticalSlideTabs a:hover {
-	color: #058ee6;
-}
-
-.UIApplicationRegistryPortlet .UIVerticalSlideTabs .NormalTab a.TabLabel {
-	background: url('DefaultSkin/background/BlueNextArrow.gif') no-repeat left center; /* orientation=lt */
-	background: url('DefaultSkin/background/BlueNextArrow-rt.gif') no-repeat right center; /* orientation=rt */
-	padding: 0 0 0 18px; /* orientation=lt */
-	padding: 0 18px 0 0; /* orientation=rt */
-	display: block;
-}
-
-.UIApplicationRegistryPortlet .UIVerticalSlideTabs .SelectedTab a.TabLabel {
-	background: url('DefaultSkin/background/BlueDownArrow.gif') no-repeat left center;
-	padding: 0 0 0 18px; /* orientation=lt */
-	padding: 0 18px 0 0; /* orientation=rt */
-	display: block;
-	width: 120px; overflow: hidden;
-	color: #626262;
-}
-
-.UIApplicationRegistryPortlet .UIVerticalSlideTabs .NormalTab .ControlIcon {
-	float: right; /* orientation=lt */
-	float: left; /* orientation=rt */
-}
-
-.UIApplicationRegistryPortlet .UIVerticalSlideTabs .SelectedTab .ControlIcon {
-	float: right; /* orientation=lt */
-	float: left; /* orientation=rt */
-	filter: alpha(opacity=100);
-	-moz-opacity: 1.0;
-}
-
-.UIApplicationRegistryPortlet .UIVerticalSlideTabs .UIVTabContent .ItemLabel {
-	background: url('DefaultSkin/background/ControlIcon.gif') no-repeat left -170px; /* orientation=lt */
-	background: url('DefaultSkin/background/ControlIcon-rt.gif') no-repeat right -170px; /* orientation=rt */
-	padding-left: 10px;	/* orientation=lt */
-	padding-right: 10px; /* orientation=rt */
-	display: block;
-	float: left; /* orientation=lt */
-	float: right; /* orientation=rt */
-	cursor: pointer;
-	width: 160px;
-	overflow: hidden;
-	white-space: nowrap;
-}
-
-.UIApplicationRegistryPortlet .UIVerticalSlideTabs .VTabSimpleStyle .UIVTabContent {
-	padding: 5px;
-	margin: 0px;
-}
-
-.UIApplicationRegistryPortlet .UIVTabContent .SelectedItem .ItemLabel {
-	background: url('DefaultSkin/background/ControlIcon.gif') no-repeat left -196px; /* orientation=lt */
-	background: url('DefaultSkin/background/ControlIcon-rt.gif') no-repeat right -196px; /* orientation=rt */
-	display: block;
-	color: #898989;
-}
-
-.UIApplicationRegistryPortlet .UIVerticalSlideTabs .UIVTabContent .ControlIcon {
-	float: right; /* orientation=lt */
+/**	
+ * Created by The eXo Platform SARL
+ * Modifile : Nguyen Ngoc Thuy
+ * May 8, 2007
+ * version: $Id$
+ */	
+ 
+.UIWindow .UIApplicationRegistryPortlet {
+	overflow: visible;
+}
+
+.UIApplicationRegistryPortlet {
+	overflow: auto;
+	background: white;
+}
+
+.UIApplicationRegistryPortlet .CategoryContainer .EditIcon	{
+	float: none;
+}
+
+.UIApplicationRegistryPortlet .UIControlbar {
+	background: url('DefaultSkin/background/ControlIcon.gif') repeat-x center -222px;
+	border: 1px solid #b7b7b7;
+	height: 23px; line-height: 23px;
+	padding: 0px 10px;
+	margin: 5px 0px;
+}
+
+.UIApplicationRegistryPortlet .UIControlbar .IconControl {
+	float: left; /* orientation=lt */
+	float: right; /* orientation=rt */
+	cursor: pointer;
+	background-image: url('DefaultSkin/background/ControlIcon.gif'); /* orientation=lt */
+	background-image: url('DefaultSkin/background/ControlIcon-rt.gif'); /* orientation=rt */
+	background-repeat: no-repeat;
+	padding-left: 25px; /* orientation=lt */
+	padding-right: 25px; /* orientation=rt */
+	line-height: 23px;
+	margin: 0px 15px 0px 7px; /* orientation=lt */
+	margin: 0px 7px 0px 15px; /* orientation=rt */
+	width: auto; 
+	height: auto;
+}
+
+.UIApplicationRegistryPortlet .UIControlbar .AddNewIcon {
+	background-position: left top; /* orientation=lt */
+	background-position: right top; /* orientation=rt */
+}
+
+.UIApplicationRegistryPortlet .AddIcon {
+	background: url('DefaultSkin/background/ControlIcon.gif') no-repeat left -247px; /* orientation=lt */
+	background: url('DefaultSkin/background/ControlIcon-rt.gif') no-repeat right -247px; /* orientation=rt */
+	width: 19px;
+	height: 20px;
+}
+
+.UIApplicationRegistryPortlet .ReloadIcon {
+	background: url('DefaultSkin/background/ControlIcon.gif') no-repeat left -273px; /* orientation=lt */
+	background: url('DefaultSkin/background/ControlIcon-rt.gif') no-repeat right -273px; /* orientation=rt */
+	width: 19px;
+	height: 20px;
+}
+
+.UIApplicationRegistryPortlet .UIControlbar .AddCategoryIcon {
+	background-position: left -46px; /* orientation=lt */
+	background-position: right -46px; /* orientation=rt */
+}
+
+.UIApplicationRegistryPortlet .CreateNewIcon {
+	background: url('DefaultSkin/background/ControlIcon.gif') no-repeat left -25px; /* orientation=lt */	
+	background: url('DefaultSkin/background/ControlIcon-rt.gif') no-repeat right -25px; /* orientation=rt */
+	width: 19px;
+	height: 20px;
+}
+
+.UIApplicationRegistryPortlet .UIControlbar .ImportIcon {
+	background-position: left -69px; /* orientation=lt */
+	background-position: right -69px; /* orientation=rt */
+	float: right; /* orientation=lt */
 	float: left; /* orientation=rt */
-	cursor: pointer;
-}
-
-/**************************** AppWorkingArea *****************************/
-
-.UIApplicationRegistryPortlet .AppWorkingArea {
-	margin-left: 260px;	/* orientation=lt */
-	margin-right: 260px; /* orientation=rt */
-	padding: 10px;
-}
-
-.UIApplicationRegistryPortlet .UIBreadcumb {
-	padding: 0px 10px;
-	border-bottom: 1px solid #b7b7b7;
-	height: 19px;
-	color: #4b4b4b;
-	font-weight: bold;
-}
-
-.UIApplicationRegistryPortlet .UIBreadcumb .BreadcumbInfo {
-	width: 90%;
-	overflow: hidden;
-	height: 16px;
-	line-height: 16px;
-}
-
-.UIApplicationRegistryPortlet .UIBreadcumb .RightBlackGridArrow16x16Icon {
-	background-position: center;
-	float: left; /* orientation=lt */
-	float: right; /* orientation=rt */
-	height: 6px;
-	margin: 5px 0px 0px;
-}
-
-.UIApplicationRegistryPortlet .UIBreadcumb .Selected {
-	float: left; /* orientation=lt */
-	float: right; /* orientation=rt */
-	color: #535353;
-}
-
-.UIApplicationRegistryPortlet .UIBreadcumb .ControlIcon {
-	float: right; /* orientation=lt */
-	float: left; /* orientation=rt */
+}
+
+.UIApplicationRegistryPortlet .CopyGadgetIcon {
+	background: url('DefaultSkin/background/ControlIcon.gif') repeat-x left -69px; /* orientation=lt */
+	background: url('DefaultSkin/background/ControlIcon-rt.gif') repeat-x right -69px; /* orientation=rt */
+	width: 23px;
+	height: 22px;
+}
+
+.UIApplicationRegistryPortlet .AppRegistryContainer {
+	height: 100%;
+	border: 1px solid #b7b7b7;
+	background: url('DefaultSkin/background/Repeat-Y16x2.gif') repeat-y left top; /* orientation=lt */
+	background: url('DefaultSkin/background/Repeat-Y16x2-rt.gif') repeat-y right top; /* orientation=rt */
+}
+
+.UIApplicationRegistryPortlet .AppRegistryContainer .AppRegistryControl {
+	float: left; /* orientation=lt */
+	float: right; /* orientation=rt */
+	width: 239px;
+}
+
+.UIApplicationRegistryPortlet .AppRegistryContainer .ControlArea {
+	padding: 5px 2px 5px 5px; /* orientation=lt */
+	padding: 5px 5px 5px 2px; /* orientation=rt */
+}
+
+.UIApplicationRegistryPortlet .AppRegistryControl .CategoryContent {
+	padding: 1px;
+	background: white;
+	border: 1px solid #d7d7d7;
+}
+
+.UIApplicationRegistryPortlet .AppRegistryControl .Border {
+	border: 1px solid #d7d7d7;	
+	padding: 1px; margin: 1px;
+}
+
+.UIApplicationRegistryPortlet .AppRegistryControl .TitleCategory {
+	background: url('DefaultSkin/background/AppRegistryControl.gif') repeat-x left top;
+	height: 17px;
+	padding: 10px 5px 0px 5px;
+	color: white;
+	font-weight: bold;
+	letter-spacing: 2px;
+	text-transform: uppercase;
+}
+
+.UIApplicationRegistryPortlet .CategoryContent .ListContent {
+	border: 1px solid #d7d7d7;
+	margin: 5px;
+}
+
+.UIApplicationRegistryPortlet .CategoryContent .ItemContent {
+	line-height: 26px;
+	height: 26px;
+	background: url('DefaultSkin/background/AppRegistryControl.gif') no-repeat -453px bottom;
+	padding: 0px 5px;
+}
+
+.UIApplicationRegistryPortlet .CategoryContent a.TabLabel:hover {
+	color: #058ee6;
+}
+
+.UIApplicationRegistryPortlet .CategoryContent .SelectedItem .TabLabel {
+	color: #058ee6;
+}
+
+.UIApplicationRegistryPortlet .CategoryContent a.TabLabel {
+	display: block;
+	float: left; /* orientation=lt */
+	float: right; /* orientation=rt */
+	background: url('DefaultSkin/background/ControlIcon.gif') repeat-y left -92px; /* orientation=lt */
+	background: url('DefaultSkin/background/ControlIcon-rt.gif') repeat-y right -92px; /* orientation=rt */
+	padding: 0px 0px 0px 20px; /* orientation=lt */
+	padding: 0px 20px 0px 0px; /* orientation=rt */
+	cursor: pointer;
+	width: 160px; 
+	overflow: hidden;
+	white-space: nowrap;
+}
+
+.UIApplicationRegistryPortlet .CategoryContent .ControlIcon {
+	display: block;
+	float: right; /* orientation=lt */
+	float: left; /* orientation=rt */
+	margin: 3px;
+	filter: alpha(opacity=30);
+	-moz-opacity: 0.3;
+}
+
+.UIApplicationRegistryPortlet .ListItem .SelectedItem a.TabLabel {
+	font-weight: bold;
+	padding-left: 3px; /* orientation=lt */
+	padding-right: 3px; /* orientation=rt */
+}
+
+.UIApplicationRegistryPortlet .CategoryContent .ItemContent:hover {
+	background-color: #9d9d9d;
+}
+
+.UIApplicationRegistryPortlet .CategoryContent .ItemContent:hover a {
+	color: white;
+}
+
+.UIApplicationRegistryPortlet .UIVerticalSlideTabs {
+	margin: 1px 1px 1px 0px;
+}
+
+.UIApplicationRegistryPortlet .UIVerticalSlideTabs a:hover {
+	color: #058ee6;
+}
+
+.UIApplicationRegistryPortlet .UIVerticalSlideTabs .NormalTab a.TabLabel {
+	background: url('DefaultSkin/background/BlueNextArrow.gif') no-repeat left center; /* orientation=lt */
+	background: url('DefaultSkin/background/BlueNextArrow-rt.gif') no-repeat right center; /* orientation=rt */
+	padding: 0 0 0 18px; /* orientation=lt */
+	padding: 0 18px 0 0; /* orientation=rt */
+	display: block;
+}
+
+.UIApplicationRegistryPortlet .UIVerticalSlideTabs .SelectedTab a.TabLabel {
+	background: url('DefaultSkin/background/BlueDownArrow.gif') no-repeat left center;
+	padding: 0 0 0 18px; /* orientation=lt */
+	padding: 0 18px 0 0; /* orientation=rt */
+	display: block;
+	width: 120px; overflow: hidden;
+	color: #626262;
+}
+
+.UIApplicationRegistryPortlet .UIVerticalSlideTabs .NormalTab .ControlIcon {
+	float: right; /* orientation=lt */
+	float: left; /* orientation=rt */
+}
+
+.UIApplicationRegistryPortlet .UIVerticalSlideTabs .SelectedTab .ControlIcon {
+	float: right; /* orientation=lt */
+	float: left; /* orientation=rt */
+	filter: alpha(opacity=100);
+	-moz-opacity: 1.0;
+}
+
+.UIApplicationRegistryPortlet .UIVerticalSlideTabs .UIVTabContent .ItemLabel {
+	background: url('DefaultSkin/background/ControlIcon.gif') no-repeat left -170px; /* orientation=lt */
+	background: url('DefaultSkin/background/ControlIcon-rt.gif') no-repeat right -170px; /* orientation=rt */
+	padding-left: 10px;	/* orientation=lt */
+	padding-right: 10px; /* orientation=rt */
+	display: block;
+	float: left; /* orientation=lt */
+	float: right; /* orientation=rt */
+	cursor: pointer;
+	width: 160px;
+	overflow: hidden;
+	white-space: nowrap;
+}
+
+.UIApplicationRegistryPortlet .UIVerticalSlideTabs .VTabSimpleStyle .UIVTabContent {
+	padding: 5px;
+	margin: 0px;
+}
+
+.UIApplicationRegistryPortlet .UIVTabContent .SelectedItem .ItemLabel {
+	background: url('DefaultSkin/background/ControlIcon.gif') no-repeat left -196px; /* orientation=lt */
+	background: url('DefaultSkin/background/ControlIcon-rt.gif') no-repeat right -196px; /* orientation=rt */
+	display: block;
+	color: #898989;
+}
+
+.UIApplicationRegistryPortlet .UIVerticalSlideTabs .UIVTabContent .ControlIcon {
+	float: right; /* orientation=lt */
+	float: left; /* orientation=rt */
+	cursor: pointer;
+}
+
+/**************************** AppWorkingArea *****************************/
+
+.UIApplicationRegistryPortlet .AppWorkingArea {
+	margin-left: 260px;	/* orientation=lt */
+	margin-right: 260px; /* orientation=rt */
+	padding: 10px;
+}
+
+.UIApplicationRegistryPortlet .UIBreadcumb {
+	padding: 0px 10px;
+	border-bottom: 1px solid #b7b7b7;
+	height: 19px;
+	color: #4b4b4b;
+	font-weight: bold;
+}
+
+.UIApplicationRegistryPortlet .UIBreadcumb .BreadcumbInfo {
+	width: 90%;
+	overflow: hidden;
+	height: 16px;
+	line-height: 16px;
+}
+
+.UIApplicationRegistryPortlet .UIBreadcumb .RightBlackGridArrow16x16Icon {
+	background-position: center;
+	float: left; /* orientation=lt */
+	float: right; /* orientation=rt */
+	height: 6px;
+	margin: 5px 0px 0px;
+}
+
+.UIApplicationRegistryPortlet .UIBreadcumb .Selected {
+	float: left; /* orientation=lt */
+	float: right; /* orientation=rt */
+	color: #535353;
+}
+
+.UIApplicationRegistryPortlet .UIBreadcumb .ControlIcon {
+	float: right; /* orientation=lt */
+	float: left; /* orientation=rt */
 	margin: 0px 5px;
-	cursor: pointer;
-}
-
-.UIApplicationRegistryPortlet .ApplicationContainer {
-	padding: 10px 0px;
-}
-
-.UIApplicationRegistryPortlet .ApplicationContent {
-	margin-left: 90px; /* orientation=lt */
-	margin-right: 90px; /* orientation=rt */
-	padding: 15px 15px 15px 0px; /* orientation=lt */
-	padding: 15px 0px 15px 15px; /* orientation=rt */
-}
-
-.UIApplicationRegistryPortlet .ApplicationContent table {
-	table-layout: fixed;
-	width: 99%;
-	line-height: 18px;
-}
-
-.UIApplicationRegistryPortlet .ApplicationContent .RightLabel {
-	width: 78%;
-	overflow: hidden;
-	padding: 0px 4px;
-	vertical-align: middle;
-}
-
-.UIApplicationRegistryPortlet .TitleBarApplication {
-	background: none;
-	font-weight: bold; font-size: 12px; color: #535353;
-}
-
-.UIApplicationRegistryPortlet .ApplicationContentLabel {
-	line-height: 16px;
-	margin: auto;
-}
-
-.UIApplicationRegistryPortlet .ApplicationContent .LeftLabel {
-	font-weight: bold;
-	font-size: 11px;
-	color: black;
-	text-align: right; /* orientation=lt */
-	text-align: left;	/* orientation=rt */
-}
-
-.UIApplicationRegistryPortlet .ApplicationContentLabel .RightLabel {
-	padding: 0px 5px;
-}
-
-.UIApplicationRegistryPortlet .PortletIcons {
-	float: left; /* orientation=lt */
-	float: right; /* orientation=rt */
-	width: 80px; 
-	height: 80px;
-	cursor: pointer;
-	margin-top: 2px;
-}
-
-.UIApplicationRegistryPortlet .UIFormWithTitle {
-	width: 480px;
-}
+	cursor: pointer;
+}
 
+.UIApplicationRegistryPortlet .ApplicationContainer {
+	padding: 10px 0px;
+}
+
+.UIApplicationRegistryPortlet .ApplicationContent {
+	margin-left: 90px; /* orientation=lt */
+	margin-right: 90px; /* orientation=rt */
+	padding: 15px 15px 15px 0px; /* orientation=lt */
+	padding: 15px 0px 15px 15px; /* orientation=rt */
+}
+
+.UIApplicationRegistryPortlet .ApplicationContent table {
+	table-layout: fixed;
+	width: 99%;
+	line-height: 18px;
+}
+
+.UIApplicationRegistryPortlet .ApplicationContent .RightLabel {
+	width: 78%;
+	overflow: hidden;
+	padding: 0px 4px;
+	vertical-align: middle;
+}
+
+.UIApplicationRegistryPortlet .TitleBarApplication {
+	background: none;
+	font-weight: bold; font-size: 12px; color: #535353;
+}
+
+.UIApplicationRegistryPortlet .ApplicationContentLabel {
+	line-height: 16px;
+	margin: auto;
+}
+
+.UIApplicationRegistryPortlet .ApplicationContent .LeftLabel {
+	font-weight: bold;
+	font-size: 11px;
+	color: black;
+	text-align: right; /* orientation=lt */
+	text-align: left;	/* orientation=rt */
+	word-wrap: break-word;
+}
+
+.UIApplicationRegistryPortlet .ApplicationContentLabel .RightLabel {
+	padding: 0px 5px;
+}
+
+.UIApplicationRegistryPortlet .PortletIcons {
+	float: left; /* orientation=lt */
+	float: right; /* orientation=rt */
+	width: 80px; 
+	height: 80px;
+	cursor: pointer;
+	margin-top: 2px;
+}
+
+.UIApplicationRegistryPortlet .UIFormWithTitle {
+	width: 480px;
+}
+
 .UIApplicationRegistryPortlet .UIFormWithTitle .HintMessage {
   font-style:italic;
   padding:10px;
   text-align:center;
-}
-/*******************************UIAcessPermissions******************************/
-
-.UIApplicationRegistryPortlet .UIAcessPermissions {
-	margin: 20px 0px;
-	width: auto;
-	height: 100%;
-}
-
-.UIApplicationRegistryPortlet .UIAcessPermissions .UIForm .HorizontalLayout {
-	padding: 0px;
-	border: none;
-	background: none;
-}
-
-.UIApplicationRegistryPortlet .UIAcessPermissions .UIFormGrid {
-	width: 100%;
-}
-
-.UIApplicationRegistryPortlet .UIAcessPermissions .PublicCheck .UIFormGrid {
-	width: auto;
-}
-
-/**************************** UIOrganizerManagement ***************************/
-
-.UIApplicationRegistryPortlet .UIAddApplicationForm .UIFormGrid {
-	width: 99%;
-}
-
-.UIOrganizerManagement .UIFormInputSet .UIFormGrid {
-	width: 99%;
-}
-
-.UIOrganizerManagement .UIFormInputSet .PublicCheck .UIFormGrid {
-	width: auto;
-}
-
-.UIOrganizerManagement .UIAddApplicationForm .UIFormGrid td.text {
-	white-space: normal;
-}
-/***************************** UIPortletManagement ***************************/
-
-.UIPortletManagement .ListCategory .CategoryLable {
-	background: url(DefaultSkin/background/ControlIcon.gif) no-repeat scroll 5px -170px;	/* orientation=lt */
-	background: url(DefaultSkin/background/ControlIcon-rt.gif) no-repeat scroll right -170px;	/* orientation=rt */
-	padding: 0px 0px 0px 15px; /* orientation=lt */
-	padding: 0px 15px 0px 0px; /* orientation=rt */
-	display: block;
-	line-height: 25px;
-	border-bottom: 1px solid #dddddd;
-}
-
-.UIPortletManagement .SelectedCategory .CategoryLable {
-	background: #b7b7b7 url(DefaultSkin/background/ControlIcon.gif) no-repeat scroll 5px -196px; /* orientation=lt */
-	background: #b7b7b7 url(DefaultSkin/background/ControlIcon-rt.gif) no-repeat scroll right -196px; /* orientation=rt */
-	color: white;
+}
+/*******************************UIAcessPermissions******************************/
+
+.UIApplicationRegistryPortlet .UIAcessPermissions {
+	margin: 20px 0px;
+	width: auto;
+	height: 100%;
+}
+
+.UIApplicationRegistryPortlet .UIAcessPermissions .UIForm .HorizontalLayout {
+	padding: 0px;
+	border: none;
+	background: none;
+}
+
+.UIApplicationRegistryPortlet .UIAcessPermissions .UIFormGrid {
+	width: 100%;
+}
+
+.UIApplicationRegistryPortlet .UIAcessPermissions .PublicCheck .UIFormGrid {
+	width: auto;
+}
+
+/**************************** UIOrganizerManagement ***************************/
+
+.UIApplicationRegistryPortlet .UIAddApplicationForm .UIFormGrid {
+	width: 99%;
+}
+
+.UIOrganizerManagement .UIFormInputSet .UIFormGrid {
+	width: 99%;
+}
+
+.UIOrganizerManagement .UIFormInputSet .PublicCheck .UIFormGrid {
+	width: auto;
+}
+
+.UIOrganizerManagement .UIAddApplicationForm .UIFormGrid td.text {
+	white-space: normal;
+}
+/***************************** UIPortletManagement ***************************/
+
+.UIPortletManagement .ListCategory .CategoryLable {
+	background: url(DefaultSkin/background/ControlIcon.gif) no-repeat scroll 5px -170px;	/* orientation=lt */
+	background: url(DefaultSkin/background/ControlIcon-rt.gif) no-repeat scroll right -170px;	/* orientation=rt */
+	padding: 0px 0px 0px 15px; /* orientation=lt */
+	padding: 0px 15px 0px 0px; /* orientation=rt */
+	display: block;
+	line-height: 25px;
+	border-bottom: 1px solid #dddddd;
+}
+
+.UIPortletManagement .SelectedCategory .CategoryLable {
+	background: #b7b7b7 url(DefaultSkin/background/ControlIcon.gif) no-repeat scroll 5px -196px; /* orientation=lt */
+	background: #b7b7b7 url(DefaultSkin/background/ControlIcon-rt.gif) no-repeat scroll right -196px; /* orientation=rt */
+	color: white;
 	font-weight: bold;
 	white-space: nowrap;
-	overflow: hidden;
-}
-
-.UIPortletManagement .ListCategory .ListItem {
-	background: #f7f7f7;
-	border-bottom: 1px solid #dddddd;
-}
-
-.UIPortletManagement .ListCategory .Item {
-	display: block;
-	background: url('DefaultSkin/background/ControlIcon.gif') repeat-y left -92px; /* orientation=lt */
-	background: url('DefaultSkin/background/ControlIcon.gif') repeat-y right -92px; /* orientation=rt */
-	padding-left: 20px; /* orientation=lt */
-	padding-right: 20px; /* orientation=rt */
-	cursor: pointer;
-	width: 160px; overflow: hidden;
-	white-space: nowrap;
-	line-height: 25px;
-}
-
-.UIPortletManagement .UIVerticalSlideTabs .VTabSimpleStyle .UIVTabContent {
-	background: none;
-}
-
-.UIPortletManagement .BoxContent {
-	padding: 1px;
-	border: 1px solid #d7d7d7;
-	margin: 1px;
-}
-
-.UIPortletManagement .BoxContent .TitleCategory {
-	cursor: pointer;
-	text-transform: capitalize;
-}
-
-.UIPortletManagement .UIGrid .FieldLable {
-	width: 30%;
-	text-align: right;
-}
-
-.UIPortletManagement .UIGrid .FieldComponent {
-	padding: 4px 0px;
-}
-
-/******************************** UIGadgetManagement ******************************/
-.UIApplicationRegistryPortlet .UIGadgetManagement .PortletIcons {
-	width: 150px; height: 120px;
-	padding-top: 20px; text-align: center;
-}
-
-.UIApplicationRegistryPortlet .UIGadgetManagement .ApplicationContent {
-	margin-left: 150px; /* orientation=lt */
-	margin-right: 150px; /* orientation=rt */
-}
-
-.UIApplicationRegistryPortlet .UIGadgetManagement .URL table {
-	width: 99%;
-	table-layout: fixed;
-}
-
-.UIApplicationRegistryPortlet .UIGadgetManagement .URL .RightLabel {
-	overflow: hidden;
-}
-
-.UIGadgetManagement .UIGadgetEditor table.UIFormGrid {
-	width: 99%;
-	table-layout: fixed;
-}
-
-.UIGadgetManagement .UIGadgetEditor .HorizontalLayout textarea {
-	height: 250px; 
-	padding: 0px;
-	width: 97%; 
-	overflow: auto;
-}
-
-.UIGadgetManagement .UIGadgetEditor td.FieldComponent {
-	width: 90%;
-}
-
-.UIGadgetManagement .UIGadgetEditor .HorizontalLayout input {
-	width: 97%;
-}
\ No newline at end of file
+	overflow: hidden;
+}
+
+.UIPortletManagement .ListCategory .ListItem {
+	background: #f7f7f7;
+	border-bottom: 1px solid #dddddd;
+}
+
+.UIPortletManagement .ListCategory .Item {
+	display: block;
+	background: url('DefaultSkin/background/ControlIcon.gif') repeat-y left -92px; /* orientation=lt */
+	background: url('DefaultSkin/background/ControlIcon.gif') repeat-y right -92px; /* orientation=rt */
+	padding-left: 20px; /* orientation=lt */
+	padding-right: 20px; /* orientation=rt */
+	cursor: pointer;
+	width: 160px; overflow: hidden;
+	white-space: nowrap;
+	line-height: 25px;
+}
+
+.UIPortletManagement .UIVerticalSlideTabs .VTabSimpleStyle .UIVTabContent {
+	background: none;
+}
+
+.UIPortletManagement .BoxContent {
+	padding: 1px;
+	border: 1px solid #d7d7d7;
+	margin: 1px;
+}
+
+.UIPortletManagement .BoxContent .TitleCategory {
+	cursor: pointer;
+	text-transform: capitalize;
+}
+
+.UIPortletManagement .UIGrid .FieldLable {
+	width: 30%;
+	text-align: right;
+}
+
+.UIPortletManagement .UIGrid .FieldComponent {
+	padding: 4px 0px;
+}
+
+/******************************** UIGadgetManagement ******************************/
+.UIApplicationRegistryPortlet .UIGadgetManagement .PortletIcons {
+	width: 150px; height: 120px;
+	padding-top: 20px; text-align: center;
+}
+
+.UIApplicationRegistryPortlet .UIGadgetManagement .ApplicationContent {
+	margin-left: 150px; /* orientation=lt */
+	margin-right: 150px; /* orientation=rt */
+}
+
+.UIApplicationRegistryPortlet .UIGadgetManagement .URL table {
+	width: 99%;
+	table-layout: fixed;
+}
+
+.UIApplicationRegistryPortlet .UIGadgetManagement .URL .RightLabel {
+	overflow: hidden;
+}
+
+.UIGadgetManagement .UIGadgetEditor table.UIFormGrid {
+	width: 99%;
+	table-layout: fixed;
+}
+
+.UIGadgetManagement .UIGadgetEditor .HorizontalLayout textarea {
+	height: 250px; 
+	padding: 0px;
+	width: 97%; 
+	overflow: auto;
+}
+
+.UIGadgetManagement .UIGadgetEditor td.FieldComponent {
+	width: 90%;
+}
+
+.UIGadgetManagement .GadgetCategory .UIFormGrid {
+   width: 100%;
+}
+
+.UIGadgetManagement .UIGadgetEditor .HorizontalLayout input {
+	width: 97%;
+}
+
+.UIGadgetManagement .GadgetCategory .UIFormGrid {
+	width: 100%;
+}

Copied: portal/trunk/server/jboss/patch-ear/src/main/jboss/bin/exokey.pem (from rev 4964, portal/branches/branch-GTNPORTAL-1592/server/jboss/patch-ear/src/main/jboss/bin/exokey.pem)
===================================================================
--- portal/trunk/server/jboss/patch-ear/src/main/jboss/bin/exokey.pem	                        (rev 0)
+++ portal/trunk/server/jboss/patch-ear/src/main/jboss/bin/exokey.pem	2010-11-08 03:40:16 UTC (rev 4965)
@@ -0,0 +1,29 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXAIBAAKBgQDMYzu2ZJb6Mt89RxjYcPb01clMna7PJTm+UneDYELKjG6EZ4Nu
++v8Di7e2PxpNlW4cCwUiEkiWBrZH8S1caz4CYIAG+VmKXZXBgmNCINgRVzNtj0/E
+4xi5Yz+G1uGCkaB+1mheJWke1rO6SgL6tJ5LmEYCGGu0mj+vxD8W2i4nBwIDAQAB
+AoGAJS1zwiSf9djlFI9nLI+3zCdLG32fO5zI2R7FEIek/pT20WzG0pwjYPC8NRFb
+Zntk8QLsJxtuSqPj6kgreSEkwRR/YGVIo/xIr46vwl/WydMLKJljvu+E7Y4yjYHb
+X4+FDRSL+huOMNNrHgnMy8WnplvtuW5LNV4kD3izU37jxQECQQD15re+8J3C8O6m
+wt8+5Ed6a+1+BIdFggFFpV4oC2AKE11+dnwxD5ZyB77sg6sCbcWbLTXOyp/CCAY8
+bkp9ZbOBAkEA1MgP7ZKUUrtrIIg0VYaTTH24iMWTOsPbgNWg9DlLzmIagHHmmmLC
+O6gFT05bsNPcFv5a25m+jT1yfvjuKLN+hwJBAJHD544/UjWZ3s5p3C6K4bg3PDwk
+cQ+KBjkD0zHHtHGkkxqBIBNxGwyTfOD1GC1DZw0amrfvsw4w9YljE7ML04ECQHrX
+IPLrm3uDvZ3jZCs37RPMxNsZDR1w8ukW67vy1APK+TfMCfB5MV8VajNVrnOQa9BO
+eY+r26lYnyAUgBG5RkMCQHW5qFDYmgJjb38+uwxd53zGy6m+Jd7kdnGms9V4pPd1
+b21WA/5ncxrpFaz5OFPLtv2zrKYVBAj0tros5hs8Fwk=
+-----END RSA PRIVATE KEY-----
+-----BEGIN CERTIFICATE-----
+MIICGzCCAYSgAwIBAgIJAJ/PJcjrAB25MA0GCSqGSIb3DQEBBAUAMBQxEjAQBgNV
+BAMTCW15dGVzdGtleTAeFw0wOTAxMDgwNzUwMjlaFw0xMDAxMDgwNzUwMjlaMBQx
+EjAQBgNVBAMTCW15dGVzdGtleTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
+zGM7tmSW+jLfPUcY2HD29NXJTJ2uzyU5vlJ3g2BCyoxuhGeDbvr/A4u3tj8aTZVu
+HAsFIhJIlga2R/EtXGs+AmCABvlZil2VwYJjQiDYEVczbY9PxOMYuWM/htbhgpGg
+ftZoXiVpHtazukoC+rSeS5hGAhhrtJo/r8Q/FtouJwcCAwEAAaN1MHMwHQYDVR0O
+BBYEFB6QdOIZawuedUjT4F+bK9RG8+sMMEQGA1UdIwQ9MDuAFB6QdOIZawuedUjT
+4F+bK9RG8+sMoRikFjAUMRIwEAYDVQQDEwlteXRlc3RrZXmCCQCfzyXI6wAduTAM
+BgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBAUAA4GBAAE/6mmd8/mMyzzFozblp04e
+TonwNrUB7TldXj+0WnYP04u0hNJuFJ/KD29gHdMnYDdOiVdmK/WS6a7Mn+7HVDT7
+wytizzu/Jfvlrr3yMQYCZssvNIbXPTmr+MjLErjkRxYi4quAnkankTNCDxa4mxN3
+WNlNt2SavfSi3d60wd5o
+-----END CERTIFICATE-----

Copied: portal/trunk/server/jboss/patch-ear/src/main/jboss/bin/oauthkey.pem (from rev 4964, portal/branches/branch-GTNPORTAL-1592/server/jboss/patch-ear/src/main/jboss/bin/oauthkey.pem)
===================================================================
--- portal/trunk/server/jboss/patch-ear/src/main/jboss/bin/oauthkey.pem	                        (rev 0)
+++ portal/trunk/server/jboss/patch-ear/src/main/jboss/bin/oauthkey.pem	2010-11-08 03:40:16 UTC (rev 4965)
@@ -0,0 +1,16 @@
+-----BEGIN PRIVATE KEY-----
+MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAMxjO7Zklvoy3z1H
+GNhw9vTVyUydrs8lOb5Sd4NgQsqMboRng276/wOLt7Y/Gk2VbhwLBSISSJYGtkfx
+LVxrPgJggAb5WYpdlcGCY0Ig2BFXM22PT8TjGLljP4bW4YKRoH7WaF4laR7Ws7pK
+Avq0nkuYRgIYa7SaP6/EPxbaLicHAgMBAAECgYAlLXPCJJ/12OUUj2csj7fMJ0sb
+fZ87nMjZHsUQh6T+lPbRbMbSnCNg8Lw1EVtme2TxAuwnG25Ko+PqSCt5ISTBFH9g
+ZUij/Eivjq/CX9bJ0wsomWO+74TtjjKNgdtfj4UNFIv6G44w02seCczLxaemW+25
+bks1XiQPeLNTfuPFAQJBAPXmt77wncLw7qbC3z7kR3pr7X4Eh0WCAUWlXigLYAoT
+XX52fDEPlnIHvuyDqwJtxZstNc7Kn8IIBjxuSn1ls4ECQQDUyA/tkpRSu2sgiDRV
+hpNMfbiIxZM6w9uA1aD0OUvOYhqAceaaYsI7qAVPTluw09wW/lrbmb6NPXJ++O4o
+s36HAkEAkcPnjj9SNZnezmncLorhuDc8PCRxD4oGOQPTMce0caSTGoEgE3EbDJN8
+4PUYLUNnDRqat++zDjD1iWMTswvTgQJAetcg8uube4O9neNkKzftE8zE2xkNHXDy
+6Rbru/LUA8r5N8wJ8HkxXxVqM1Wuc5Br0E55j6vbqVifIBSAEblGQwJAdbmoUNia
+AmNvfz67DF3nfMbLqb4l3uR2caaz1Xik93VvbVYD/mdzGukVrPk4U8u2/bOsphUE
+CPS2uizmGzwXCQ==
+-----END PRIVATE KEY-----

Modified: portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/core/DOMUtil.js
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/core/DOMUtil.js	2010-11-06 16:11:39 UTC (rev 4964)
+++ portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/core/DOMUtil.js	2010-11-08 03:40:16 UTC (rev 4965)
@@ -411,8 +411,7 @@
     return [];
   }
 
-  var nodes = [],
-    elements = root.getElementsByTagName(tag);
+  var nodes = [], elements = root.getElementsByTagName(tag);
 
   for (var i = 0, len = elements.length; i < len; ++i) {
     if ( method(elements[i]) ) {

Modified: portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/core/DragDrop.js
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/core/DragDrop.js	2010-11-06 16:11:39 UTC (rev 4964)
+++ portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/core/DragDrop.js	2010-11-08 03:40:16 UTC (rev 4965)
@@ -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/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalDragDrop.js
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalDragDrop.js	2010-11-06 16:11:39 UTC (rev 4964)
+++ portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalDragDrop.js	2010-11-08 03:40:16 UTC (rev 4965)
@@ -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 */
@@ -192,6 +212,10 @@
         trContainer.appendChild(previewTD) ;
       }
     }
+     var dragParent = dragObject.parentNode;
+     if (eXo.core.DOMUtil.getChildrenByTagName(dragParent, "div").length === 1 && !eXo.core.DOMUtil.hasClass(dragParent, "EmptyContainer")) {
+        eXo.core.DOMUtil.addClass(dragParent, "EmptyContainer");
+     }
   } ;
 
   DragDrop.dropCallback = function(dndEvent) {
@@ -203,11 +227,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 +257,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") {
@@ -330,10 +358,15 @@
  * @param the dragging object
  */
 PortalDragDrop.prototype.findDropableTargets = function(dragBlock) {
-	var DOMUtil = eXo.core.DOMUtil;
+  var DOMUtil = eXo.core.DOMUtil;
   var dropableTargets = new Array() ;
+  
+  if (dragBlock && DOMUtil.hasClass(dragBlock, "UIColumnContainer")) {
+    var uiTableContainer = eXo.core.DOMUtil.findAncestorByClass(dragBlock, "UITableColumnContainer");
+    dropableTargets.push(uiTableContainer);
+    return dropableTargets;
+  }
   var uiWorkingWorkspace = document.getElementById("UIWorkingWorkspace") ;
-  
   var pagebody = document.getElementById("UIPageBody");
   if(eXo.portal.portalMode && pagebody) {
 	  var uiPortal = DOMUtil.findFirstDescendantByClass(uiWorkingWorkspace, "div", "UIPortal") ;
@@ -347,6 +380,7 @@
   for(var i = 0; i < uiContainers.length; i++) {
   	if(DOMUtil.hasAncestor(uiContainers[i], dragBlock)) continue;
   	if(DOMUtil.hasClass(uiContainers[i], "ProtectedContainer")) continue;
+  	if (DOMUtil.hasClass(uiContainers[i], "UITableColumnContainer")) continue;
     dropableTargets.push(uiContainers[i]) ;
   }
   return dropableTargets ;
@@ -359,13 +393,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 +413,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
+   }  
 };
 
 /**
@@ -424,6 +463,8 @@
   } else {
     uiRowContainer.appendChild(srcElement) ;
   }
+
+   eXo.core.DOMUtil.removeClass(uiRowContainer, "EmptyContainer");
 	
   if(parentNode.nodeName.toLowerCase() == "td") {
   	eXo.core.DOMUtil.removeElement(parentNode) ;

Modified: portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js	2010-11-06 16:11:39 UTC (rev 4964)
+++ portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js	2010-11-08 03:40:16 UTC (rev 4965)
@@ -133,6 +133,8 @@
         this.blocksToUpdate[j].scripts = eXo.core.DOMUtil.findDescendantsByTagName(dataBlocks[1], "script") ;
         
       }
+    } else if(div[i].className == "MarkupHeadElements") {
+      this.markupHeadElements = new MarkupHeadElements(div[i]);    
     } else if(div[i].className == "PortalResponseScript") {
       this.script = div[i].innerHTML ;
 			div[i].style.display = "none" ;
@@ -140,6 +142,16 @@
   }
 };
 
+function MarkupHeadElements(fragment) {
+	var  DOMUtil = eXo.core.DOMUtil ;
+	this.titles = DOMUtil.findDescendantsByTagName(fragment, "title");
+	this.bases = DOMUtil.findDescendantsByTagName(fragment, "base") ;
+	this.links = DOMUtil.findDescendantsByTagName(fragment, "link") ;
+	this.metas = DOMUtil.findDescendantsByTagName(fragment, "meta") ;
+	this.scripts = DOMUtil.findDescendantsByTagName(fragment, "script") ;		
+	this.styles = DOMUtil.findDescendantsByTagName(fragment, "style") ;
+}
+
 /*
 * This function is used to dynamically append a script to the head tag
 * of the page
@@ -158,7 +170,7 @@
   
   //check if contains source attribute
   if(scriptElement.src) {
-    script.src = scriptElement.src
+    script.src = scriptElement.src;
   } else {
   	script.text = scriptElement.innerHTML;
   }
@@ -409,6 +421,89 @@
 		  }
 	  } 
 	} ;
+	
+	instance.updateHtmlHead = function(response) {
+		cleanHtmlHead(response);
+		
+		var DOMUtil = eXo.core.DOMUtil;
+		var head = document.getElementsByTagName("head")[0]; 								
+		var markupHeadElements = response.markupHeadElements;		
+		
+		if (markupHeadElements.titles.length != 0) {
+			var oldTitle = DOMUtil.getChildrenByTagName(head, "title")[0];
+			var newTitle = markupHeadElements.titles[markupHeadElements.titles.length - 1];
+			if (oldTitle) {
+				head.replaceChild(newTitle, oldTitle);
+			} else {
+				head.appendChild(newTitle);
+			}
+		}			
+		
+		appendElementsToHead(markupHeadElements.metas);
+    		appendElementsToHead(markupHeadElements.bases);
+		appendElementsToHead(markupHeadElements.links);				
+		appendElementsToHead(markupHeadElements.styles);
+		appendElementsToHead(markupHeadElements.scripts);
+	};
+	
+	function cleanHtmlHead(response) {
+		var DOMUtil = eXo.core.DOMUtil;
+		var head = document.getElementsByTagName("head")[0];		
+		
+		var portletResponses = response.portletResponses;
+		if (portletResponses != null) {
+			for (var i = 0; i < portletResponses.length; i++) {
+				removeExtraHead(portletResponses[i].portletId);
+			}
+		}
+		
+		var portletFragments = DOMUtil.findDescendantsByClass(response.data, "div", "PORTLET-FRAGMENT");
+		for (var i = 0; i < portletFragments.length; i++) {
+			removeExtraHead(portletFragments[i].parentNode.id);
+		}
+		
+		var uiWorkingWorkspace = document.getElementById("UIWorkingWorkspace") ;
+		var portletFragsInWS = DOMUtil.findDescendantsByClass(uiWorkingWorkspace, "div", "PORTLET-FRAGMENT");		
+		var exHeads = DOMUtil.getElementsBy(function(elem) {
+			return elem.tagName != "TITLE" && elem.className.indexOf("ExHead-") == 0;
+		}, "*", head);
+		
+		for (var i = 0; i < exHeads.length; i++) {
+			var portletId = exHeads[i].className.substring(7);
+			var del = true;
+			for (var j = 0; j < portletFragsInWS.length; j++) {
+				if (portletId == portletFragsInWS[j].parentNode.id) {
+					del = false;
+					break;
+				}
+			}
+			if (del) {
+				head.removeChild(exHeads[i]);
+			}
+		}
+	}
+	
+	function removeExtraHead(portletId) {
+		var DOMUtil = eXo.core.DOMUtil;
+		var head = document.getElementsByTagName("head")[0];
+		
+		var elemsToRemove = DOMUtil.getElementsBy(function(elem) {
+			return elem.tagName != "TITLE" && elem.className == "ExHead-" + portletId;
+		}, "*", head);
+		
+		for (var i = 0; i < elemsToRemove.length; i++) {
+			head.removeChild(elemsToRemove[i]);
+		}
+	}
+	
+	function appendElementsToHead(elements) {
+		var head = document.getElementsByTagName("head")[0]; 
+		
+		for (var i = 0; i < elements.length; i++) {
+			head.appendChild(elements[i]);
+		}
+	}
+	
 	/*
 	* This methods will replace some block content by new one. 
 	* This is the important concept in any AJAX call where JS is used to dynamically
@@ -460,7 +555,7 @@
 	  eXo.portal.AjaxRequest.maskLayer = null ;
 	  eXo.portal.CurrentRequest = null ;
 	  window.location.reload() ;
-	}
+	};
 	
 	/*
 	* This method is called when the AJAX call is completed and that the request.responseText
@@ -520,6 +615,7 @@
 	  }
 	  //Handle the portal responses
 	  instance.updateBlocks(response.blocksToUpdate) ;
+	  instance.updateHtmlHead(response);
 	  instance.executeScript(response.script) ;
 	  /**
        * Clears the instance.to timeout if the request takes less time than expected to get response
@@ -548,7 +644,6 @@
 		 * Modified by Truong LE to avoid double click problem
 		 */		
 		 
-		Browser = eXo.core.Browser; 
 		if(eXo.portal.AjaxRequest.maskLayer == null ){
 			eXo.portal.AjaxRequest.maskLayer = eXo.core.UIMaskLayer.createTransparentMask();
 		}
@@ -557,7 +652,7 @@
 				eXo.core.UIMaskLayer.showAjaxLoading(eXo.portal.AjaxRequest.maskLayer);			   
 			}
 		}, 2000);
-	}
+	};
 	
 	return instance ;
 } ;

Modified: portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js	2010-11-06 16:11:39 UTC (rev 4964)
+++ portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js	2010-11-08 03:40:16 UTC (rev 4965)
@@ -513,14 +513,17 @@
  */
 UIPortal.prototype.findUIComponentOf = function(element) {
   var DOMUtil = eXo.core.DOMUtil;
-  var parent = element.parentNode ;
-  while(parent != null) {
-    if(DOMUtil.hasClass(parent,'UIPortlet') || DOMUtil.hasClass(parent,'UIContainer') ||  
-       DOMUtil.hasClass(parent,'UIPageBody') ||  DOMUtil.hasClass(parent,'UIPortal'))  {
-      return parent ;
-    }
-    parent = parent.parentNode ;
+  var parent;
+  if (parent = DOMUtil.findAncestorByClass(element, "UIPortlet")) {
+    return parent;
+  } else if (parent = DOMUtil.findAncestorByClass(element, "UIContainer")) {
+    return parent;
+  } else if (parent = DOMUtil.findAncestorByClass(element, "UIPageBody")) {
+    return parent;
+  } else if (parent = DOMUtil.findAncestorByClass(element, "UIPortal")) {
+    return parent;
   }
+  
   return null ;
 };
 /**

Modified: portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIItemSelector.js
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIItemSelector.js	2010-11-06 16:11:39 UTC (rev 4964)
+++ portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIItemSelector.js	2010-11-08 03:40:16 UTC (rev 4965)
@@ -114,7 +114,7 @@
 
 /*TODO: Review This Function (Ha's comment)*/
 UIItemSelector.prototype.beforeActionHappen = function(selectedItem) {
-  DOMUtil = eXo.core.DOMUtil;
+  var DOMUtil = eXo.core.DOMUtil;
   this.uiItemSelector = DOMUtil.findAncestorByClass(selectedItem, "UIItemSelector");
   this.itemList = DOMUtil.findAncestorByClass(selectedItem, "ItemList");
   this.itemListContainer = DOMUtil.findAncestorByClass(selectedItem, "ItemListContainer") ;

Modified: portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIPopup.js
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIPopup.js	2010-11-06 16:11:39 UTC (rev 4964)
+++ portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIPopup.js	2010-11-08 03:40:16 UTC (rev 4965)
@@ -72,7 +72,7 @@
 	
 	var uiMaskWS = document.getElementById("UIMaskWorkspace");
 	if(uiMaskWS) {
-		uiMaskWSzIndex = eXo.core.DOMUtil.getStyle(uiMaskWS, "zIndex");
+		var uiMaskWSzIndex = eXo.core.DOMUtil.getStyle(uiMaskWS, "zIndex");
 		if(uiMaskWSzIndex && (uiMaskWSzIndex > eXo.webui.UIPopup.zIndex))	{
 			eXo.webui.UIPopup.zIndex = uiMaskWSzIndex;
 		}

Modified: portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIPopupWindow.js
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIPopupWindow.js	2010-11-06 16:11:39 UTC (rev 4964)
+++ portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIPopupWindow.js	2010-11-08 03:40:16 UTC (rev 4965)
@@ -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/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIVerticalSlideTabs.js
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIVerticalSlideTabs.js	2010-11-06 16:11:39 UTC (rev 4964)
+++ portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIVerticalSlideTabs.js	2010-11-08 03:40:16 UTC (rev 4965)
@@ -102,7 +102,7 @@
     var controlArea = eXo.core.DOMUtil.findFirstDescendantByClass(uiVTab, "div", "ControlArea");
     var controlAreaHeight = 0 ;
     if(controlArea != null)  controlAreaHeight = controlArea.offsetHeight ;
-    scrollArea = eXo.core.DOMUtil.findFirstDescendantByClass(uiVTab, "div", "ScrollArea");
+    var scrollArea = eXo.core.DOMUtil.findFirstDescendantByClass(uiVTab, "div", "ScrollArea");
     if(scrollArea != null) {
       scrollArea.style.height = (height - controlAreaHeight - totalTabHeight - 35) + "px" ;
     }

Modified: portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIPage/Stylesheet.css
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIPage/Stylesheet.css	2010-11-06 16:11:39 UTC (rev 4964)
+++ portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIPage/Stylesheet.css	2010-11-08 03:40:16 UTC (rev 4965)
@@ -25,7 +25,8 @@
 
 .UIPageBody .PageLayoutDecorator	{
 	padding: 0px;
-	margin: 0px 2px auto 2px;
+	margin: 0px 2px auto 2px;
+	overflow: hidden;
 }
 
 .UIPageBody .PageLayoutDecorator .MiddlePageBG {

Modified: portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIPortalComponent/Stylesheet.css
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIPortalComponent/Stylesheet.css	2010-11-06 16:11:39 UTC (rev 4964)
+++ portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIPortalComponent/Stylesheet.css	2010-11-08 03:40:16 UTC (rev 4965)
@@ -189,8 +189,8 @@
 	float: right; /* orientation=rt */
 	width: 22px; height: 16px;
 	background: url('background/Pen.gif') no-repeat top;
-	margin: 4px 2px 0px 0px; /* orientation=lt */
-	margin: 4px 0px 0px 2px; /* orientation=rt */
+	margin: 4px 0px 0px 2px; /* orientation=lt */
+	margin: 4px 2px 0px 0px; /* orientation=rt */
 }
 
 .UIContainer .DeleteContainerIcon {
@@ -213,6 +213,29 @@
 	background: url('background/DefaultContainerIcon.png') no-repeat;
 }
 
+.UIColumnContainer .ControlIcon {
+  float: right;/* orientation=lt */
+  float: left;/* orientation=rt */
+  width: 28px; 
+  height: 20px;
+  cursor: pointer;
+  background: url('/eXoResources/skin/PortletThemes/background/DefaultTheme.png') no-repeat center;
+}
+
+.UIColumnContainer .EditContainerIcon {
+	margin-left: 0px; /* orientation=lt */
+	margin-right: 0px; /* orientation=rt */
+}
+
+.UIColumnContainer .ArrowDownIcon {
+	float: left; /* orientation=lt */
+	float: right; /* orientation=rt */
+	width: 22px; height: 16px; 
+	background: url('background/ArrowDown.gif') no-repeat center top;
+	margin: 4px 0px 0px 2px; /* orientation=lt */
+	margin: 4px 2px 0px 0px; /* orientation=rt */
+}
+
 .UIPortal .LAYOUT-PORTAL {
 	/* background: url('background/PortalBackground4x4.gif');*/
 	background: white;

Copied: portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIPortalComponent/background/ArrowDown.gif (from rev 4964, portal/branches/branch-GTNPORTAL-1592/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIPortalComponent/background/ArrowDown.gif)
===================================================================
(Binary files differ)

Modified: portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIForms/UIForm/Stylesheet.css
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIForms/UIForm/Stylesheet.css	2010-11-06 16:11:39 UTC (rev 4964)
+++ portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIForms/UIForm/Stylesheet.css	2010-11-08 03:40:16 UTC (rev 4965)
@@ -1,22 +1,22 @@
-/**
- * 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.
- */
-
+/**
+ * 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.
+ */
+
 /*####################- HorizontalLayout -#################*/
 
 .UIForm .HorizontalLayout {

Modified: portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIPopup/UIPopupCategory/Stylesheet.css
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIPopup/UIPopupCategory/Stylesheet.css	2010-11-06 16:11:39 UTC (rev 4964)
+++ portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIPopup/UIPopupCategory/Stylesheet.css	2010-11-08 03:40:16 UTC (rev 4965)
@@ -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

Modified: portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UISelector/UIItemSelector/Stylesheet.css
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UISelector/UIItemSelector/Stylesheet.css	2010-11-06 16:11:39 UTC (rev 4964)
+++ portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UISelector/UIItemSelector/Stylesheet.css	2010-11-08 03:40:16 UTC (rev 4965)
@@ -56,7 +56,7 @@
 
 .UIItemSelector .ItemDetailList .TemplateContainer .BasicPortalImage {
 	height: 222px;
-	background: url('background/TemplateContainer.jpg') no-repeat center -392px;
+	background: url('background/TemplateContainer.jpg') no-repeat center -1059px;
 	margin-top: 9px;
 }
 

Modified: portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UISelector/UIItemSelector/background/TemplateContainer.jpg
===================================================================
(Binary files differ)

Modified: portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UITabSystem/UIVerticalSlideTabs/Stylesheet.css
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UITabSystem/UIVerticalSlideTabs/Stylesheet.css	2010-11-06 16:11:39 UTC (rev 4964)
+++ portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UITabSystem/UIVerticalSlideTabs/Stylesheet.css	2010-11-08 03:40:16 UTC (rev 4965)
@@ -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/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_ar.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_ar.xml	2010-11-06 16:11:39 UTC (rev 4964)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_ar.xml	2010-11-08 03:40:16 UTC (rev 4965)
@@ -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 #

Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties	2010-11-06 16:11:39 UTC (rev 4964)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties	2010-11-08 03:40:16 UTC (rev 4965)
@@ -974,6 +974,30 @@
 UIContainer.tooltip.drag=Drag Container here
 
   ############################################################################
+  #		            org.exoplatform.portal.webui.container.UIColumnContainer          #
+  ############################################################################
+
+UIColumnContainer.title.Container=Column
+UIColumnContainer.title.DragControlArea=Hold this area to drag this column to other place
+UIColumnContainer.deleteColumnContainer=Are you sure you want to delete this column ?
+UIColumnContainer.tooltip.insertLeft=Insert column left
+UIColumnContainer.tooltip.insertRight=Insert column right
+UIColumnContainer.tooltip.insertColumn=Insert new column
+UIColumnContainer.tooltip.closeContainer=Delete Column
+UIColumnContainer.tooltip.editContainer=Edit Column
+UIColumnContainer.label.insertLeft=Insert left
+UIColumnContainer.label.insertRight=Insert right
+
+  ############################################################################
+  #		           org.exoplatform.portal.webui.container.UITableColumnContainer#
+  ############################################################################
+
+UITableColumnContainer.title.Container=Table container
+UITableColumnContainer.title.DragControlArea=Hold this area to drag this table
+UITableColumnContainer.tooltip.closeContainer=Delete Table
+UITableColumnContainer.tooltip.editContainer=Edit Table
+
+  ############################################################################
   #		            org.exoplatform.portal.component.view.UIPage               #
   ############################################################################
   

Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_fr.properties
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_fr.properties	2010-11-06 16:11:39 UTC (rev 4964)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_fr.properties	2010-11-08 03:40:16 UTC (rev 4965)
@@ -926,6 +926,28 @@
 UIContainer.tooltip.drag=Glisser le conteneur ici
 
   ############################################################################
+  #		            org.exoplatform.portal.webui.container.UIColumnContainer          #
+  ############################################################################
+
+UIColumnContainer.title.Container=Colonne
+UIColumnContainer.title.DragControlArea=Cliquer cette partie sans relâcher le bouton pour faire glisser cete colonne à d'autre place
+UIColumnContainer.deleteColumnContainer=Are you sure you want to delete this column ?
+UIColumnContainer.tooltip.insertLeft=Insérer une colonne à gauche
+UIColumnContainer.tooltip.insertRight=Insérer une colonne à droit
+UIColumnContainer.tooltip.insertColumn=Insérer une nouvelle colonne
+UIColumnContainer.tooltip.closeContainer=Supprimer cette colonne
+UIColumnContainer.tooltip.editContainer=Editer cette colonne
+
+  ############################################################################
+  #		           org.exoplatform.portal.webui.container.UITableColumnContainer#
+  ############################################################################
+
+UITableColumnContainer.title.Container=Conteneur de navigation
+UITableColumnContainer.title.DragControlArea=Cliquer cette partie sans relâcher le bouton pour faire glisser ce tableau
+UITableColumnContainer.tooltip.closeContainer=Supprimer ce tableau
+UITableColumnContainer.tooltip.editContainer=Editer ce tableau
+
+  ############################################################################
   #		            org.exoplatform.portal.component.view.UIPage               #
   ############################################################################
   

Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties	2010-11-06 16:11:39 UTC (rev 4964)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties	2010-11-08 03:40:16 UTC (rev 4965)
@@ -930,6 +930,30 @@
 UIContainer.tooltip.drag=Vùng kéo Container.
 
   ############################################################################
+  #		            org.exoplatform.portal.webui.container.UIColumnContainer          #
+  ############################################################################
+
+UIColumnContainer.title.Container=Cột
+UIColumnContainer.title.DragControlArea=Giữ vùng này để kéo cột
+UIColumnContainer.deleteColumnContainer=Bạn có chắc chắn muốn xóa cột này không ?
+UIColumnContainer.tooltip.insertLeft=Chèn cột mới vào bên trái
+UIColumnContainer.tooltip.insertRight=Chèn cột mới vào bên phải
+UIColumnContainer.tooltip.insertColumn=Chèn thêm cột mới
+UIColumnContainer.tooltip.closeContainer=Xóa cột
+UIColumnContainer.tooltip.editContainer=Sửa thuộc tính của cột
+UIColumnContainer.label.insertLeft=Chèn cột vào bên trái
+UIColumnContainer.label.insertRight=Chèn cột vào bên phải
+
+  ############################################################################
+  #		           org.exoplatform.portal.webui.container.UITableColumnContainer#
+  ############################################################################
+
+UITableColumnContainer.title.Container=Bảng
+UITableColumnContainer.title.DragControlArea=Giữ vùng này để kéo bảng
+UITableColumnContainer.tooltip.closeContainer=Xóa bảng
+UITableColumnContainer.tooltip.editContainer=Sửa thuộc tính của bảng
+
+  ############################################################################
   #		            org.exoplatform.portal.component.view.UIPage               #
   ############################################################################
   

Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/uiconf/portal/webui/container/ContainerConfigOption.groovy
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/uiconf/portal/webui/container/ContainerConfigOption.groovy	2010-11-06 16:11:39 UTC (rev 4964)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/uiconf/portal/webui/container/ContainerConfigOption.groovy	2010-11-08 03:40:16 UTC (rev 4965)
@@ -46,22 +46,22 @@
     column.addSelectItemOption(new SelectItemOption("oneColumns","" +
         "<container template=\"system:/groovy/portal/webui/container/UITableColumnContainer.gtmpl\">" +
         "  <factory-id>TableColumnContainer</factory-id>" +
-        "  <container template=\"system:/groovy/portal/webui/container/UIContainer.gtmpl\"></container>" +
+        "  <container template=\"system:/groovy/portal/webui/container/UIColumnContainer.gtmpl\"><factory-id>ColumnContainer</factory-id></container>" +
         "</container>", 
         "OneRowContainerLayout")) ;
     column.addSelectItemOption(new SelectItemOption("twoColumns",
         "<container template=\"system:/groovy/portal/webui/container/UITableColumnContainer.gtmpl\">" +
         "  <factory-id>TableColumnContainer</factory-id>" +
-        "  <container template=\"system:/groovy/portal/webui/container/UIContainer.gtmpl\"></container>" +
-        "  <container template=\"system:/groovy/portal/webui/container/UIContainer.gtmpl\"></container>" +
+        "  <container template=\"system:/groovy/portal/webui/container/UIColumnContainer.gtmpl\"><factory-id>ColumnContainer</factory-id></container>" +
+        "  <container template=\"system:/groovy/portal/webui/container/UIColumnContainer.gtmpl\"><factory-id>ColumnContainer</factory-id></container>" +
         "</container>",
         "TwoColumnContainerLayout")) ;
     column.addSelectItemOption(new SelectItemOption("threeColumns",
         "<container template=\"system:/groovy/portal/webui/container/UITableColumnContainer.gtmpl\">" +
         "  <factory-id>TableColumnContainer</factory-id>" +
-        "  <container template=\"system:/groovy/portal/webui/container/UIContainer.gtmpl\"></container>" +
-        "  <container template=\"system:/groovy/portal/webui/container/UIContainer.gtmpl\"></container>" +
-        "  <container template=\"system:/groovy/portal/webui/container/UIContainer.gtmpl\"></container>" +
+        "  <container template=\"system:/groovy/portal/webui/container/UIColumnContainer.gtmpl\"><factory-id>ColumnContainer</factory-id></container>" +
+        "  <container template=\"system:/groovy/portal/webui/container/UIColumnContainer.gtmpl\"><factory-id>ColumnContainer</factory-id></container>" +
+        "  <container template=\"system:/groovy/portal/webui/container/UIColumnContainer.gtmpl\"><factory-id>ColumnContainer</factory-id></container>" +
         "</container>",
         "ThreeColumnContainerLayout")) ;
   templates.add(column);  

Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/web.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/web.xml	2010-11-06 16:11:39 UTC (rev 4964)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/web.xml	2010-11-08 03:40:16 UTC (rev 4965)
@@ -94,6 +94,16 @@
 		<filter-name>ClusteredSSOFilter</filter-name>
 		<filter-class>org.exoplatform.web.login.ClusteredSSOFilter</filter-class>
 	</filter>
+   
+   <filter>
+      <filter-name>PortalContainerFilter</filter-name>
+      <filter-class>org.exoplatform.container.web.PortalContainerFilter</filter-class>
+   </filter>
+   
+   <filter-mapping>
+      <filter-name>PortalContainerFilter</filter-name>
+      <url-pattern>/*</url-pattern>
+   </filter-mapping>
 
    <filter-mapping>
      <filter-name>RememberMeFilter</filter-name>

Modified: portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/UILoginForm.gtmpl
===================================================================
--- portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/UILoginForm.gtmpl	2010-11-06 16:11:39 UTC (rev 4964)
+++ portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/UILoginForm.gtmpl	2010-11-08 03:40:16 UTC (rev 4965)
@@ -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/trunk/web/portal/src/main/webapp/groovy/portal/webui/application/UIApplicationList.gtmpl
===================================================================
--- portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/application/UIApplicationList.gtmpl	2010-11-06 16:11:39 UTC (rev 4964)
+++ portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/application/UIApplicationList.gtmpl	2010-11-08 03:40:16 UTC (rev 4965)
@@ -39,7 +39,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";
 								%>

Copied: portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UIColumnContainer.gtmpl (from rev 4964, portal/branches/branch-GTNPORTAL-1592/web/portal/src/main/webapp/groovy/portal/webui/container/UIColumnContainer.gtmpl)
===================================================================
--- portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UIColumnContainer.gtmpl	                        (rev 0)
+++ portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UIColumnContainer.gtmpl	2010-11-08 03:40:16 UTC (rev 4965)
@@ -0,0 +1,131 @@
+<%
+	import org.exoplatform.commons.utils.ExpressionUtil;
+	import org.exoplatform.portal.webui.workspace.UIPortalApplication;
+	import org.exoplatform.webui.core.UIComponent;
+	//import org.exoplatform.webui.config.Event;
+	
+	def rcontext = _ctx.getRequestContext();
+	ResourceBundle res = rcontext.getApplicationResourceBundle();
+	
+	UIPortalApplication uiPortalApp = rcontext.getUIApplication();
+	boolean hasPermission = uicomponent.hasPermission();
+	if(!uiPortalApp.isEditing() && !hasPermission) return;
+
+	String cssStyle = "";
+	String uiComponentWidth = uicomponent.getWidth();
+	String uiComponentHeight = uicomponent.getHeight();
+	if(uiComponentWidth != null || uiComponentHeight != null) cssStyle = "style=\"";
+	if(uiComponentHeight != null) cssStyle += "height: "+uiComponentHeight+";"
+	if(cssStyle.length() > 0) cssStyle += "\"";
+	
+	/** Trim the prefix UIContainer- if any, this hardcoded part is needed to update nested container via Ajax */
+	String componentId = uicomponent.getId();
+	if(componentId.startsWith("UIContainer-")){
+		uicomponent.setId(componentId.substring("UIContainer-".length()));
+	}
+%>
+
+<div class="UIContainer UIColumnContainer <%=uiPortalApp.isEditing()?"EdittingContainer":""%> <%=hasPermission?"": "ProtectedContainer"%>" 
+				id="${uicomponent.id}" ${cssStyle} 
+				onmouseover="eXo.portal.UIPortal.blockOnMouseOver(event, this, true);" 
+				onmouseout="eXo.portal.UIPortal.blockOnMouseOver(event, this, false);">
+	<div class="NormalContainerBlock">
+		<div class="LeftContainerBlock">
+			<div class="RightContainerBlock UIComponentBlock">
+
+			<%
+				int portalMode = uiPortalApp.getModeState();
+				if(portalMode == uiPortalApp.CONTAINER_BLOCK_EDIT_MODE || portalMode == UIPortalApplication.APP_BLOCK_EDIT_MODE){
+			%>
+				<div class="LAYOUT-CONTAINER LAYOUT-BLOCK">
+			<%} else {%>
+				<div class="VIEW-CONTAINER VIEW-BLOCK">
+			<%} %> 
+					<%if(hasPermission) {%>
+						<div class="UIRowContainer <%=(portalMode != UIPortalApplication.NORMAL_MODE && uicomponent.getChildren().size() == 0) ? "EmptyContainer" : ""%>">
+							<div>
+								<%uicomponent.renderChildren();%>
+							</div>
+						</div>
+						<%} else out.print("<div class='ProtectedContent'>"+_ctx.appRes("UIPortlet.label.protectedContent")+"</div>");%>
+				</div>
+				
+			<%if(portalMode != UIPortalApplication.NORMAL_MODE){%>
+				<div class="EDITION-BLOCK EDITION-CONTAINER" style="display: none;">
+					<div style="position: relative;">
+						<div style="position: absolute; top: -86px;">
+
+							<div class="NewLayer" style="display: none; visibility: hidden;"><span></span></div>
+							<div class="CONTROL-CONTAINER CONTROL-BLOCK" style="position: absolute; top: -6px;">
+								<%/*Begin InfoBar*/%>
+							 	<div class="UIInfoBar">
+									<div class="BlueRoundedStyle">
+										<div class="LeftBar">
+											<div class="RightBar">
+												<div class="MiddleBar">
+													<div class="FixHeight ClearFix">
+														<div class="DragControlArea" title="<%=_ctx.appRes("UIColumnContainer.title.DragControlArea")%>" onmousedown="eXo.portal.PortalDragDrop.init.call(this,event);"><span></span></div>
+														<% 
+															String showCategory = "eXo.webui.UIPopupSelectCategory.show(this, event)";
+															String strTitle = uicomponent.getTitle() != null ?
+																		ExpressionUtil.getExpressionValue(res, uicomponent.getTitle()) :
+																		_ctx.appRes("UIColumnContainer.title.Container");
+														%>
+														<div class="ContainerIcon"><%=hasPermission ? strTitle : _ctx.appRes("UIPortlet.label.protectedContent")%></div>
+														<%if(hasPermission) {%>
+															<div class="ControlIcon ArrowDownIcon" onclick="$showCategory" title="<%= _ctx.appRes("UIColumnContainer.tooltip.insertColumn") %>">
+																<% /*Begin Popup Menu*/ %>
+																<div style="position: relative; width: 100%">
+																	<div class="UIPopupCategory" style="display: none;">
+																		<div class="PopupCategoryDecorator">
+																			<div class="PopupCategoryTL">
+																				<div class="PopupCategoryTR">
+																					<div class="PopupCategoryTC"><span></span></div>
+																				</div>
+																			</div>
+																			<div class="PopupCategoryML">
+																				<div class="PopupCategoryMR">
+																					<div class="PopupCategoryMC">
+																						<a class="CategoryItem" href="<%= uicomponent.event("InsertColumn", org.exoplatform.portal.webui.container.UIColumnContainer.INSERT_BEFORE) %>"  title="<%= _ctx.appRes("UIColumnContainer.tooltip.insertLeft") %>">
+																							<div class="CategoryItemLabel"><%= _ctx.appRes("UIColumnContainer.label.insertLeft") %></div>
+																						</a>
+																						<a class="CategoryItem" href="<%= uicomponent.event("InsertColumn", org.exoplatform.portal.webui.container.UIColumnContainer.INSERT_AFTER) %>"  title="<%= _ctx.appRes("UIColumnContainer.tooltip.insertRight") %>">
+																							<div class="CategoryItemLabel"><%= _ctx.appRes("UIColumnContainer.label.insertRight") %></div>
+																						</a>
+																					</div>
+																				</div>
+																			</div>
+																			<div class="PopupCategoryBL">
+																				<div class="PopupCategoryBR">
+																					<div class="PopupCategoryBC"><span></span></div>
+																				</div>
+																			</div>
+																		</div>
+																	</div>
+																</div>
+																<% /*End Popup Menu*/ %>
+															</div>
+															<a href="<%=uicomponent.event("EditContainer")%>;eXo.portal.UIPortal.changeComposerSaveButton()" class="EditContainerIcon" title="<%=_ctx.appRes("UIColumnContainer.tooltip.editContainer")%>"><span></span></a>
+															<a href="<%=uicomponent.event("DeleteComponent")%>" class="DeleteContainerIcon" title="<%=_ctx.appRes("UIColumnContainer.tooltip.closeContainer")%>"><span></span></a>
+															
+														<%}%>
+													
+													</div>
+												</div>
+											</div>
+										</div>
+									</div>
+								</div>
+								<%/*End InfoBar*/ %>
+							</div>
+							
+						</div>
+					</div>
+				</div>	
+			<%} %>
+				
+			</div>
+		</div>
+	</div> 
+</div>
+

Modified: portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UITableColumnContainer.gtmpl
===================================================================
--- portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UITableColumnContainer.gtmpl	2010-11-06 16:11:39 UTC (rev 4964)
+++ portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UITableColumnContainer.gtmpl	2010-11-08 03:40:16 UTC (rev 4965)
@@ -16,7 +16,7 @@
 	}
 	
 %>
-<div class="UIContainer <%=uiPortalApp.isEditing()?"EdittingContainer":""%> <%=hasPermission?"":"ProtectedContainer"%>" 
+<div class="UIContainer UITableColumnContainer <%=uiPortalApp.isEditing()?"EdittingContainer":""%> <%=hasPermission?"":"ProtectedContainer"%>" 
 				id="${uicomponent.id}" 
 				onmouseover="eXo.portal.UIPortal.blockOnMouseOver(event, this, true);" 
 				onmouseout="eXo.portal.UIPortal.blockOnMouseOver(event, this, false);">
@@ -39,10 +39,10 @@
 				<%} %>
 					<div>
 						<%if(hasPermission) {%>		
-						<table class="UITableColumnContainer" style="table-layout: fixed; margin: 0px auto; $style">
+						<table class="UITableColumn" style="table-layout: fixed; margin: 0px auto; $style">
 							<tr class="TRContainer">
 								<% for(uiChild in uicomponent.getChildren()) {%>
-									<td class="${uiChild.id}TDContainer TDContainer"><% uicomponent.renderUIComponent(uiChild) %></td>
+									<td class="${uiChild.id}TDContainer TDContainer" width="<%= uiChild.getWidth(); %>"><% uicomponent.renderUIComponent(uiChild) %></td>
 								<% } %>
 						 </tr>
 						</table>
@@ -65,16 +65,16 @@
 											<div class="RightBar">
 												<div class="MiddleBar">
 													<div class="FixHeight ClearFix">
-														<div class="DragControlArea" title="<%=_ctx.appRes("UIContainer.tooltip.drag")%>" onmousedown="eXo.portal.PortalDragDrop.init.call(this,event);"><span></span></div>
+														<div class="DragControlArea" title="<%=_ctx.appRes("UITableColumnContainer.title.DragControlArea")%>" onmousedown="eXo.portal.PortalDragDrop.init.call(this,event);"><span></span></div>
 														<% 
 															String strTitle = uicomponent.getTitle() != null ?
 																		ExpressionUtil.getExpressionValue(res, uicomponent.getTitle()) :
-																		_ctx.appRes("UIContainer.title.Container");
+																		_ctx.appRes("UITableColumnContainer.title.Container");
 														%>
 														<div class="ContainerIcon DefaultContainer16x16Icon"><%=hasPermission ? strTitle : _ctx.appRes("UIPortlet.label.protectedContent")%></div>
 														<%if(hasPermission) {%>
-															<a href="<%=uicomponent.event("EditContainer","$uicomponent.id")%>" class="EditContainerIcon" title="<%=_ctx.appRes("UIContainer.tooltip.editContainer")%>"><span></span></a>
-															<a href="<%=uicomponent.event("DeleteComponent","$uicomponent.id")%>" class="DeleteContainerIcon" title="<%=_ctx.appRes("UIContainer.tooltip.closeContainer")%>"><span></span></a>
+															<a href="<%=uicomponent.event("EditContainer","$uicomponent.id")%>" class="EditContainerIcon" title="<%=_ctx.appRes("UITableColumnContainer.tooltip.editContainer")%>"><span></span></a>
+															<a href="<%=uicomponent.event("DeleteComponent","$uicomponent.id")%>" class="DeleteContainerIcon" title="<%=_ctx.appRes("UITableColumnContainer.tooltip.closeContainer")%>"><span></span></a>
 														<%}%>
 													</div>
 												</div>

Modified: portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/page/UIPageSelector2.gtmpl
===================================================================
--- portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/page/UIPageSelector2.gtmpl	2010-11-06 16:11:39 UTC (rev 4964)
+++ portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/page/UIPageSelector2.gtmpl	2010-11-08 03:40:16 UTC (rev 4965)
@@ -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/trunk/web/portal/src/main/webapp/groovy/webui/core/UIPopupWindow.gtmpl
===================================================================
--- portal/trunk/web/portal/src/main/webapp/groovy/webui/core/UIPopupWindow.gtmpl	2010-11-06 16:11:39 UTC (rev 4964)
+++ portal/trunk/web/portal/src/main/webapp/groovy/webui/core/UIPopupWindow.gtmpl	2010-11-08 03:40:16 UTC (rev 4965)
@@ -39,7 +39,7 @@
 				<div class="TopCenterDecorator">
 					<div class="OverflowContainer">
 						<div class="PopupTitleIcon"><span></span></div>
-						<%if( true) {%>
+						<%if (showCloseButton) {%>
 							<!-- <div class="CloseButton" title="Close Window" onclick="<%=uicomponent.event("ClosePopup")%>"><span></span></div> -->
 							<div class="CloseButton" title="<%=_ctx.appRes("UIPopupWindow.Close")%>" onclick="<%=uicomponent.event(uicomponent.getCloseEvent())%>"><span></span></div>
 						<% } else { %>

Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIPageIterator.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIPageIterator.java	2010-11-06 16:11:39 UTC (rev 4964)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIPageIterator.java	2010-11-08 03:40:16 UTC (rev 4965)
@@ -19,15 +19,17 @@
 
 package org.exoplatform.webui.core;
 
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
 import org.exoplatform.commons.utils.EmptySerializablePageList;
 import org.exoplatform.commons.utils.PageList;
-import org.exoplatform.commons.serialization.api.annotations.Serialized;
 import org.exoplatform.webui.config.annotation.ComponentConfig;
 import org.exoplatform.webui.config.annotation.EventConfig;
 import org.exoplatform.webui.event.Event;
 import org.exoplatform.webui.event.EventListener;
 
+import java.util.HashSet;
 import java.util.List;
+import java.util.Set;
 
 /**
  * A component that allows pagination, with an iterator to change pages
@@ -42,6 +44,8 @@
     */
    private PageList pageList_ = EmptySerializablePageList.get();
 
+   private Set<String> selectedItems = new HashSet<String>();
+   
    public UIPageIterator()
    {
    }
@@ -95,6 +99,28 @@
    {
       pageList_.getPage(page);
    }
+   
+   public void setSelectedItem(String key, boolean value)
+   {
+      if (value == false && this.selectedItems.contains(key))
+      {
+         selectedItems.remove(key);
+      }
+      else if (value)
+      {
+         selectedItems.add(key);
+      }
+   }
+   
+   public Set<String> getSelectedItems()
+   {
+      return selectedItems;
+   }
+   
+   public boolean isSelectedItem(String key)
+   {
+      return selectedItems.contains(key);
+   }
 
    @SuppressWarnings("unused")
    static public class ShowPageActionListener extends EventListener<UIPageIterator>

Modified: portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/account/UIUserSelector.java
===================================================================
--- portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/account/UIUserSelector.java	2010-11-06 16:11:39 UTC (rev 4964)
+++ portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/account/UIUserSelector.java	2010-11-08 03:40:16 UTC (rev 4965)
@@ -41,18 +41,20 @@
 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.Event.Phase;
 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.UIFormSelectBox;
 import org.exoplatform.webui.form.UIFormStringInput;
 
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 import java.util.concurrent.CopyOnWriteArrayList;
 
 /**
@@ -119,7 +121,7 @@
       uiIterator_ = new UIPageIterator();
       uiIterator_.setPageList(objPageList);
       uiIterator_.setId("UISelectUserPage");
-
+      
       // create group selector
       UIPopupWindow uiPopup = addChild(UIPopupWindow.class, null, "UIPopupGroupSelector");
       uiPopup.setWindowSize(540, 0);
@@ -138,8 +140,14 @@
          for (Object obj : uiIterator_.getCurrentPageData())
          {
             User user = (User)obj;
-            if (getUIFormCheckBoxInput(user.getUserName()) == null)
-               addUIFormInput(new UIFormCheckBoxInput<Boolean>(user.getUserName(), user.getUserName(), false));
+            UIFormCheckBoxInput<Boolean> uiFormCheckBoxInput = getUIFormCheckBoxInput(user.getUserName());
+            if (uiFormCheckBoxInput == null)
+            {
+               uiFormCheckBoxInput = new UIFormCheckBoxInput<Boolean>(user.getUserName(), user.getUserName(), false);
+               addUIFormInput(uiFormCheckBoxInput);
+            }
+            
+            uiFormCheckBoxInput.setChecked(uiIterator_.isSelectedItem(user.getUserName()));
          }
       }
       return new ArrayList<User>(uiIterator_.getCurrentPageData());
@@ -315,31 +323,32 @@
 
    static public class AddActionListener extends EventListener<UIUserSelector>
    {
-      @SuppressWarnings("unchecked")
       public void execute(Event<UIUserSelector> event) throws Exception
       {
          UIUserSelector uiForm = event.getSource();
          StringBuilder sb = new StringBuilder();
-         int count = 0;
-         for (Object o : uiForm.uiIterator_.getCurrentPageData())
+         
+         uiForm.setSelectedItem();
+         
+         // get item from selected item map
+         Set<String> items = uiForm.uiIterator_.getSelectedItems();
+         if (items.size() == 0)
          {
-            User u = (User)o;
-            UIFormCheckBoxInput input = uiForm.getUIFormCheckBoxInput(u.getUserName());
-            if (input != null && input.isChecked())
-            {
-               count++;
-               if (sb.toString() != null && sb.toString().trim().length() != 0)
-                  sb.append(",");
-               sb.append(u.getUserName());
-            }
-         }
-         if (count == 0)
-         {
             UIApplication uiApp = uiForm.getAncestorOfType(UIApplication.class);
             uiApp.addMessage(new ApplicationMessage("UIUserSelector.msg.user-required", null));
             event.getRequestContext().addUIComponentToUpdateByAjax(uiApp.getUIPopupMessages());
             return;
          }
+         String[] arrItems = items.toArray(new String[items.size()]);
+         Arrays.sort(arrItems);
+         
+         for (String key : arrItems)
+         {
+            if (sb.toString() != null && sb.toString().trim().length() != 0)
+               sb.append(",");
+            sb.append(key);
+         }
+         
          uiForm.setSelectedUsers(sb.toString());
          uiForm.<UIComponent> getParent().broadcast(event, event.getExecutionPhase());
       }
@@ -379,6 +388,19 @@
    {
       getUIStringInput(FIELD_KEYWORD).setValue(value);
    }
+   
+   private void setSelectedItem() throws Exception
+   {
+      for (Object o : this.uiIterator_.getCurrentPageData())
+      {
+         User u = (User) o;
+         UIFormCheckBoxInput input = this.getUIFormCheckBoxInput(u.getUserName());
+         if (input != null)
+         {
+            this.uiIterator_.setSelectedItem(u.getUserName(), input.isChecked());
+         }
+      }
+   }
 
    static public class SelectGroupActionListener extends EventListener<UIGroupSelector>
    {
@@ -457,6 +479,8 @@
       public void execute(Event<UIUserSelector> event) throws Exception
       {
          UIUserSelector uiSelectUserForm = event.getSource();
+         uiSelectUserForm.setSelectedItem();
+         
          int page = Integer.parseInt(event.getRequestContext().getRequestParameter(OBJECTID));
          uiSelectUserForm.updateCurrentPage(page);
          event.getRequestContext().addUIComponentToUpdateByAjax(uiSelectUserForm);

Modified: portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/application/ConfigurationManager.java
===================================================================
--- portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/application/ConfigurationManager.java	2010-11-06 16:11:39 UTC (rev 4964)
+++ portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/application/ConfigurationManager.java	2010-11-08 03:40:16 UTC (rev 4965)
@@ -40,6 +40,7 @@
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 
 /**
  * May 10, 2006
@@ -55,8 +56,16 @@
     * <p/>
     * The components of which we manage the configuration
     */
-   private Map<String, Component> configs_ = new HashMap<String, Component>();
+   //private Map<String, Component> configs_ = new HashMap<String, Component>();
 
+   /**
+    * Minh Hoang TO: First attempt to synchronize the map, we simply replace HashMap with ConcurrentHashMap
+    * and default values for load factor, initial capacity and concurrentcyLevel
+    * 
+    * TODO: Need to examine the performance influence in the future for a better synchronizing 
+    */
+   private Map<String, Component> configs_ = new ConcurrentHashMap<String, Component>();
+   
    /** The logger. */
    private final Logger log;
 

Modified: portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/config/Component.java
===================================================================
--- portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/config/Component.java	2010-11-06 16:11:39 UTC (rev 4964)
+++ portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/config/Component.java	2010-11-08 03:40:16 UTC (rev 4965)
@@ -176,21 +176,33 @@
 
    public Event getUIComponentEventConfig(String eventName) throws Exception
    {
-      if (eventMap != null)
+      if(eventMap == null)
       {
-         return eventMap.get(eventName);
+         synchronized(this)
+         {
+            if(eventMap == null)
+            {
+               eventMap = new HashMap<String, Event>();
+
+               if (events == null)
+               {
+                  return null;
+               }
+
+               for (Event event : events)
+               {
+                  createCachedEventListeners(event);
+                  eventMap.put(event.getName(), event);
+               }
+            }
+            
+            return eventMap.get(eventName);
+         }
       }
-      eventMap = new HashMap<String, Event>();
-      if (events == null)
+      else
       {
-         return null;
+         return eventMap.get(eventName);
       }
-      for (Event event : events)
-      {
-         createCachedEventListeners(event);
-         eventMap.put(event.getName(), event);
-      }
-      return eventMap.get(eventName);
    }
 
    public List<EventListener> getUIComponentEventListeners(String eventName) throws Exception

Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java	2010-11-06 16:11:39 UTC (rev 4964)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java	2010-11-08 03:40:16 UTC (rev 4965)
@@ -450,9 +450,11 @@
    /**
     * Add an extra markup to the head of the html page.
     * @param element The element to add
+    * @param portletWindowId The ID of portlet window contributing markup header
     */
-   public void addExtraMarkupHeader(Element element)
+   public void addExtraMarkupHeader(Element element, String portletWindowId)
    {
+      element.setAttribute("class", "ExHead-" + portletWindowId);
 	  if (this.extraMarkupHeaders == null)
 	  {
 		  this.extraMarkupHeaders = new ArrayList<Element>();

Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletLifecycle.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletLifecycle.java	2010-11-06 16:11:39 UTC (rev 4964)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletLifecycle.java	2010-11-08 03:40:16 UTC (rev 4965)
@@ -256,7 +256,7 @@
                         {
                            for (Element element : markupElements)
                            {
-                              if ("title".equals(element.getNodeName().toLowerCase())
+                              if (!context.useAjax() && "title".equals(element.getNodeName().toLowerCase())
                                     && element.getFirstChild() != null)
                               {
                                  String title = element.getFirstChild().getTextContent();
@@ -264,7 +264,7 @@
                               }
                               else
                               {
-                                 prcontext.addExtraMarkupHeader(element);
+                                 prcontext.addExtraMarkupHeader(element, uicomponent.getId());
                               }
                            }
                         }

Copied: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/container/UIColumnContainer.java (from rev 4964, portal/branches/branch-GTNPORTAL-1592/webui/portal/src/main/java/org/exoplatform/portal/webui/container/UIColumnContainer.java)
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/container/UIColumnContainer.java	                        (rev 0)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/container/UIColumnContainer.java	2010-11-08 03:40:16 UTC (rev 4965)
@@ -0,0 +1,108 @@
+/**
+ * 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.portal.webui.container;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.exoplatform.portal.application.PortalRequestContext;
+import org.exoplatform.portal.webui.container.UIContainerActionListener.EditContainerActionListener;
+import org.exoplatform.portal.webui.portal.UIPortalComponent;
+import org.exoplatform.portal.webui.portal.UIPortalComponentActionListener.DeleteComponentActionListener;
+import org.exoplatform.portal.webui.util.Util;
+import org.exoplatform.portal.webui.workspace.UIPortalApplication;
+import org.exoplatform.portal.webui.workspace.UIWorkingWorkspace;
+import org.exoplatform.webui.config.annotation.ComponentConfig;
+import org.exoplatform.webui.config.annotation.EventConfig;
+import org.exoplatform.webui.core.UIComponent;
+import org.exoplatform.webui.event.Event;
+import org.exoplatform.webui.event.EventListener;
+
+/**
+ * Created by The eXo Platform SAS
+ * Author : Nguyen Duc Khoi
+ *          khoi.nguyen at exoplatform.com
+ * Jul 29, 2010  
+ */
+
+ at ComponentConfig(template = "system:/groovy/portal/webui/container/UIColumnContainer.gtmpl", events =
+{
+      @EventConfig(listeners = UIColumnContainer.InsertColumnActionListener.class),
+      @EventConfig(listeners = DeleteComponentActionListener.class, confirm = "UIColumnContainer.deleteColumnContainer"),
+      @EventConfig(listeners = EditContainerActionListener.class)})
+public class UIColumnContainer extends UIContainer
+{
+   public static final String COLUMN_CONTAINER = "ColumnContainer";
+
+   public static final String INSERT_AFTER = "insertColumnAfter";
+
+   public static final String INSERT_BEFORE = "insertColumnBefore";
+
+   public UIColumnContainer()
+   {
+      super();
+   }
+
+   public static class InsertColumnActionListener extends EventListener<UIColumnContainer>
+   {
+      @Override
+      public void execute(Event<UIColumnContainer> event) throws Exception
+      {
+         String insertPosition = event.getRequestContext().getRequestParameter(UIComponent.OBJECTID);
+         UIColumnContainer uiSelectedColumn = event.getSource();
+         UIPortalComponent uiParent = (UIPortalComponent) uiSelectedColumn.getParent();
+         if (insertPosition.equals(INSERT_AFTER))
+         {
+            UIColumnContainer.insertColumn(uiSelectedColumn, true);
+         }
+         else if (insertPosition.equals(INSERT_BEFORE))
+         {
+            UIColumnContainer.insertColumn(uiSelectedColumn, false);
+         }
+
+         Util.showComponentLayoutMode(uiSelectedColumn.getClass());
+
+         PortalRequestContext pcontext = (PortalRequestContext) event.getRequestContext();
+         UIPortalApplication uiPortalApp = uiParent.getAncestorOfType(UIPortalApplication.class);
+         UIWorkingWorkspace uiWorkingWS = uiPortalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
+         pcontext.addUIComponentToUpdateByAjax(uiWorkingWS);
+         pcontext.setFullRender(true);
+      }
+
+   }
+
+   private static void insertColumn(UIColumnContainer selectedColumn, boolean isInsertAfter) throws Exception
+   {
+      UIContainer uiParent = selectedColumn.getParent();
+      UIColumnContainer uiNewColumn = uiParent.addChild(UIColumnContainer.class, null, null);
+
+      uiNewColumn.setTemplate(selectedColumn.getTemplate());
+      uiNewColumn.setFactoryId(selectedColumn.getFactoryId());
+      uiNewColumn.setId(String.valueOf(uiNewColumn.hashCode()));
+
+      List<UIComponent> listColumn = uiParent.getChildren();
+      int position = listColumn.indexOf(selectedColumn);
+      if (isInsertAfter)
+      {
+         position += 1;
+      }
+      Collections.rotate(listColumn.subList(position, listColumn.size()), 1);
+   }
+
+}
\ No newline at end of file

Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/login/UILoginForm.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/login/UILoginForm.java	2010-11-06 16:11:39 UTC (rev 4964)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/login/UILoginForm.java	2010-11-08 03:40:16 UTC (rev 4965)
@@ -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,58 +34,16 @@
  *          nhudinhthuan at exoplatform.com
  * Jul 11, 2006  
  */
- at ComponentConfig(lifecycle = UIFormLifecycle.class, template = "system:/groovy/portal/webui/UILoginForm.gtmpl", events = {
-   //    @EventConfig(listeners = UILoginForm.SigninActionListener.class),
+ at 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()));
    }
 
-   static public class SigninActionListener extends EventListener<UILoginForm>
-   {
-
-      public void execute(Event<UILoginForm> event) throws Exception
-      {
-         //      UILoginForm uiForm = event.getSource();
-         //      String username = uiForm.getUIStringInput(USER_NAME).getValue();
-         //      String password = uiForm.getUIStringInput(PASSWORD).getValue();      
-         //      OrganizationService orgService = uiForm.getApplicationComponent(OrganizationService.class);      
-         //      boolean authentication = orgService.getUserHandler().authenticate(username, password);
-         //      if(!authentication){
-         //        throw new MessageException(new ApplicationMessage("UILoginForm.msg.Invalid-account", null));
-         //      }        
-         //      PortalRequestContext prContext = Util.getPortalRequestContext();
-         //      HttpServletRequest request = prContext.getRequest();
-         //      HttpSession session = request.getSession();
-         //      session.setAttribute("authentication.username", username);
-         //      session.setAttribute("authentication.password", password);
-         //      UIPortal uiPortal = Util.getUIPortal();
-         //      prContext.setResponseComplete(true);  
-         //      String portalName = uiPortal.getName() ;
-         //      HttpServletRequestWrapper wrapper = new HttpServletRequestWrapper(request) ;
-         //      wrapper.getParameterMap().put("username", username) ;
-         //      wrapper.getParameterMap().put("password", password) ;
-         //      portalName = URLEncoder.encode(portalName, "UTF-8") ;
-         //      String redirect = request.getContextPath() + "/private/" + portalName + "/";
-         //      prContext.getResponse().sendRedirect(redirect);      
-      }
-
-   }
-
-   //TODO: dang.tung - forget password
    static public class ForgetPasswordActionListener extends EventListener<UILoginForm>
    {
       public void execute(Event<UILoginForm> event) throws Exception
@@ -100,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();
+      }
+   }
+   
+   
 }

Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageForm.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageForm.java	2010-11-06 16:11:39 UTC (rev 4964)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageForm.java	2010-11-08 03:40:16 UTC (rev 4965)
@@ -32,6 +32,7 @@
 import org.exoplatform.portal.config.model.PortalConfig;
 import org.exoplatform.portal.webui.application.UIPortlet;
 import org.exoplatform.portal.webui.container.UIContainer;
+import org.exoplatform.portal.webui.portal.UIPortal;
 import org.exoplatform.portal.webui.portal.UIPortalComponent;
 import org.exoplatform.portal.webui.portal.UIPortalComposer;
 import org.exoplatform.portal.webui.util.PortalDataMapper;
@@ -90,6 +91,8 @@
    protected UIFormInputSet uiPermissionSetting;
 
    protected UIFormSelectBox groupIdSelectBox = null;
+   
+   protected UIFormSelectBox portalIdSelectBox = null;
 
    protected UIFormStringInput ownerIdInput = null;
 
@@ -106,14 +109,6 @@
       List<SelectItemOption<String>> ownerTypes = new ArrayList<SelectItemOption<String>>();
       ownerTypes.add(new SelectItemOption<String>(PortalConfig.USER_TYPE));
 
-      UserPortalConfig userPortalConfig =
-         configService.getUserPortalConfig(pcontext.getPortalOwner(), pcontext.getRemoteUser());
-      ExoContainer container = ExoContainerContext.getCurrentContainer();
-      UserACL acl = (UserACL)container.getComponentInstanceOfType(UserACL.class);
-      if (acl.hasEditPermission(userPortalConfig.getPortalConfig()))
-      {
-         ownerTypes.add(new SelectItemOption<String>(PortalConfig.PORTAL_TYPE));
-      }
       ownerIdInput = new UIFormStringInput(OWNER_ID, OWNER_ID, null);
       ownerIdInput.setEditable(false).setValue(pcontext.getRemoteUser());
 
@@ -153,6 +148,27 @@
       //TODO: This following line is fixed for bug PORTAL-2127
       uiListPermissionSelector.getChild(UIFormPopupWindow.class).setId("UIPageFormPopupGroupMembershipSelector");
 
+      List<String> portals = configService.getAllPortalNames();
+      Collections.sort(portals);
+      List<SelectItemOption<String>> portalsItem = new ArrayList<SelectItemOption<String>>();
+      ExoContainer container = ExoContainerContext.getCurrentContainer();
+      UserACL acl = (UserACL)container.getComponentInstanceOfType(UserACL.class);
+      for (String p : portals)
+      {
+         UserPortalConfig userPortalConfig = configService.getUserPortalConfig(p, pcontext.getRemoteUser());
+         if (acl.hasEditPermission(userPortalConfig.getPortalConfig()))
+         {
+            portalsItem.add(new SelectItemOption<String>(p));
+         }
+      }
+      if(portalsItem.size() > 0)
+      {
+         ownerTypes.add(new SelectItemOption<String>(PortalConfig.PORTAL_TYPE));
+         portalIdSelectBox = new UIFormSelectBox(OWNER_ID, OWNER_ID, portalsItem);
+         portalIdSelectBox.setOnChange("ChangeOwnerId");
+         portalIdSelectBox.setParent(uiSettingSet);
+      }
+      
       List<String> groups = configService.getMakableNavigations(pcontext.getRemoteUser(), true);
       if (groups.size() > 0)
       {
@@ -167,6 +183,7 @@
          groupIdSelectBox.setOnChange("ChangeOwnerId");
          groupIdSelectBox.setParent(uiSettingSet);
       }
+
       setActions(new String[]{"Save", "Close"});
    }
 
@@ -208,11 +225,6 @@
       uiTemplate.setValue(uiPage.getFactoryId());
    }
 
-   public void setEditPermission(String per)
-   {
-
-   }
-
    public void invokeSetBindingBean(Object bean) throws Exception
    {
       String ownerType = getUIFormSelectBox("ownerType").getValue();
@@ -306,15 +318,9 @@
             page.setChildren(applications);
 
             PortalDataMapper.toUIPage(uiPage, page);
-            //        if(page.getTemplate() == null) page.setTemplate(uiPage.getTemplate()) ;
             if (page.getChildren() == null)
                page.setChildren(new ArrayList<ModelObject>());
 
-            //        uiEditBar.setUIPage(uiPage);
-            //        Class<?> [] childrenToRender = {UIPageEditBar.class,
-            //            UIPageNodeSelector.class, UIPageNavigationControlBar.class};      
-            //        uiManagement.setRenderedChildrenOfTypes(childrenToRender);
-
             pcontext.setFullRender(true);
             UIWorkingWorkspace uiWorkingWS = uiPortalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
             pcontext.addUIComponentToUpdateByAjax(uiWorkingWS);
@@ -328,7 +334,6 @@
             page.setChildren(applications);
 
             PortalDataMapper.toUIPage(uiPage, page);
-            //        if(page.getTemplate() == null) page.setTemplate(uiPage.getTemplate()) ;
             if (page.getChildren() == null)
                page.setChildren(new ArrayList<ModelObject>());
 
@@ -372,7 +377,6 @@
          }
          
          uiPage.setStorageId(storageId);
-         //      if(page.getTemplate() == null) page.setTemplate(uiPage.getTemplate()) ;
          if (page.getChildren() == null)
             page.setChildren(new ArrayList<ModelObject>());
       }
@@ -418,12 +422,28 @@
             if (PortalConfig.PORTAL_TYPE.equals(ownerType))
             {
                list.remove(2);
-               list.add(2, uiForm.ownerIdInput);
-               uiForm.ownerIdInput.setValue(prContext.getPortalOwner());
-               uiForm.findFirstComponentOfType(UIListPermissionSelector.class).setValue(
-                  Util.getUIPortal().getAccessPermissions());
-               uiForm.findFirstComponentOfType(UIPermissionSelector.class).setValue(
-                  Util.getUIPortal().getEditPermission());
+               list.add(2, uiForm.portalIdSelectBox);
+               String portalIdSelected = uiForm.portalIdSelectBox.getValue();
+               String[] accessPermissions = {};
+               String editPermission = "";
+               
+               UserPortalConfigService service = uiForm.getApplicationComponent(UserPortalConfigService.class);
+               UserPortalConfig userConfig = service.getUserPortalConfig(portalIdSelected, prContext.getRemoteUser());
+               if (userConfig != null)
+               {
+                  PortalConfig config = userConfig.getPortalConfig();
+                  accessPermissions = config.getAccessPermissions();
+                  editPermission = config.getEditPermission();
+               }
+               else
+               {
+                  UIPortal uiPortal = Util.getUIPortalApplication().getCachedUIPortal(ownerType, portalIdSelected);
+                  accessPermissions = uiPortal.getAccessPermissions();
+                  editPermission = uiPortal.getEditPermission();
+               }
+               
+               uiForm.findFirstComponentOfType(UIListPermissionSelector.class).setValue(accessPermissions);
+               uiForm.findFirstComponentOfType(UIPermissionSelector.class).setValue(editPermission);
             }
             else
             {
@@ -447,13 +467,33 @@
       public void execute(Event<UIPageForm> event) throws Exception
       {
          UIPageForm uiForm = event.getSource();
-         String groupIdSelected = uiForm.groupIdSelectBox.getValue();
-         groupIdSelected = groupIdSelected.startsWith("/") ? groupIdSelected : "/" + groupIdSelected;
-         String permission = "*:" + groupIdSelected;
-         uiForm.findFirstComponentOfType(UIListPermissionSelector.class).setValue(new String[]{permission});
-         UserACL userACL = uiForm.getApplicationComponent(UserACL.class);         
-         permission = userACL.getMakableMT() + ":" + groupIdSelected;
-         uiForm.findFirstComponentOfType(UIPermissionSelector.class).setValue(permission);
+         UIFormSelectBox uiSelectBox = uiForm.getUIFormSelectBox(OWNER_TYPE);
+         String ownerType = uiSelectBox.getValue();
+         if(PortalConfig.PORTAL_TYPE.equals(ownerType)) {
+            String[] accessPermissions = {};
+            String editPermission = "";
+            String portalIdSelected = uiForm.portalIdSelectBox.getValue();
+            UserPortalConfigService service = uiForm.getApplicationComponent(UserPortalConfigService.class);
+            UserPortalConfig userConfig = service.getUserPortalConfig(portalIdSelected, Util.getPortalRequestContext().getRemoteUser());
+            if (userConfig != null)
+            {
+               PortalConfig config = userConfig.getPortalConfig();
+               accessPermissions = config.getAccessPermissions();
+               editPermission = config.getEditPermission();
+               uiForm.findFirstComponentOfType(UIListPermissionSelector.class).setValue(accessPermissions);
+               uiForm.findFirstComponentOfType(UIPermissionSelector.class).setValue(editPermission);
+            }
+         }
+         else
+         {
+            String groupIdSelected = uiForm.groupIdSelectBox.getValue();
+            groupIdSelected = groupIdSelected.startsWith("/") ? groupIdSelected : "/" + groupIdSelected;
+            String permission = "*:" + groupIdSelected;
+            uiForm.findFirstComponentOfType(UIListPermissionSelector.class).setValue(new String[]{permission});
+            UserACL userACL = uiForm.getApplicationComponent(UserACL.class);         
+            permission = userACL.getMakableMT() + ":" + groupIdSelected;
+            uiForm.findFirstComponentOfType(UIPermissionSelector.class).setValue(permission);
+         }
          event.getRequestContext().addUIComponentToUpdateByAjax(uiForm.getParent());
       }
    }
@@ -463,13 +503,6 @@
       public void execute(Event<UIGroupMembershipSelector> event) throws Exception
       {
          UIPageForm uiForm = event.getSource().getAncestorOfType(UIPageForm.class);
-         /*if (!uiForm.getUIStringInput(OWNER_TYPE).getValue().equals(PortalConfig.GROUP_TYPE))
-            return;
-         String editPer = uiForm.findFirstComponentOfType(UIPermissionSelector.class).getValue();
-         if (editPer == null || editPer.length() < 1)
-            return;
-         String group = editPer.substring(editPer.indexOf("/") + 1);
-         uiForm.ownerIdInput.setValue(group);*/
          event.getRequestContext().addUIComponentToUpdateByAjax(uiForm.getParent());
       }
    }

Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageSelector2.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageSelector2.java	2010-11-06 16:11:39 UTC (rev 4964)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageSelector2.java	2010-11-08 03:40:16 UTC (rev 4965)
@@ -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);

Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/util/PortalDataMapper.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/util/PortalDataMapper.java	2010-11-06 16:11:39 UTC (rev 4964)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/util/PortalDataMapper.java	2010-11-08 03:40:16 UTC (rev 4965)
@@ -33,6 +33,7 @@
 import org.exoplatform.portal.webui.application.PortletState;
 import org.exoplatform.portal.webui.application.UIGadget;
 import org.exoplatform.portal.webui.application.UIPortlet;
+import org.exoplatform.portal.webui.container.UIColumnContainer;
 import org.exoplatform.portal.webui.container.UIContainer;
 import org.exoplatform.portal.webui.container.UITabContainer;
 import org.exoplatform.portal.webui.page.UIPage;
@@ -412,6 +413,10 @@
          {
             uiTempContainer = uiContainer.createUIComponent(context, UITabContainer.class, null, null);
          }
+         else if (UIColumnContainer.COLUMN_CONTAINER.equals(container.getFactoryId()))
+         {
+            uiTempContainer = uiContainer.createUIComponent(context, UIColumnContainer.class, null, null);
+         }
          else
          {
             uiTempContainer = uiContainer.createUIComponent(context, UIContainer.class, null, null);

Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIPortalApplication.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIPortalApplication.java	2010-11-06 16:11:39 UTC (rev 4964)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIPortalApplication.java	2010-11-08 03:40:16 UTC (rev 4965)
@@ -596,7 +596,13 @@
                w.write("</div>");
             }
          }
-
+         w.write("<div class=\"MarkupHeadElements\">");
+         List<String> headElems = ((PortalRequestContext)context).getExtraMarkupHeadersAsStrings();
+         for (String elem : headElems) 
+         {
+            w.write(elem);
+         }
+         w.write("</div>");
          w.write("<div class=\"PortalResponseScript\">");
          pcontext.getJavascriptManager().writeJavascript(w);
          w.write("eXo.core.Browser.onLoad();\n");



More information about the gatein-commits mailing list