[kune-commits] r822 - in trunk: . script src/main/java/org/ourproject/kune/app/client src/main/java/org/ourproject/kune/app/public/css src/main/java/org/ourproject/kune/chat/client src/main/java/org/ourproject/kune/docs/client src/main/java/org/ourproject/kune/platf/client/app src/main/java/org/ourproject/kune/platf/client/app/ui src/main/java/org/ourproject/kune/platf/client/rpc src/main/java/org/ourproject/kune/platf/client/services src/main/java/org/ourproject/kune/platf/client/state src/main/java/org/ourproject/kune/platf/client/ui src/main/java/org/ourproject/kune/platf/client/ui/gridmenu src/main/java/org/ourproject/kune/rack src/main/java/org/ourproject/kune/workspace/client src/main/java/org/ourproject/kune/workspace/client/actions/i18n src/main/java/org/ourproject/kune/workspace/client/i18n src/main/java/org/ourproject/kune/workspace/client/sitebar/bar src/main/java/org/ourproject/kune/workspace/client/socialnet/ui src/main/java/org/ourproject/kune/workspace/client/ui/newtmp src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitenewgroup src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitepublic src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitesign src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/siteusermenu src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/skel src/main/java/org/ourproject/kune/workspace/client/workspace src/main/java/org/ourproject/kune/workspace/client/workspace/ui src/main/resources src/test/java/org/ourproject/kune/platf/server/mapper

vjrj vjrj at ourproject.org
Thu Jul 31 15:28:50 CEST 2008


Author: vjrj
Date: 2008-07-31 15:28:16 +0200 (Thu, 31 Jul 2008)
New Revision: 822

Added:
   trunk/src/main/java/org/ourproject/kune/platf/client/ui/QuickTipsHelper.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/I18nTranslator.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/siteusermenu/
   trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/siteusermenu/SiteUserMenu.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/siteusermenu/SiteUserMenuPanel.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/siteusermenu/SiteUserMenuPresenter.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/siteusermenu/SiteUserMenuView.java
Removed:
   trunk/src/main/java/org/ourproject/kune/platf/client/app/ApplicationBuilder.java
   trunk/src/main/java/org/ourproject/kune/platf/client/app/DesktopView.java
   trunk/src/main/java/org/ourproject/kune/platf/client/app/ui/DesktopPanel.java
   trunk/src/main/java/org/ourproject/kune/platf/client/ui/QuickTipHelper.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/actions/i18n/DoTranslationAction.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/actions/i18n/GetLexiconAction.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/actions/i18n/GetTranslationAction.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/I18nTranslatorComponent.java
Modified:
   trunk/pom.xml
   trunk/script/css-compact-and-tidy.css
   trunk/src/main/java/org/ourproject/kune/app/client/KuneEntryPoint.java
   trunk/src/main/java/org/ourproject/kune/app/public/css/all.css
   trunk/src/main/java/org/ourproject/kune/app/public/css/kune-new.css
   trunk/src/main/java/org/ourproject/kune/app/public/css/workspace.css
   trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientNewModule.java
   trunk/src/main/java/org/ourproject/kune/chat/client/ChatEngineXmpp.java
   trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientNewModule.java
   trunk/src/main/java/org/ourproject/kune/platf/client/app/Application.java
   trunk/src/main/java/org/ourproject/kune/platf/client/app/ApplicationDefault.java
   trunk/src/main/java/org/ourproject/kune/platf/client/rpc/GroupService.java
   trunk/src/main/java/org/ourproject/kune/platf/client/rpc/I18nService.java
   trunk/src/main/java/org/ourproject/kune/platf/client/services/Kune.java
   trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneModule.java
   trunk/src/main/java/org/ourproject/kune/platf/client/state/SessionImpl.java
   trunk/src/main/java/org/ourproject/kune/platf/client/ui/DefaultBorderLayout.java
   trunk/src/main/java/org/ourproject/kune/platf/client/ui/gridmenu/GridMenuPanel.java
   trunk/src/main/java/org/ourproject/kune/rack/RackServletFilter.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceClientModule.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceEvents.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceFactory.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/actions/i18n/ShowTranslatorAction.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/I18nTranslatorPresenter.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/I18nUITranslationService.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/bar/SiteBarPresenter.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ui/ParticipationSummaryPanel.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/WorkspaceManager.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitenewgroup/SiteNewGroupLinkPanel.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitepublic/SitePublicSpaceLinkPanel.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitesign/SiteSignInLinkPanel.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitesign/SiteSignInLinkPresenter.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitesign/SiteSignInLinkView.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitesign/SiteSignOutLinkPanel.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitesign/SiteSignOutLinkPresenter.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/skel/EntityWorkspace.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/skel/SiteBar.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/skel/TitleBar.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/skel/Toolbar.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/skel/WorkspaceSkeleton.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/Workspace.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/WorkspacePresenter.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/WorkspaceUIComponents.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/WorkspacePanel.java
   trunk/src/main/resources/dozerBeanMapping.xml
   trunk/src/test/java/org/ourproject/kune/platf/server/mapper/MapperTest.java
Log:
Workspace refactorization

Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/pom.xml	2008-07-31 13:28:16 UTC (rev 822)
@@ -271,12 +271,12 @@
      <dependency>
       <groupId>com.calclab.emite</groupId>
       <artifactId>emite</artifactId>
-      <version>0.3.0</version>
+      <version>0.3.2</version>
     </dependency>
     <dependency>
       <groupId>com.calclab</groupId>
       <artifactId>suco</artifactId>
-      <version>0.3.0</version>
+      <version>0.3.2</version>
     </dependency>
   </dependencies>
   <!-- http://gwt-maven.googlecode.com/svn/docs/maven-googlewebtoolkit2-plugin/index.html -->

Modified: trunk/script/css-compact-and-tidy.css
===================================================================
--- trunk/script/css-compact-and-tidy.css	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/script/css-compact-and-tidy.css	2008-07-31 13:28:16 UTC (rev 822)
@@ -27,7 +27,7 @@
     --silent=true \
     $CSSTMPFILE
 else
-  echo Waring: Dependency csstidy, in debian: apt-get install csstidy
+  echo Warning: Dependency csstidy, in debian: apt-get install csstidy
   cp $CATTMPFILE $CSSTMPFILE
 fi
 cat $CSSTMPFILE | sed 's/\.\.\/images/\.\.\/js\/ext\/resources\/images/g' > $1

Modified: trunk/src/main/java/org/ourproject/kune/app/client/KuneEntryPoint.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/app/client/KuneEntryPoint.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/app/client/KuneEntryPoint.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -19,20 +19,12 @@
  */
 package org.ourproject.kune.app.client;
 
-import java.util.HashMap;
+import org.ourproject.kune.platf.client.services.Kune;
 
-import org.ourproject.kune.platf.client.app.ApplicationBuilder;
-import org.ourproject.kune.platf.client.dto.I18nLanguageDTO;
-import org.ourproject.kune.platf.client.rpc.I18nService;
-import org.ourproject.kune.platf.client.rpc.I18nServiceAsync;
-import org.ourproject.kune.platf.client.ui.Location;
-import org.ourproject.kune.platf.client.ui.WindowUtils;
-
 import com.allen_sauer.gwt.log.client.Log;
 import com.google.gwt.core.client.EntryPoint;
 import com.google.gwt.user.client.Command;
 import com.google.gwt.user.client.DeferredCommand;
-import com.google.gwt.user.client.rpc.AsyncCallback;
 
 public class KuneEntryPoint implements EntryPoint {
 
@@ -40,38 +32,20 @@
     }
 
     public void onModuleLoad() {
-        Log.setUncaughtExceptionHandler();
+	Log.setUncaughtExceptionHandler();
 
-        // At the moment, in runtime:
-        Log.setCurrentLogLevel(Log.LOG_LEVEL_DEBUG);
+	// At the moment, in runtime:
+	Log.setCurrentLogLevel(Log.LOG_LEVEL_DEBUG);
 
-        DeferredCommand.addCommand(new Command() {
-            public void execute() {
-                onModuleLoadCont();
-            }
-        });
+	DeferredCommand.addCommand(new Command() {
+	    public void execute() {
+		onModuleLoadCont();
+	    }
+	});
     }
 
     public void onModuleLoadCont() {
-        Location loc = WindowUtils.getLocation();
-        String locale = loc.getParameter("locale");
-        final I18nServiceAsync server = I18nService.App.getInstance();
-        server.getInitialLanguage(locale, new AsyncCallback<I18nLanguageDTO>() {
-            public void onFailure(final Throwable caught) {
-                Log.debug("Workspace adaptation to your language failed");
-            }
-
-            public void onSuccess(final I18nLanguageDTO initialLang) {
-                server.getLexicon(initialLang.getCode(), new AsyncCallback<HashMap<String, String>>() {
-                    public void onFailure(final Throwable caught) {
-                        Log.debug("Workspace adaptation to your language failed");
-                    }
-
-                    public void onSuccess(final HashMap<String, String> lexicon) {
-                        new ApplicationBuilder().build(initialLang, lexicon);
-                    }
-                });
-            }
-        });
+	Kune.create();
+	// RootPanel.getBodyElement().setClassName("kunebody");
     }
 }

Modified: trunk/src/main/java/org/ourproject/kune/app/public/css/all.css
===================================================================
--- trunk/src/main/java/org/ourproject/kune/app/public/css/all.css	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/app/public/css/all.css	2008-07-31 13:28:16 UTC (rev 822)
@@ -1973,14 +1973,6 @@
   width: 10px;
 }
 
-.kune-SiteBarPanel-LabelLink {
-  white-space: nowrap;
-  color: #B3B3B3;
-  margin-left: 3px;
-  cursor: pointer;
-  text-decoration: underline;
-}
-
 .kune-SiteMessagePanel {
   color: #250;
   position: absolute;
@@ -2894,6 +2886,13 @@
     color: #B3B3B3;
 }
 
+.k-sitebar-labellink {
+  white-space: nowrap;
+  color: #B3B3B3;
+  cursor: pointer;
+  text-decoration: underline;
+}
+
 .k-sitebar {
     margin-right: 10px;
     height: 16px;
@@ -2920,7 +2919,6 @@
 .k-sitebar-LabelLink {
     white-space: nowrap;
     color: #B3B3B3;
-    margin-left: 3px;
     cursor: pointer;
     text-decoration: underline;
 }
@@ -3253,6 +3251,7 @@
 
 .k-toolbar-sep {
     padding-top: 4px;
+	padding-left: 5px;
 }
 /* Custom gwt-ext styles */
 .ytb-sep {

Modified: trunk/src/main/java/org/ourproject/kune/app/public/css/kune-new.css
===================================================================
--- trunk/src/main/java/org/ourproject/kune/app/public/css/kune-new.css	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/app/public/css/kune-new.css	2008-07-31 13:28:16 UTC (rev 822)
@@ -20,6 +20,13 @@
     color: #B3B3B3;
 }
 
+.k-sitebar-labellink {
+  white-space: nowrap;
+  color: #B3B3B3;
+  cursor: pointer;
+  text-decoration: underline;
+}
+
 .k-sitebar {
     margin-right: 10px;
     height: 16px;
@@ -46,7 +53,6 @@
 .k-sitebar-LabelLink {
     white-space: nowrap;
     color: #B3B3B3;
-    margin-left: 3px;
     cursor: pointer;
     text-decoration: underline;
 }
@@ -379,6 +385,7 @@
 
 .k-toolbar-sep {
     padding-top: 4px;
+	padding-left: 5px;
 }
 /* Custom gwt-ext styles */
 .ytb-sep {

Modified: trunk/src/main/java/org/ourproject/kune/app/public/css/workspace.css
===================================================================
--- trunk/src/main/java/org/ourproject/kune/app/public/css/workspace.css	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/app/public/css/workspace.css	2008-07-31 13:28:16 UTC (rev 822)
@@ -65,14 +65,6 @@
   width: 10px;
 }
 
-.kune-SiteBarPanel-LabelLink {
-  white-space: nowrap;
-  color: #B3B3B3;
-  margin-left: 3px;
-  cursor: pointer;
-  text-decoration: underline;
-}
-
 .kune-SiteMessagePanel {
   color: #250;
   position: absolute;

Modified: trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientNewModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientNewModule.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientNewModule.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -9,34 +9,27 @@
 import org.ourproject.kune.workspace.client.workspace.GroupMembersSummary;
 
 import com.calclab.emiteuimodule.client.EmiteUIDialog;
-import com.calclab.suco.client.container.Container;
-import com.calclab.suco.client.container.Provider;
-import com.calclab.suco.client.modules.Module;
-import com.calclab.suco.client.modules.ModuleBuilder;
+import com.calclab.suco.client.modules.AbstractModule;
+import com.calclab.suco.client.provider.Factory;
 import com.calclab.suco.client.scopes.SingletonScope;
 
-public class ChatClientNewModule implements Module {
-    public static ChatClientTool getChatClientTool(final Container components) {
-	return components.getInstance(ChatClientTool.class);
-    }
+public class ChatClientNewModule extends AbstractModule {
 
-    public Class<? extends Module> getType() {
-	return ChatClientNewModule.class;
+    public ChatClientNewModule() {
+	super(ChatClientNewModule.class);
     }
 
-    public void onLoad(final ModuleBuilder builder) {
-	builder.registerProvider(ChatClientTool.class, new Provider<ChatClientTool>() {
-	    public ChatClientTool get() {
-		return new ChatClientTool(builder.getInstance(Session.class), builder.getInstance(Application.class),
-			builder.getInstance(I18nUITranslationService.class), builder.getInstance(EmiteUIDialog.class),
-			builder.getInstance(WorkspaceSkeleton.class), builder.getProvider(GroupMembersSummary.class));
+    @Override
+    public void onLoad() {
+	register(SingletonScope.class, new Factory<ChatClientTool>(ChatClientTool.class) {
+	    public ChatClientTool create() {
+		return new ChatClientTool($(Session.class), $(Application.class), $(I18nUITranslationService.class),
+			$(EmiteUIDialog.class), $(WorkspaceSkeleton.class), $p(GroupMembersSummary.class));
 	    }
-	}, SingletonScope.class);
+	});
 
-	final ChatClientTool chatClientTool = getChatClientTool(builder);
-	builder.getInstance(KunePlatform.class).addTool(chatClientTool);
-	builder.getInstance(KunePlatform.class).install(
-		new ChatClientModule(builder.getInstance(Session.class), builder.getInstance(StateManager.class),
-			chatClientTool));
+	final ChatClientTool chatClientTool = $(ChatClientTool.class);
+	$(KunePlatform.class).addTool(chatClientTool);
+	$(KunePlatform.class).install(new ChatClientModule($(Session.class), $(StateManager.class), chatClientTool));
     }
 }

Modified: trunk/src/main/java/org/ourproject/kune/chat/client/ChatEngineXmpp.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/chat/client/ChatEngineXmpp.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/chat/client/ChatEngineXmpp.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -72,7 +72,8 @@
 	};
 	final String initialWindowTitle = Window.getTitle();
 	chatOptions.userOptions = userChatOptions;
-	emiteDialog.start(userChatOptions, chatOptions.httpBase, chatOptions.roomHost, avatarProvider, i18n.t("Chat"));
+	emiteDialog.start(userChatOptions, chatOptions.httpBase, chatOptions.roomHost, initialWindowTitle,
+		avatarProvider, i18n.t("Chat"));
 	emiteDialog.show(OwnStatus.online);
 	if (traybarButton == null) {
 	    traybarButton = new ToolbarButton();

Modified: trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientNewModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientNewModule.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientNewModule.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -10,45 +10,40 @@
 import org.ourproject.kune.workspace.client.ui.newtmp.skel.WorkspaceSkeleton;
 import org.ourproject.kune.workspace.client.workspace.TagsSummary;
 
-import com.calclab.suco.client.container.Container;
-import com.calclab.suco.client.container.Provider;
-import com.calclab.suco.client.modules.Module;
-import com.calclab.suco.client.modules.ModuleBuilder;
+import com.calclab.suco.client.modules.AbstractModule;
+import com.calclab.suco.client.provider.Factory;
 import com.calclab.suco.client.scopes.SingletonScope;
 
-public class DocumentClientNewModule implements Module {
-    public static DocumentClientTool getDocumentClientTool(final Container components) {
-	return components.getInstance(DocumentClientTool.class);
-    }
+public class DocumentClientNewModule extends AbstractModule {
 
-    public Class<? extends Module> getType() {
-	return DocumentClientNewModule.class;
+    public DocumentClientNewModule() {
+	super(DocumentClientNewModule.class);
     }
 
-    public void onLoad(final ModuleBuilder builder) {
-	builder.registerProvider(DocumentFactory.class, new Provider<DocumentFactory>() {
-	    public DocumentFactory get() {
-		return new DocumentFactory(builder.getInstance(I18nUITranslationService.class), builder
-			.getInstance(Session.class), builder.getProvider(TagsSummary.class), builder
-			.getInstance(WorkspaceSkeleton.class), builder.getInstance(RateIt.class));
+    @Override
+    public void onLoad() {
+	register(SingletonScope.class, new Factory<DocumentFactory>(DocumentFactory.class) {
+	    public DocumentFactory create() {
+		return new DocumentFactory($(I18nUITranslationService.class), $(Session.class), $p(TagsSummary.class),
+			$(WorkspaceSkeleton.class), $(RateIt.class));
 	    }
-	}, SingletonScope.class);
+	});
 
-	builder.registerProvider(DocumentClientTool.class, new Provider<DocumentClientTool>() {
-	    public DocumentClientTool get() {
-		final DocumentFactory factory = builder.getInstance(DocumentFactory.class);
-		return new DocumentClientTool(factory, builder.getInstance(I18nUITranslationService.class));
+	register(SingletonScope.class, new Factory<DocumentClientTool>(DocumentClientTool.class) {
+	    public DocumentClientTool create() {
+		final DocumentFactory factory = $(DocumentFactory.class);
+		return new DocumentClientTool(factory, $(I18nUITranslationService.class));
 	    }
-	}, SingletonScope.class);
+	});
 
-	final KunePlatform platform = builder.getInstance(KunePlatform.class);
-	final DocumentClientTool docClientTool = getDocumentClientTool(builder);
+	final KunePlatform platform = $(KunePlatform.class);
+	final DocumentClientTool docClientTool = $(DocumentClientTool.class);
 	platform.addTool(docClientTool);
 
-	final Session session = builder.getInstance(Session.class);
-	final StateManager stateManager = builder.getInstance(StateManager.class);
-	final Application application = builder.getInstance(Application.class);
-	final I18nUITranslationService i18n = builder.getInstance(I18nUITranslationService.class);
+	final Session session = $(Session.class);
+	final StateManager stateManager = $(StateManager.class);
+	final Application application = $(Application.class);
+	final I18nUITranslationService i18n = $(I18nUITranslationService.class);
 	platform.install(new DocsClientModule(session, stateManager, application.getWorkspace(), i18n));
     }
 

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/app/Application.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/app/Application.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/app/Application.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -20,9 +20,10 @@
 
 package org.ourproject.kune.platf.client.app;
 
+import java.util.ArrayList;
 import java.util.HashMap;
 
-import org.ourproject.kune.platf.client.dispatch.DefaultDispatcher;
+import org.ourproject.kune.platf.client.dispatch.ActionEvent;
 import org.ourproject.kune.platf.client.state.StateManager;
 import org.ourproject.kune.platf.client.tool.ClientTool;
 import org.ourproject.kune.workspace.client.workspace.Workspace;
@@ -35,7 +36,7 @@
 
     Workspace getWorkspace();
 
-    void init(DefaultDispatcher dispatcher, StateManager stateManager, HashMap<String, ClientTool> tools);
+    void init(StateManager stateManager, HashMap<String, ClientTool> tools);
 
     void onApplicationStart(Slot<Object> slot);
 
@@ -47,4 +48,6 @@
 
     void stop();
 
+    void subscribeActions(ArrayList<ActionEvent<?>> actions);
+
 }

Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/app/ApplicationBuilder.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/app/ApplicationBuilder.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/app/ApplicationBuilder.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -1,101 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2008 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-package org.ourproject.kune.platf.client.app;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-
-import org.ourproject.kune.chat.client.ChatClientNewModule;
-import org.ourproject.kune.docs.client.DocumentClientNewModule;
-import org.ourproject.kune.platf.client.KunePlatform;
-import org.ourproject.kune.platf.client.PlatformClientModule;
-import org.ourproject.kune.platf.client.dispatch.ActionEvent;
-import org.ourproject.kune.platf.client.dispatch.DefaultDispatcher;
-import org.ourproject.kune.platf.client.dto.I18nLanguageDTO;
-import org.ourproject.kune.platf.client.services.Kune;
-import org.ourproject.kune.platf.client.services.KuneModule;
-import org.ourproject.kune.platf.client.state.Session;
-import org.ourproject.kune.platf.client.state.StateManager;
-import org.ourproject.kune.workspace.client.WorkspaceClientModule;
-import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
-import org.ourproject.kune.workspace.client.sitebar.Site;
-import org.ourproject.kune.workspace.client.ui.newtmp.skel.WorkspaceSkeleton;
-
-import com.calclab.emiteuimodule.client.EmiteUIModule;
-import com.google.gwt.user.client.Window;
-import com.google.gwt.user.client.WindowCloseListener;
-import com.google.gwt.user.client.ui.Label;
-
-public class ApplicationBuilder {
-
-    public ApplicationBuilder() {
-    }
-
-    public void build(final I18nLanguageDTO initialLang, final HashMap<String, String> lexicon) {
-	final Kune kune = Kune.create(new KuneModule(initialLang, lexicon), new EmiteUIModule(),
-		new DocumentClientNewModule(), new ChatClientNewModule());
-
-	final Session session = kune.getSession();
-
-	Site.showProgressStarting();
-
-	final KunePlatform platform = kune.getPlatform();
-	final StateManager stateManager = kune.getStateManager();
-	final Application application = kune.getInstance(Application.class);
-	final I18nUITranslationService i18n = kune.getI18N();
-
-	// Temporary new ws
-	final WorkspaceSkeleton ws = kune.getInstance(WorkspaceSkeleton.class);
-	ws.show();
-	ws.getEntityWorkspace().getContentTopBar().add(new Label("Sorry, kune workspace under heavy refactorization"));
-
-	// Testing providers:
-	platform.install(new PlatformClientModule(session, kune.getProvider(StateManager.class)));
-	platform.install(new WorkspaceClientModule(session, stateManager, application.getWorkspace(), i18n));
-
-	final DefaultDispatcher dispatcher = DefaultDispatcher.getInstance();
-
-	application.init(dispatcher, stateManager, platform.getIndexedTools());
-	subscribeActions(dispatcher, platform.getActions());
-
-	Window.addWindowCloseListener(new WindowCloseListener() {
-	    public void onWindowClosed() {
-		application.stop();
-	    }
-
-	    public String onWindowClosing() {
-		return null;
-	    }
-	});
-	application.start();
-    }
-
-    private void subscribeActions(final DefaultDispatcher dispatcher, final ArrayList<ActionEvent<?>> actions) {
-	ActionEvent<?> actionEvent;
-
-	for (final Iterator<ActionEvent<?>> it = actions.iterator(); it.hasNext();) {
-	    actionEvent = it.next();
-	    dispatcher.subscribe(actionEvent.event, actionEvent.action);
-	}
-    }
-
-}

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/app/ApplicationDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/app/ApplicationDefault.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/app/ApplicationDefault.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -20,10 +20,12 @@
 
 package org.ourproject.kune.platf.client.app;
 
+import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
 
+import org.ourproject.kune.platf.client.dispatch.ActionEvent;
 import org.ourproject.kune.platf.client.dispatch.DefaultDispatcher;
 import org.ourproject.kune.platf.client.dto.InitDataDTO;
 import org.ourproject.kune.platf.client.extend.ExtensibleWidgetsManager;
@@ -45,6 +47,8 @@
 import com.calclab.suco.client.signal.Signal;
 import com.calclab.suco.client.signal.Slot;
 import com.google.gwt.user.client.Timer;
+import com.google.gwt.user.client.Window;
+import com.google.gwt.user.client.WindowCloseListener;
 import com.google.gwt.user.client.rpc.AsyncCallback;
 
 public class ApplicationDefault implements Application {
@@ -53,17 +57,24 @@
     private final Session session;
     private final Signal<Object> onApplicationStart;
     private final Signal<Object> onApplicationStop;
-    private final WorkspaceSkeleton ws;
     private StateManager stateManager;
 
     public ApplicationDefault(final Session session, final ExtensibleWidgetsManager extensionPointManager,
 	    final I18nTranslationService i18n, final KuneErrorHandler errorHandler, final WorkspaceSkeleton ws) {
 	this.session = session;
-	this.ws = ws;
 	workspace = WorkspaceFactory.createWorkspace(session, extensionPointManager, i18n, errorHandler);
 	tools = new HashMap<String, ClientTool>();
 	this.onApplicationStart = new Signal<Object>("onApplicationStart");
 	this.onApplicationStop = new Signal<Object>("onApplicationStop");
+	Window.addWindowCloseListener(new WindowCloseListener() {
+	    public void onWindowClosed() {
+		stop();
+	    }
+
+	    public String onWindowClosing() {
+		return null;
+	    }
+	});
     }
 
     public ClientTool getTool(final String toolName) {
@@ -74,11 +85,9 @@
 	return workspace;
     }
 
-    public void init(final DefaultDispatcher dispatcher, final StateManager stateManager,
-	    final HashMap<String, ClientTool> tools) {
+    public void init(final StateManager stateManager, final HashMap<String, ClientTool> tools) {
 	this.stateManager = stateManager;
 	this.tools = tools;
-	workspace.attachTools(tools.values().iterator());
     }
 
     public void onApplicationStart(final Slot<Object> slot) {
@@ -113,6 +122,15 @@
 	onApplicationStop.fire(null);
     }
 
+    public void subscribeActions(final ArrayList<ActionEvent<?>> actions) {
+	ActionEvent<?> actionEvent;
+
+	for (final Iterator<ActionEvent<?>> it = actions.iterator(); it.hasNext();) {
+	    actionEvent = it.next();
+	    DefaultDispatcher.getInstance().subscribe(actionEvent.event, actionEvent.action);
+	}
+    }
+
     private void getInitData() {
 	final SiteServiceAsync server = SiteService.App.getInstance();
 	server.getInitData(session.getUserHash(), new AsyncCallback<InitDataDTO>() {

Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/app/DesktopView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/app/DesktopView.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/app/DesktopView.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -1,26 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2008 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.platf.client.app;
-
-import org.ourproject.kune.platf.client.View;
-
-public interface DesktopView extends View {
-    void attach();
-}

Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/app/ui/DesktopPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/app/ui/DesktopPanel.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/app/ui/DesktopPanel.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -1,99 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2008 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-package org.ourproject.kune.platf.client.app.ui;
-
-import org.ourproject.kune.platf.client.app.DesktopView;
-import org.ourproject.kune.platf.client.services.I18nTranslationService;
-import org.ourproject.kune.platf.client.state.Session;
-import org.ourproject.kune.workspace.client.sitebar.bar.SiteBarListener;
-import org.ourproject.kune.workspace.client.sitebar.msg.SiteMessage;
-import org.ourproject.kune.workspace.client.workspace.Workspace;
-
-import com.google.gwt.user.client.Window;
-import com.google.gwt.user.client.WindowResizeListener;
-import com.google.gwt.user.client.ui.AbsolutePanel;
-import com.google.gwt.user.client.ui.RootPanel;
-import com.google.gwt.user.client.ui.Widget;
-
- at Deprecated
-public class DesktopPanel extends AbsolutePanel implements DesktopView {
-
-    public DesktopPanel(final Workspace workspace, final SiteBarListener listener, final Session session,
-	    final I18nTranslationService i18n) {
-	// QuickTips.init(); // extgwt tips
-	// final QuickTip quickTipInstance = QuickTips.getQuickTip();
-	// quickTipInstance.setDismissDelay(8000);
-	// quickTipInstance.setHideDelay(500);
-	// quickTipInstance.setInterceptTitles(true);
-	// SiteBar siteBar = SiteBarFactory.createSiteBar(listener, session,
-	// i18n);
-	// final SiteMessage siteMessage = SiteBarFactory.getSiteMessage();
-	// this.add((Widget) siteMessage.getView(),
-	// calculateMessageWidth(Window.getClientWidth()),
-	// calculateMessageHeight());
-	// this.add((Widget) siteBar.getView(), 0, 0);
-	this.add((Widget) workspace.getView(), 0, 20);
-	this.addStyleName("kunebody");
-	// initResizeListener(this, workspace, siteMessage);
-	// resizeDesktop(this, workspace, siteMessage, Window.getClientWidth(),
-	// Window.getClientHeight());
-    }
-
-    public void attach() {
-	RootPanel.get().add(this);
-    }
-
-    private int calculateMessageHeight() {
-	return 2;
-    }
-
-    private int calculateMessageWidth(final int width) {
-	return width * 20 / 100 - 10;
-    }
-
-    private void initResizeListener(final AbsolutePanel desktop, final Workspace workspace,
-	    final SiteMessage siteMessage) {
-	Window.addWindowResizeListener(new WindowResizeListener() {
-	    public void onWindowResized(final int width, final int height) {
-		resizeDesktop(desktop, workspace, siteMessage, width, height);
-	    }
-	});
-    }
-
-    private void resizeDesktop(final AbsolutePanel desktop, final Workspace workspace, final SiteMessage siteMessage,
-	    final int clientWidth, final int clientHeight) {
-	final int width = workspace.calculateWidth(clientWidth);
-	final int height = workspace.calculateHeight(clientHeight);
-	final boolean scroll = width <= Workspace.MIN_WIDTH || height <= Workspace.MIN_HEIGHT ? true : false;
-	Window.enableScrolling(scroll);
-	if (scroll) {
-	    desktop.setSize("" + width, "" + height);
-	} else {
-	    desktop.setSize("100%", "100%");
-	}
-	workspace.adjustSize(width, height);
-	// siteMessage.adjustWidth(width);
-	// desktop.setWidgetPosition((Widget) siteMessage.getView(),
-	// calculateMessageWidth(width),
-	// calculateMessageHeight());
-    }
-
-}

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/rpc/GroupService.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/rpc/GroupService.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/rpc/GroupService.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -24,9 +24,7 @@
 import org.ourproject.kune.platf.client.dto.StateToken;
 import org.ourproject.kune.platf.client.errors.DefaultException;
 
-import com.google.gwt.core.client.GWT;
 import com.google.gwt.user.client.rpc.RemoteService;
-import com.google.gwt.user.client.rpc.ServiceDefTarget;
 
 public interface GroupService extends RemoteService {
 

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/rpc/I18nService.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/rpc/I18nService.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/rpc/I18nService.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -24,25 +24,10 @@
 import org.ourproject.kune.platf.client.dto.I18nLanguageDTO;
 import org.ourproject.kune.platf.client.errors.DefaultException;
 
-import com.google.gwt.core.client.GWT;
 import com.google.gwt.user.client.rpc.RemoteService;
-import com.google.gwt.user.client.rpc.ServiceDefTarget;
 
 public interface I18nService extends RemoteService {
 
-    public class App {
-	private static I18nServiceAsync ourInstance = null;
-
-	public static synchronized I18nServiceAsync getInstance() {
-	    if (ourInstance == null) {
-		ourInstance = (I18nServiceAsync) GWT.create(I18nService.class);
-		((ServiceDefTarget) ourInstance).setServiceEntryPoint(GWT.getModuleBaseURL() + "I18nService");
-	    }
-	    return ourInstance;
-	}
-
-    }
-
     I18nLanguageDTO getInitialLanguage(String localeParam);
 
     HashMap<String, String> getLexicon(String language);

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/services/Kune.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/services/Kune.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/services/Kune.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -20,24 +20,16 @@
 
 package org.ourproject.kune.platf.client.services;
 
-import org.ourproject.kune.platf.client.KunePlatform;
-import org.ourproject.kune.platf.client.app.Application;
-import org.ourproject.kune.platf.client.state.Session;
-import org.ourproject.kune.platf.client.state.StateManager;
-import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
-import org.ourproject.kune.workspace.client.workspace.Workspace;
-
-import com.calclab.emiteuimodule.client.EmiteUIDialog;
+import com.calclab.suco.client.Suco;
 import com.calclab.suco.client.container.Container;
 import com.calclab.suco.client.container.DelegatedContainer;
 import com.calclab.suco.client.modules.Module;
-import com.calclab.suco.client.modules.ModuleBuilder;
 
 public class Kune extends DelegatedContainer {
 
     public static Kune create(final Module... modules) {
-	final ModuleBuilder container = new ModuleBuilder();
-	container.add(modules);
+	final Container container = Suco.create(modules);
+	Suco.add(container, new KuneModule());
 	return container.getInstance(Kune.class);
     }
 
@@ -45,32 +37,4 @@
 	super(container);
     }
 
-    public ColorTheme getColorTheme() {
-	return this.getInstance(ColorTheme.class);
-    }
-
-    public EmiteUIDialog getEmiteUIDialog() {
-	return this.getInstance(EmiteUIDialog.class);
-    }
-
-    public I18nUITranslationService getI18N() {
-	return this.getInstance(I18nUITranslationService.class);
-    }
-
-    public KunePlatform getPlatform() {
-	return this.getInstance(KunePlatform.class);
-    }
-
-    public Session getSession() {
-	return this.getInstance(Session.class);
-    }
-
-    public StateManager getStateManager() {
-	return this.getInstance(StateManager.class);
-    }
-
-    public Workspace getWorkspace() {
-	return this.getInstance(Application.class).getWorkspace();
-    }
-
 }

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneModule.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneModule.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -1,12 +1,13 @@
 package org.ourproject.kune.platf.client.services;
 
-import java.util.HashMap;
-
+import org.ourproject.kune.chat.client.ChatClientNewModule;
+import org.ourproject.kune.docs.client.DocumentClientNewModule;
 import org.ourproject.kune.platf.client.KunePlatform;
+import org.ourproject.kune.platf.client.PlatformClientModule;
 import org.ourproject.kune.platf.client.app.Application;
 import org.ourproject.kune.platf.client.app.ApplicationDefault;
+import org.ourproject.kune.platf.client.app.HistoryWrapper;
 import org.ourproject.kune.platf.client.app.HistoryWrapperImpl;
-import org.ourproject.kune.platf.client.dto.I18nLanguageDTO;
 import org.ourproject.kune.platf.client.dto.StateToken;
 import org.ourproject.kune.platf.client.extend.ExtensibleWidgetsManager;
 import org.ourproject.kune.platf.client.rpc.AsyncCallbackSimple;
@@ -14,20 +15,28 @@
 import org.ourproject.kune.platf.client.rpc.ContentServiceAsync;
 import org.ourproject.kune.platf.client.rpc.GroupService;
 import org.ourproject.kune.platf.client.rpc.GroupServiceAsync;
+import org.ourproject.kune.platf.client.rpc.I18nService;
+import org.ourproject.kune.platf.client.rpc.I18nServiceAsync;
 import org.ourproject.kune.platf.client.rpc.SocialNetworkService;
 import org.ourproject.kune.platf.client.rpc.SocialNetworkServiceAsync;
+import org.ourproject.kune.platf.client.state.ContentProvider;
 import org.ourproject.kune.platf.client.state.ContentProviderImpl;
 import org.ourproject.kune.platf.client.state.Session;
 import org.ourproject.kune.platf.client.state.SessionImpl;
 import org.ourproject.kune.platf.client.state.StateManager;
 import org.ourproject.kune.platf.client.state.StateManagerDefault;
-import org.ourproject.kune.platf.client.ui.QuickTipHelper;
+import org.ourproject.kune.platf.client.ui.QuickTipsHelper;
 import org.ourproject.kune.platf.client.ui.rate.RateIt;
 import org.ourproject.kune.platf.client.ui.rate.RateItPanel;
 import org.ourproject.kune.platf.client.ui.rate.RateItPresenter;
 import org.ourproject.kune.platf.client.ui.rate.RatePanel;
 import org.ourproject.kune.platf.client.ui.rate.RatePresenter;
+import org.ourproject.kune.workspace.client.WorkspaceClientModule;
+import org.ourproject.kune.workspace.client.i18n.I18nTranslator;
+import org.ourproject.kune.workspace.client.i18n.I18nTranslatorPresenter;
+import org.ourproject.kune.workspace.client.i18n.I18nTranslatorView;
 import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
+import org.ourproject.kune.workspace.client.i18n.ui.I18nTranslatorPanel;
 import org.ourproject.kune.workspace.client.licensechoose.LicenseChoose;
 import org.ourproject.kune.workspace.client.licensechoose.LicenseChoosePanel;
 import org.ourproject.kune.workspace.client.licensechoose.LicenseChoosePresenter;
@@ -92,6 +101,9 @@
 import org.ourproject.kune.workspace.client.ui.newtmp.sitebar.sitesign.SiteSignOutLink;
 import org.ourproject.kune.workspace.client.ui.newtmp.sitebar.sitesign.SiteSignOutLinkPanel;
 import org.ourproject.kune.workspace.client.ui.newtmp.sitebar.sitesign.SiteSignOutLinkPresenter;
+import org.ourproject.kune.workspace.client.ui.newtmp.sitebar.siteusermenu.SiteUserMenu;
+import org.ourproject.kune.workspace.client.ui.newtmp.sitebar.siteusermenu.SiteUserMenuPanel;
+import org.ourproject.kune.workspace.client.ui.newtmp.sitebar.siteusermenu.SiteUserMenuPresenter;
 import org.ourproject.kune.workspace.client.ui.newtmp.skel.WorkspaceSkeleton;
 import org.ourproject.kune.workspace.client.ui.newtmp.themes.WsThemePanel;
 import org.ourproject.kune.workspace.client.ui.newtmp.themes.WsThemePresenter;
@@ -108,443 +120,523 @@
 import org.ourproject.kune.workspace.client.workspace.ui.EntityLogo;
 import org.ourproject.kune.workspace.client.workspace.ui.EntityLogoPanel;
 
-import com.calclab.suco.client.container.Provider;
-import com.calclab.suco.client.modules.Module;
-import com.calclab.suco.client.modules.ModuleBuilder;
+import com.calclab.emiteuimodule.client.EmiteUIModule;
+import com.calclab.suco.client.container.Container;
+import com.calclab.suco.client.modules.AbstractModule;
+import com.calclab.suco.client.provider.Factory;
 import com.calclab.suco.client.scopes.SingletonScope;
 import com.calclab.suco.client.signal.Slot;
+import com.calclab.suco.client.signal.Slot0;
 import com.google.gwt.core.client.GWT;
 import com.google.gwt.user.client.Cookies;
 import com.google.gwt.user.client.History;
 import com.google.gwt.user.client.rpc.ServiceDefTarget;
 
-public class KuneModule implements Module {
-    private final I18nLanguageDTO initialLang;
-    private final HashMap<String, String> lexicon;
-    private ModuleBuilder builder;
-
-    public KuneModule(final I18nLanguageDTO initialLang, final HashMap<String, String> lexicon) {
-	this.initialLang = initialLang;
-	this.lexicon = lexicon;
+public class KuneModule extends AbstractModule {
+    public KuneModule() {
+	super(KuneModule.class);
     }
 
-    public Class<? extends Module> getType() {
-	return KuneModule.class;
-    }
+    @Override
+    public void onLoad() {
+	register(SingletonScope.class, new Factory<Kune>(Kune.class) {
+	    public Kune create() {
+		return new Kune($(Container.class));
+	    }
+	});
 
-    public void onLoad(final ModuleBuilder builder) {
-	this.builder = builder;
+	register(SingletonScope.class, new Factory<Session>(Session.class) {
+	    public Session create() {
+		return new SessionImpl(Cookies.getCookie(Site.USERHASH), $p(UserServiceAsync.class));
+	    }
+	});
 
-	builder.registerProvider(Kune.class, new Provider<Kune>() {
-	    public Kune get() {
-		return new Kune(builder);
+	/** Services (this in other module after UI refactor * */
+
+	register(SingletonScope.class, new Factory<I18nServiceAsync>(I18nServiceAsync.class) {
+	    public I18nServiceAsync create() {
+		final I18nServiceAsync service = (I18nServiceAsync) GWT.create(I18nService.class);
+		((ServiceDefTarget) service).setServiceEntryPoint(GWT.getModuleBaseURL() + "I18nService");
+		return service;
 	    }
-	}, SingletonScope.class);
+	});
 
-	builder.registerProvider(I18nUITranslationService.class, new Provider<I18nUITranslationService>() {
-	    public I18nUITranslationService get() {
+	register(SingletonScope.class, new Factory<UserServiceAsync>(UserServiceAsync.class) {
+	    public UserServiceAsync create() {
+		final UserServiceAsync service = (UserServiceAsync) GWT.create(UserService.class);
+		((ServiceDefTarget) service).setServiceEntryPoint(GWT.getModuleBaseURL() + "UserService");
+		return service;
+	    }
+	});
+
+	register(SingletonScope.class, new Factory<SocialNetworkServiceAsync>(SocialNetworkServiceAsync.class) {
+	    public SocialNetworkServiceAsync create() {
+		final SocialNetworkServiceAsync snServiceAsync = (SocialNetworkServiceAsync) GWT
+			.create(SocialNetworkService.class);
+		((ServiceDefTarget) snServiceAsync).setServiceEntryPoint(GWT.getModuleBaseURL()
+			+ "SocialNetworkService");
+		return snServiceAsync;
+	    }
+	});
+
+	register(SingletonScope.class, new Factory<GroupServiceAsync>(GroupServiceAsync.class) {
+	    public GroupServiceAsync create() {
+		final GroupServiceAsync groupServiceAsync = (GroupServiceAsync) GWT.create(GroupService.class);
+		((ServiceDefTarget) groupServiceAsync).setServiceEntryPoint(GWT.getModuleBaseURL() + "GroupService");
+		return groupServiceAsync;
+	    }
+	});
+
+	register(SingletonScope.class, new Factory<ContentServiceAsync>(ContentServiceAsync.class) {
+	    public ContentServiceAsync create() {
+		return ContentService.App.getInstance();
+	    }
+	});
+
+	register(SingletonScope.class, new Factory<I18nUITranslationService>(I18nUITranslationService.class) {
+	    public I18nUITranslationService create() {
 		final I18nUITranslationService i18n = new I18nUITranslationService();
-		i18n.setCurrentLanguage(initialLang.getCode());
-		i18n.setLexicon(lexicon);
+		i18n.init($(I18nServiceAsync.class), $(Session.class), new Slot0() {
+		    public void onEvent() {
+			onI18nReady();
+		    }
+		});
 		return i18n;
 	    }
-	}, SingletonScope.class);
+	});
 
-	builder.registerProvider(QuickTipHelper.class, new Provider<QuickTipHelper>() {
-	    public QuickTipHelper get() {
-		return new QuickTipHelper();
+	$(I18nUITranslationService.class);
+    }
+
+    private void onI18nReady() {
+	final I18nUITranslationService i18n = $(I18nUITranslationService.class);
+
+	register(SingletonScope.class, new Factory<I18nTranslationService>(I18nTranslationService.class) {
+	    public I18nTranslationService create() {
+		return i18n;
 	    }
-	}, SingletonScope.class);
+	});
 
-	i(QuickTipHelper.class);
+	register(SingletonScope.class, new Factory<QuickTipsHelper>(QuickTipsHelper.class) {
+	    public QuickTipsHelper create() {
+		return new QuickTipsHelper();
+	    }
+	});
 
-	builder.registerProvider(UserServiceAsync.class, new Provider<UserServiceAsync>() {
-	    public UserServiceAsync get() {
+	$(QuickTipsHelper.class);
+
+	register(SingletonScope.class, new Factory<UserServiceAsync>(UserServiceAsync.class) {
+	    public UserServiceAsync create() {
 		final UserServiceAsync service = (UserServiceAsync) GWT.create(UserService.class);
 		((ServiceDefTarget) service).setServiceEntryPoint(GWT.getModuleBaseURL() + "UserService");
 		return service;
 	    }
-	}, SingletonScope.class);
+	});
 
-	builder.registerProvider(SocialNetworkServiceAsync.class, new Provider<SocialNetworkServiceAsync>() {
-	    public SocialNetworkServiceAsync get() {
+	register(SingletonScope.class, new Factory<SocialNetworkServiceAsync>(SocialNetworkServiceAsync.class) {
+	    public SocialNetworkServiceAsync create() {
 		final SocialNetworkServiceAsync snServiceAsync = (SocialNetworkServiceAsync) GWT
 			.create(SocialNetworkService.class);
 		((ServiceDefTarget) snServiceAsync).setServiceEntryPoint(GWT.getModuleBaseURL()
 			+ "SocialNetworkService");
 		return snServiceAsync;
 	    }
-	}, SingletonScope.class);
+	});
 
-	builder.registerProvider(GroupServiceAsync.class, new Provider<GroupServiceAsync>() {
-	    public GroupServiceAsync get() {
+	register(SingletonScope.class, new Factory<GroupServiceAsync>(GroupServiceAsync.class) {
+	    public GroupServiceAsync create() {
 		final GroupServiceAsync groupServiceAsync = (GroupServiceAsync) GWT.create(GroupService.class);
 		((ServiceDefTarget) groupServiceAsync).setServiceEntryPoint(GWT.getModuleBaseURL() + "GroupService");
 		return groupServiceAsync;
 	    }
-	}, SingletonScope.class);
+	});
 
-	builder.registerProvider(ContentServiceAsync.class, new Provider<ContentServiceAsync>() {
-	    public ContentServiceAsync get() {
+	register(SingletonScope.class, new Factory<ContentServiceAsync>(ContentServiceAsync.class) {
+	    public ContentServiceAsync create() {
 		return ContentService.App.getInstance();
 	    }
-	}, SingletonScope.class);
+	});
 
-	builder.registerProvider(Session.class, new Provider<Session>() {
-	    public Session get() {
-		return new SessionImpl(Cookies.getCookie(Site.USERHASH), initialLang, p(UserServiceAsync.class));
-	    }
-	}, SingletonScope.class);
-
-	builder.registerProvider(Images.class, new Provider<Images>() {
-	    public Images get() {
+	register(SingletonScope.class, new Factory<Images>(Images.class) {
+	    public Images create() {
 		return Images.App.getInstance();
 	    }
-	}, SingletonScope.class);
+	});
 
-	builder.registerProvider(ImageUtils.class, new Provider<ImageUtils>() {
-	    public ImageUtils get() {
+	register(SingletonScope.class, new Factory<ImageUtils>(ImageUtils.class) {
+	    public ImageUtils create() {
 		return new ImageUtils();
 	    }
-	}, SingletonScope.class);
+	});
 
-	final I18nUITranslationService i18n = i(I18nUITranslationService.class);
-	builder.registerProvider(KuneErrorHandler.class, new Provider<KuneErrorHandler>() {
-	    public KuneErrorHandler get() {
-		return new KuneErrorHandler(i(Session.class), i18n, p(WorkspaceSkeleton.class));
+	register(SingletonScope.class, new Factory<KuneErrorHandler>(KuneErrorHandler.class) {
+	    public KuneErrorHandler create() {
+		return new KuneErrorHandler($(Session.class), i18n, $p(WorkspaceSkeleton.class));
 	    }
-	}, SingletonScope.class);
+	});
 
-	builder.registerProvider(WorkspaceSkeleton.class, new Provider<WorkspaceSkeleton>() {
-	    public WorkspaceSkeleton get() {
+	register(SingletonScope.class, new Factory<WorkspaceSkeleton>(WorkspaceSkeleton.class) {
+	    public WorkspaceSkeleton create() {
 		return new WorkspaceSkeleton();
 	    }
-	}, SingletonScope.class);
+	});
 
-	final KuneErrorHandler errorHandler = i(KuneErrorHandler.class);
+	final KuneErrorHandler errorHandler = $(KuneErrorHandler.class);
 	AsyncCallbackSimple.init(errorHandler);
 
-	builder.registerProvider(KunePlatform.class, new Provider<KunePlatform>() {
-	    public KunePlatform get() {
+	register(SingletonScope.class, new Factory<KunePlatform>(KunePlatform.class) {
+	    public KunePlatform create() {
 		return new KunePlatform();
 	    }
-	}, SingletonScope.class);
+	});
 
-	builder.registerProvider(ExtensibleWidgetsManager.class, new Provider<ExtensibleWidgetsManager>() {
-	    public ExtensibleWidgetsManager get() {
+	register(SingletonScope.class, new Factory<ExtensibleWidgetsManager>(ExtensibleWidgetsManager.class) {
+	    public ExtensibleWidgetsManager create() {
 		return new ExtensibleWidgetsManager();
 	    }
-	}, SingletonScope.class);
+	});
 
-	final WorkspaceSkeleton ws = i(WorkspaceSkeleton.class);
-	final Images images = i(Images.class);
+	final WorkspaceSkeleton ws = $(WorkspaceSkeleton.class);
+	final Images images = $(Images.class);
 
-	builder.registerProvider(Application.class, new Provider<Application>() {
-	    public Application get() {
-		final Session session = i(Session.class);
-		final ExtensibleWidgetsManager extensionPointManager = i(ExtensibleWidgetsManager.class);
-		return new ApplicationDefault(session, extensionPointManager, i18n, i(KuneErrorHandler.class), ws);
+	register(SingletonScope.class, new Factory<Application>(Application.class) {
+	    public Application create() {
+		final Session session = $(Session.class);
+		final ExtensibleWidgetsManager extensionPointManager = $(ExtensibleWidgetsManager.class);
+		return new ApplicationDefault(session, extensionPointManager, i18n, $(KuneErrorHandler.class), ws);
 	    }
-	}, SingletonScope.class);
+	});
 
-	builder.registerProvider(SitePublicSpaceLink.class, new Provider<SitePublicSpaceLink>() {
-	    public SitePublicSpaceLink get() {
+	register(SingletonScope.class, new Factory<SitePublicSpaceLink>(SitePublicSpaceLink.class) {
+	    public SitePublicSpaceLink create() {
 		final SitePublicSpaceLinkPresenter presenter = new SitePublicSpaceLinkPresenter();
 		final SitePublicSpaceLinkPanel panel = new SitePublicSpaceLinkPanel(presenter, ws, i18n, images);
 		presenter.init(panel);
 		return presenter;
 	    }
-	}, SingletonScope.class);
+	});
 
-	builder.registerProvider(SiteProgress.class, new Provider<SiteProgress>() {
-	    public SiteProgress get() {
+	register(SingletonScope.class, new Factory<SiteProgress>(SiteProgress.class) {
+	    public SiteProgress create() {
 		final SiteProgressPresenter presenter = new SiteProgressPresenter();
-		final SiteProgressPanel panel = new SiteProgressPanel(presenter, p(SitePublicSpaceLink.class));
+		final SiteProgressPanel panel = new SiteProgressPanel(presenter, $p(SitePublicSpaceLink.class));
 		presenter.init(panel);
 		return presenter;
 	    }
-	}, SingletonScope.class);
+	});
 
-	builder.registerProvider(Site.class, new Provider<Site>() {
-	    public Site get() {
-		return new Site(i18n, i(SiteProgress.class), p(SiteMessage.class));
+	register(SingletonScope.class, new Factory<Site>(Site.class) {
+	    public Site create() {
+		return new Site(i18n, $(SiteProgress.class), $p(SiteMessage.class));
 	    }
-	}, SingletonScope.class);
+	});
 
-	builder.registerProvider(SiteMessage.class, new Provider<SiteMessage>() {
-	    public SiteMessage get() {
+	register(SingletonScope.class, new Factory<SiteMessage>(SiteMessage.class) {
+	    public SiteMessage create() {
 		final SiteMessagePresenter siteMessagePresenter = new SiteMessagePresenter();
 		final SiteMessageView siteMessageView = new SiteMessagePanel(siteMessagePresenter, true, i18n);
 		siteMessagePresenter.init(siteMessageView);
 		return siteMessagePresenter;
 	    }
-	}, SingletonScope.class);
+	});
 
-	i(SiteProgress.class);
-	i(Site.class);
+	$(SiteProgress.class);
+	$(Site.class);
 
-	builder.registerProvider(SiteSignInLink.class, new Provider<SiteSignInLink>() {
-	    public SiteSignInLink get() {
-		final SiteSignInLinkPresenter presenter = new SiteSignInLinkPresenter(i(Session.class));
+	register(SingletonScope.class, new Factory<SiteSignInLink>(SiteSignInLink.class) {
+	    public SiteSignInLink create() {
+		final SiteSignInLinkPresenter presenter = new SiteSignInLinkPresenter($(Session.class));
 		final SiteSignInLinkPanel panel = new SiteSignInLinkPanel(presenter, i18n, ws);
 		presenter.init(panel);
 		return presenter;
 	    }
-	}, SingletonScope.class);
+	});
 
-	builder.registerProvider(SiteSignOutLink.class, new Provider<SiteSignOutLink>() {
-	    public SiteSignOutLink get() {
-		final SiteSignOutLinkPresenter presenter = new SiteSignOutLinkPresenter(i(Session.class),
-			p(UserServiceAsync.class), p(KuneErrorHandler.class));
+	register(SingletonScope.class, new Factory<SiteUserMenu>(SiteUserMenu.class) {
+	    public SiteUserMenu create() {
+		final SiteUserMenuPresenter presenter = new SiteUserMenuPresenter($(Session.class));
+		final SiteUserMenuPanel panel = new SiteUserMenuPanel(presenter, ws);
+		presenter.init(panel);
+		return presenter;
+	    }
+	});
+
+	register(SingletonScope.class, new Factory<SiteSignOutLink>(SiteSignOutLink.class) {
+	    public SiteSignOutLink create() {
+		final SiteSignOutLinkPresenter presenter = new SiteSignOutLinkPresenter($(Session.class),
+			$p(UserServiceAsync.class), $p(KuneErrorHandler.class));
 		final SiteSignOutLinkPanel panel = new SiteSignOutLinkPanel(presenter, i18n, ws);
 		presenter.init(panel);
 		return presenter;
 	    }
-	}, SingletonScope.class);
+	});
 
-	builder.registerProvider(SiteNewGroupLink.class, new Provider<SiteNewGroupLink>() {
-	    public SiteNewGroupLink get() {
+	register(SingletonScope.class, new Factory<SiteNewGroupLink>(SiteNewGroupLink.class) {
+	    public SiteNewGroupLink create() {
 		final SiteNewGroupLinkPresenter presenter = new SiteNewGroupLinkPresenter();
 		final SiteNewGroupLinkPanel panel = new SiteNewGroupLinkPanel(presenter, ws, i18n);
 		presenter.init(panel);
 		return presenter;
 	    }
-	}, SingletonScope.class);
+	});
 
-	builder.registerProvider(SiteOptions.class, new Provider<SiteOptions>() {
-	    public SiteOptions get() {
+	register(SingletonScope.class, new Factory<SiteOptions>(SiteOptions.class) {
+	    public SiteOptions create() {
 		final SiteOptionsPresenter presenter = new SiteOptionsPresenter();
 		final SiteOptionsPanel panel = new SiteOptionsPanel(presenter, ws);
 		presenter.init(panel);
 		return presenter;
 	    }
-	}, SingletonScope.class);
+	});
 
-	builder.registerProvider(SiteLogo.class, new Provider<SiteLogo>() {
-	    public SiteLogo get() {
-		final SiteLogoPresenter presenter = new SiteLogoPresenter(i(Session.class));
+	register(SingletonScope.class, new Factory<SiteLogo>(SiteLogo.class) {
+	    public SiteLogo create() {
+		final SiteLogoPresenter presenter = new SiteLogoPresenter($(Session.class));
 		final SiteLogoPanel panel = new SiteLogoPanel(presenter, ws);
 		presenter.init(panel);
 		return presenter;
 	    }
-	}, SingletonScope.class);
+	});
 
-	builder.registerProvider(SiteSearcher.class, new Provider<SiteSearcher>() {
-	    public SiteSearcher get() {
+	register(SingletonScope.class, new Factory<SiteSearcher>(SiteSearcher.class) {
+	    public SiteSearcher create() {
 		final SiteSearcherPresenter presenter = new SiteSearcherPresenter();
 		final SiteSearcherView view = new SiteSearcherPanel(presenter, i18n, ws);
 		presenter.init(view);
 		return presenter;
 	    }
-	}, SingletonScope.class);
+	});
 
-	builder.registerProvider(SiteSearch.class, new Provider<SiteSearch>() {
-	    public SiteSearch get() {
-		final SiteSearchPresenter presenter = new SiteSearchPresenter(p(SiteSearcher.class));
+	register(SingletonScope.class, new Factory<I18nTranslator>(I18nTranslator.class) {
+	    public I18nTranslator create() {
+		final I18nTranslatorPresenter presenter = new I18nTranslatorPresenter($(Session.class),
+			$(I18nServiceAsync.class), i18n);
+		final I18nTranslatorView view = new I18nTranslatorPanel(presenter, i18n);
+		presenter.init(view);
+		return presenter;
+	    }
+	});
+
+	register(SingletonScope.class, new Factory<SiteSearch>(SiteSearch.class) {
+	    public SiteSearch create() {
+		final SiteSearchPresenter presenter = new SiteSearchPresenter($p(SiteSearcher.class));
 		final SiteSearchPanel panel = new SiteSearchPanel(presenter, ws, i18n);
 		presenter.init(panel);
 		return presenter;
 	    }
-	}, SingletonScope.class);
+	});
 
-	builder.registerProvider(SignIn.class, new Provider<SignIn>() {
-	    public SignIn get() {
-		final SignInPresenter presenter = new SignInPresenter(i(Session.class), i(StateManager.class), i18n,
-			i(UserServiceAsync.class));
+	register(SingletonScope.class, new Factory<SignIn>(SignIn.class) {
+	    public SignIn create() {
+		final SignInPresenter presenter = new SignInPresenter($(Session.class), $(StateManager.class), i18n,
+			$(UserServiceAsync.class));
 		final SignInPanel view = new SignInPanel(presenter, i18n, ws);
 		presenter.init(view);
 		return presenter;
 	    }
-	}, SingletonScope.class);
+	});
 
-	builder.registerProvider(LicenseChoose.class, new Provider<LicenseChoose>() {
-	    public LicenseChoose get() {
-		final LicenseChoosePresenter presenter = new LicenseChoosePresenter(i(Session.class));
+	register(SingletonScope.class, new Factory<LicenseChoose>(LicenseChoose.class) {
+	    public LicenseChoose create() {
+		final LicenseChoosePresenter presenter = new LicenseChoosePresenter($(Session.class));
 		final LicenseChoosePanel view = new LicenseChoosePanel(presenter, i18n);
 		presenter.init(view);
 		return presenter;
 	    }
 	});
 
-	builder.registerProvider(NewGroup.class, new Provider<NewGroup>() {
-	    public NewGroup get() {
-		final NewGroupPresenter presenter = new NewGroupPresenter(i18n, i(Session.class),
-			i(StateManager.class), p(GroupServiceAsync.class));
-		final NewGroupPanel view = new NewGroupPanel(presenter, i18n, p(LicenseChoose.class));
+	register(SingletonScope.class, new Factory<NewGroup>(NewGroup.class) {
+	    public NewGroup create() {
+		final NewGroupPresenter presenter = new NewGroupPresenter(i18n, $(Session.class),
+			$(StateManager.class), $p(GroupServiceAsync.class));
+		final NewGroupPanel view = new NewGroupPanel(presenter, i18n, $p(LicenseChoose.class));
 		presenter.init(view);
 		return presenter;
 	    }
-	}, SingletonScope.class);
+	});
 
-	i(SitePublicSpaceLink.class);
-	i(SiteMessage.class);
-	i(SiteSignInLink.class);
-	i(SiteSignOutLink.class);
-	i(SiteNewGroupLink.class);
-	i(SiteSearch.class);
-	i(SiteLogo.class);
+	$(SitePublicSpaceLink.class);
+	$(SiteMessage.class);
+	$(SiteUserMenu.class);
+	$(SiteSignInLink.class);
+	$(SiteSignOutLink.class);
+	$(SiteNewGroupLink.class);
+	$(SiteSearch.class);
+	$(SiteLogo.class);
 
-	builder.registerProvider(EntityLogo.class, new Provider<EntityLogo>() {
-	    public EntityLogo get() {
+	register(SingletonScope.class, new Factory<EntityLogo>(EntityLogo.class) {
+	    public EntityLogo create() {
 		return new EntityLogoPanel(i18n, ws);
 	    }
-	}, SingletonScope.class);
+	});
 
-	builder.registerProvider(WsThemePresenter.class, new Provider<WsThemePresenter>() {
-	    public WsThemePresenter get() {
-		final WsThemePresenter presenter = new WsThemePresenter(i(Session.class), p(GroupServiceAsync.class));
+	register(SingletonScope.class, new Factory<WsThemePresenter>(WsThemePresenter.class) {
+	    public WsThemePresenter create() {
+		final WsThemePresenter presenter = new WsThemePresenter($(Session.class), $p(GroupServiceAsync.class));
 		final WsThemePanel panel = new WsThemePanel(ws, presenter, i18n);
 		presenter.init(panel);
 		return presenter;
 	    }
-	}, SingletonScope.class);
+	});
 
-	builder.registerProvider(EntityTitlePresenter.class, new Provider<EntityTitlePresenter>() {
-	    public EntityTitlePresenter get() {
-		final EntityTitlePresenter presenter = new EntityTitlePresenter(i18n, i(KuneErrorHandler.class));
+	register(SingletonScope.class, new Factory<EntityTitlePresenter>(EntityTitlePresenter.class) {
+	    public EntityTitlePresenter create() {
+		final EntityTitlePresenter presenter = new EntityTitlePresenter(i18n, $(KuneErrorHandler.class));
 		final EntityTitlePanel panel = new EntityTitlePanel(ws, presenter);
 		presenter.init(panel);
 		return presenter;
 	    }
-	}, SingletonScope.class);
+	});
 
-	builder.registerProvider(EntitySubTitlePresenter.class, new Provider<EntitySubTitlePresenter>() {
-	    public EntitySubTitlePresenter get() {
+	register(SingletonScope.class, new Factory<EntitySubTitlePresenter>(EntitySubTitlePresenter.class) {
+	    public EntitySubTitlePresenter create() {
 		final EntitySubTitlePresenter presenter = new EntitySubTitlePresenter(i18n);
 		final EntitySubTitlePanel panel = new EntitySubTitlePanel(presenter, i18n, ws);
 		presenter.init(panel);
 		return presenter;
 	    }
-	}, SingletonScope.class);
+	});
 
-	builder.registerProvider(EntityLicensePresenter.class, new Provider<EntityLicensePresenter>() {
-	    public EntityLicensePresenter get() {
+	register(SingletonScope.class, new Factory<EntityLicensePresenter>(EntityLicensePresenter.class) {
+	    public EntityLicensePresenter create() {
 		final EntityLicensePresenter presenter = new EntityLicensePresenter();
 		final EntityLicensePanel panel = new EntityLicensePanel(presenter, i18n, ws);
 		presenter.init(panel);
 		return presenter;
 	    }
-	}, SingletonScope.class);
+	});
 
-	builder.registerProvider(RatePresenter.class, new Provider<RatePresenter>() {
-	    public RatePresenter get() {
+	register(SingletonScope.class, new Factory<RatePresenter>(RatePresenter.class) {
+	    public RatePresenter create() {
 		final RatePresenter presenter = new RatePresenter();
 		final RatePanel panel = new RatePanel(null, null, i18n, ws);
 		presenter.init(panel);
 		return presenter;
 	    }
-	}, SingletonScope.class);
+	});
 
-	builder.registerProvider(RateIt.class, new Provider<RateIt>() {
-	    public RateIt get() {
-		final RateItPresenter presenter = new RateItPresenter(i18n, i(Session.class),
-			p(ContentServiceAsync.class), p(StateManager.class));
+	register(SingletonScope.class, new Factory<RateIt>(RateIt.class) {
+	    public RateIt create() {
+		final RateItPresenter presenter = new RateItPresenter(i18n, $(Session.class),
+			$p(ContentServiceAsync.class), $p(StateManager.class));
 		final RateItPanel panel = new RateItPanel(presenter, i18n, ws);
 		presenter.init(panel);
 		return presenter;
 	    }
-	}, SingletonScope.class);
+	});
 
-	builder.registerProvider(WorkspaceManager.class, new Provider<WorkspaceManager>() {
-	    public WorkspaceManager get() {
-		final WorkspaceManager presenter = new WorkspaceManager(i(SitePublicSpaceLink.class),
-			i(EntityLogo.class), i(EntityTitlePresenter.class), i(EntitySubTitlePresenter.class),
-			i(WsThemePresenter.class), i(EntityLicensePresenter.class), p(GroupMembersSummary.class),
-			p(ParticipationSummary.class), p(TagsSummary.class), p(GroupSummary.class), i(RateIt.class),
-			i(RatePresenter.class));
+	register(SingletonScope.class, new Factory<GroupMembersSummary>(GroupMembersSummary.class) {
+	    public GroupMembersSummary create() {
+		final GroupMembersSummaryPresenter presenter = new GroupMembersSummaryPresenter(i18n,
+			$p(StateManager.class), $(ImageUtils.class), $(Session.class),
+			$p(SocialNetworkServiceAsync.class), $p(UserLiveSearcher.class));
+		final GroupMembersSummaryView view = new GroupMembersSummaryPanel(presenter, i18n, ws);
+		presenter.init(view);
 		return presenter;
 	    }
-	}, SingletonScope.class);
+	});
 
-	builder.registerProvider(StateManager.class, new Provider<StateManager>() {
-	    public StateManager get() {
-		final StateManagerDefault stateManager = new StateManagerDefault(new ContentProviderImpl(
-			ContentService.App.getInstance()), i(Session.class), new HistoryWrapperImpl(),
-			i(WorkspaceManager.class));
-		History.addHistoryListener(stateManager);
-		return stateManager;
-	    }
-	}, SingletonScope.class);
-
-	builder.registerProvider(UserLiveSearcher.class, new Provider<UserLiveSearcher>() {
-	    public UserLiveSearcher get() {
-		final UserLiveSearcherPresenter presenter = new UserLiveSearcherPresenter();
-		final EntityLiveSearcherView view = new UserLiveSearcherPanel(presenter, i18n);
+	register(SingletonScope.class, new Factory<GroupSummary>(GroupSummary.class) {
+	    public GroupSummary create() {
+		final GroupSummaryPresenter presenter = new GroupSummaryPresenter();
+		final GroupSummaryView view = new GroupSummaryPanel(presenter, i18n, ws);
 		presenter.init(view);
 		return presenter;
 	    }
-	}, SingletonScope.class);
+	});
 
-	builder.registerProvider(GroupLiveSearcher.class, new Provider<GroupLiveSearcher>() {
-	    public GroupLiveSearcher get() {
-		final GroupLiveSearcherPresenter presenter = new GroupLiveSearcherPresenter();
-		final EntityLiveSearcherView view = new GroupLiveSearchPanel(presenter, i18n);
+	register(SingletonScope.class, new Factory<ParticipationSummary>(ParticipationSummary.class) {
+	    public ParticipationSummary create() {
+		final ParticipationSummaryPresenter presenter = new ParticipationSummaryPresenter(i18n,
+			$p(StateManager.class), $(ImageUtils.class), $(Session.class),
+			$p(SocialNetworkServiceAsync.class));
+		final ParticipationSummaryView view = new ParticipationSummaryPanel(presenter, i18n, ws);
 		presenter.init(view);
 		return presenter;
 	    }
-	}, SingletonScope.class);
+	});
 
-	builder.registerProvider(GroupMembersSummary.class, new Provider<GroupMembersSummary>() {
-	    public GroupMembersSummary get() {
-		final GroupMembersSummaryPresenter presenter = new GroupMembersSummaryPresenter(i18n,
-			p(StateManager.class), i(ImageUtils.class), i(Session.class),
-			p(SocialNetworkServiceAsync.class), p(UserLiveSearcher.class));
-		final GroupMembersSummaryView view = new GroupMembersSummaryPanel(presenter, i18n, ws);
-		presenter.init(view);
+	register(SingletonScope.class, new Factory<TagsSummary>(TagsSummary.class) {
+	    public TagsSummary create() {
+		final TagsSummaryPresenter presenter = new TagsSummaryPresenter($p(Session.class),
+			$p(SiteSearcher.class));
+		final TagsSummaryPanel panel = new TagsSummaryPanel(presenter, i18n, ws);
+		presenter.init(panel);
 		return presenter;
 	    }
-	}, SingletonScope.class);
+	});
 
-	builder.registerProvider(GroupSummary.class, new Provider<GroupSummary>() {
-	    public GroupSummary get() {
-		final GroupSummaryPresenter presenter = new GroupSummaryPresenter();
-		final GroupSummaryView view = new GroupSummaryPanel(presenter, i18n, ws);
-		presenter.init(view);
+	register(SingletonScope.class, new Factory<WorkspaceManager>(WorkspaceManager.class) {
+	    public WorkspaceManager create() {
+		final WorkspaceManager presenter = new WorkspaceManager($(SitePublicSpaceLink.class),
+			$(EntityLogo.class), $(EntityTitlePresenter.class), $(EntitySubTitlePresenter.class),
+			$(WsThemePresenter.class), $(EntityLicensePresenter.class), $p(GroupMembersSummary.class),
+			$p(ParticipationSummary.class), $p(TagsSummary.class), $p(GroupSummary.class),
+			$p(RateIt.class), $p(RatePresenter.class));
 		return presenter;
 	    }
-	}, SingletonScope.class);
+	});
 
-	builder.registerProvider(ParticipationSummary.class, new Provider<ParticipationSummary>() {
-	    public ParticipationSummary get() {
-		final ParticipationSummaryPresenter presenter = new ParticipationSummaryPresenter(i18n,
-			p(StateManager.class), i(ImageUtils.class), i(Session.class),
-			p(SocialNetworkServiceAsync.class));
-		final ParticipationSummaryView view = new ParticipationSummaryPanel(presenter, i18n, ws);
+	$(WorkspaceManager.class);
+
+	register(SingletonScope.class, new Factory<HistoryWrapper>(HistoryWrapper.class) {
+	    public HistoryWrapper create() {
+		return new HistoryWrapperImpl();
+	    }
+	}, new Factory<ContentProvider>(ContentProvider.class) {
+	    public ContentProvider create() {
+		return new ContentProviderImpl($(ContentServiceAsync.class));
+	    }
+	}, new Factory<StateManager>(StateManager.class) {
+	    public StateManager create() {
+		final StateManagerDefault stateManager = new StateManagerDefault($(ContentProvider.class),
+			$(Session.class), $(HistoryWrapper.class), $(WorkspaceManager.class));
+		History.addHistoryListener(stateManager);
+		return stateManager;
+	    }
+	});
+
+	register(SingletonScope.class, new Factory<UserLiveSearcher>(UserLiveSearcher.class) {
+	    public UserLiveSearcher create() {
+		final UserLiveSearcherPresenter presenter = new UserLiveSearcherPresenter();
+		final EntityLiveSearcherView view = new UserLiveSearcherPanel(presenter, i18n);
 		presenter.init(view);
 		return presenter;
 	    }
-	}, SingletonScope.class);
+	});
 
-	builder.registerProvider(TagsSummary.class, new Provider<TagsSummary>() {
-	    public TagsSummary get() {
-		final TagsSummaryPresenter presenter = new TagsSummaryPresenter(p(Session.class), p(SiteSearcher.class));
-		final TagsSummaryPanel panel = new TagsSummaryPanel(presenter, i18n, ws);
-		presenter.init(panel);
+	register(SingletonScope.class, new Factory<GroupLiveSearcher>(GroupLiveSearcher.class) {
+	    public GroupLiveSearcher create() {
+		final GroupLiveSearcherPresenter presenter = new GroupLiveSearcherPresenter();
+		final EntityLiveSearcherView view = new GroupLiveSearchPanel(presenter, i18n);
+		presenter.init(view);
 		return presenter;
 	    }
-	}, SingletonScope.class);
+	});
 
+	load(new EmiteUIModule(), new DocumentClientNewModule(), new ChatClientNewModule());
+
 	// Register of tokens like "signin", "newgroup", "translate" etcetera
-	i(StateManager.class).addSiteToken(SiteToken.signin.toString(), new Slot<StateToken>() {
+	$(StateManager.class).addSiteToken(SiteToken.signin.toString(), new Slot<StateToken>() {
 	    public void onEvent(final StateToken previousStateToken) {
-		i(SignIn.class).doSignIn(previousStateToken);
+		$(SignIn.class).doSignIn(previousStateToken);
 	    }
 	});
 
-	i(StateManager.class).addSiteToken(SiteToken.newgroup.toString(), new Slot<StateToken>() {
+	$(StateManager.class).addSiteToken(SiteToken.newgroup.toString(), new Slot<StateToken>() {
 	    public void onEvent(final StateToken previousStateToken) {
-		i(NewGroup.class).doNewGroup(previousStateToken);
+		$(NewGroup.class).doNewGroup(previousStateToken);
 	    }
 	});
 
-    }
+	final KunePlatform platform = $(KunePlatform.class);
+	platform.install(new PlatformClientModule($(Session.class), $p(StateManager.class)));
+	platform.install(new WorkspaceClientModule($(Session.class), $(StateManager.class), $(Application.class)
+		.getWorkspace(), i18n));
+	$(Application.class).init($(StateManager.class), platform.getIndexedTools());
+	$(Application.class).subscribeActions(platform.getActions());
+	$(Application.class).getWorkspace().attachTools(platform.getTools().iterator());
+	$(Application.class).start();
 
-    private <T> T i(final Class<T> componentType) {
-	return builder.getInstance(componentType);
     }
-
-    private <T> Provider<T> p(final Class<T> componentKey) {
-	return builder.getProvider(componentKey);
-    }
-
 }

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/state/SessionImpl.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/state/SessionImpl.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/state/SessionImpl.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -52,10 +52,8 @@
     private final Signal<Object> onUserSignOut;
     private final Provider<UserServiceAsync> userServiceProvider;
 
-    public SessionImpl(final String userHash, final I18nLanguageDTO initialLanguage,
-	    final Provider<UserServiceAsync> userServiceProvider) {
+    public SessionImpl(final String userHash, final Provider<UserServiceAsync> userServiceProvider) {
 	this.userHash = userHash;
-	currentLanguage = initialLanguage;
 	this.userServiceProvider = userServiceProvider;
 	languagesArray = null;
 	this.onInitDataReceived = new Signal<InitDataDTO>("initDataReceived");

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/DefaultBorderLayout.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/DefaultBorderLayout.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/DefaultBorderLayout.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -130,5 +130,6 @@
     public void setPanel(final Panel panel, final Widget widget) {
 	panel.clear();
 	add(panel, widget);
+	doLayoutIfNeeded();
     }
 }

Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/ui/QuickTipHelper.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/QuickTipHelper.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/QuickTipHelper.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -1,15 +0,0 @@
-package org.ourproject.kune.platf.client.ui;
-
-import com.gwtext.client.widgets.QuickTip;
-import com.gwtext.client.widgets.QuickTips;
-
-public class QuickTipHelper {
-
-    public QuickTipHelper() {
-	QuickTips.init();
-	final QuickTip quickTipInstance = QuickTips.getQuickTip();
-	quickTipInstance.setDismissDelay(8000);
-	quickTipInstance.setHideDelay(500);
-	quickTipInstance.setInterceptTitles(true);
-    }
-}

Copied: trunk/src/main/java/org/ourproject/kune/platf/client/ui/QuickTipsHelper.java (from rev 821, trunk/src/main/java/org/ourproject/kune/platf/client/ui/QuickTipHelper.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/QuickTipHelper.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/QuickTipsHelper.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -0,0 +1,25 @@
+package org.ourproject.kune.platf.client.ui;
+
+import com.google.gwt.user.client.Command;
+import com.google.gwt.user.client.DeferredCommand;
+import com.gwtext.client.widgets.QuickTip;
+import com.gwtext.client.widgets.QuickTips;
+
+public class QuickTipsHelper {
+
+    public QuickTipsHelper() {
+	DeferredCommand.addCommand(new Command() {
+	    public void execute() {
+		if (!QuickTips.isEnabled()) {
+		    // If not enabled before by another UI component
+		    QuickTips.init();
+		    final QuickTip quickTipInstance = QuickTips.getQuickTip();
+		    quickTipInstance.setInterceptTitles(true);
+		    quickTipInstance.setDismissDelay(7000);
+		    quickTipInstance.setHideDelay(400);
+		    quickTipInstance.setMinWidth(100);
+		}
+	    }
+	});
+    }
+}
\ No newline at end of file

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/gridmenu/GridMenuPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/gridmenu/GridMenuPanel.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/gridmenu/GridMenuPanel.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -1,5 +1,6 @@
 package org.ourproject.kune.platf.client.ui.gridmenu;
 
+import java.util.ArrayList;
 import java.util.HashMap;
 
 import com.allen_sauer.gwt.log.client.Log;
@@ -101,7 +102,7 @@
 	this.withEndIcon = withEndIcon;
 	super.setBorder(false);
 	super.setLayout(new FitLayout());
-	//super.setAutoScroll(true);
+	// super.setAutoScroll(true);
 	if (withTopBar) {
 	    topBar = new Toolbar();
 	    super.setTopToolbar(topBar);
@@ -225,7 +226,7 @@
 	if (grid != null) {
 	    // grid.setWidth(width - 27);
 	    grid.setWidth(width - 27);
-	    //super.setWidth(width - 11);
+	    // super.setWidth(width - 11);
 	    doLayoutIfNeeded();
 	}
     }
@@ -352,8 +353,17 @@
 	iconColumn.setFixed(true);
 	titleColumn.setFixed(false);
 	endIconColumn.setFixed(true);
-	final ColumnConfig[] columnsConfigs = withEndIcon ? new ColumnConfig[] { iconColumn, titleColumn,
-		endIconColumn, groupColumn } : new ColumnConfig[] { iconColumn, titleColumn, groupColumn };
+	final ArrayList<ColumnConfig> columnList = new ArrayList<ColumnConfig>();
+	columnList.add(iconColumn);
+	columnList.add(titleColumn);
+	if (grouped) {
+	    columnList.add(groupColumn);
+	}
+	if (withEndIcon) {
+	    columnList.add(endIconColumn);
+	}
+	ColumnConfig[] columnsConfigs = {};
+	columnsConfigs = columnList.toArray(columnsConfigs);
 	columnModel = new ColumnModel(columnsConfigs);
 	grid.setColumnModel(columnModel);
 

Modified: trunk/src/main/java/org/ourproject/kune/rack/RackServletFilter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/rack/RackServletFilter.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/rack/RackServletFilter.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -84,10 +84,10 @@
 	    throws IOException, ServletException {
 
 	final String relative = RackHelper.getRelativeURL(request);
-	log.debug("REQUEST: " + relative);
+	// log.debug("REQUEST: " + relative);
 	for (final RequestMatcher matcher : excludes) {
 	    if (matcher.matches(relative)) {
-		log.debug("SKIPING!");
+		// log.debug("SKIPING!");
 		chain.doFilter(request, response);
 		return;
 	    }

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceClientModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceClientModule.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceClientModule.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -29,9 +29,6 @@
 import org.ourproject.kune.workspace.client.actions.DetachFromExtensibleWidgetAction;
 import org.ourproject.kune.workspace.client.actions.RecalculateWorkspaceAction;
 import org.ourproject.kune.workspace.client.actions.ReloadContextAction;
-import org.ourproject.kune.workspace.client.actions.i18n.DoTranslationAction;
-import org.ourproject.kune.workspace.client.actions.i18n.GetLexiconAction;
-import org.ourproject.kune.workspace.client.actions.i18n.GetTranslationAction;
 import org.ourproject.kune.workspace.client.actions.i18n.ShowTranslatorAction;
 import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
 import org.ourproject.kune.workspace.client.workspace.Workspace;
@@ -56,10 +53,7 @@
 	register.addAction(PlatformEvents.DETACH_FROM_EXTENSIBLE_WIDGET,
 		new DetachFromExtensibleWidgetAction(workspace));
 	register.addAction(PlatformEvents.CLEAR_EXTENSIBLE_WIDGET, new ClearExtensibleWidgetAction(workspace));
-	register.addAction(WorkspaceEvents.GET_TRANSLATION, new GetTranslationAction(session));
 	register.addAction(WorkspaceEvents.SHOW_TRANSLATOR, new ShowTranslatorAction(session, workspace, i18n));
-	register.addAction(WorkspaceEvents.DO_TRANSLATION, new DoTranslationAction(session, i18n));
-	register.addAction(WorkspaceEvents.GET_LEXICON, new GetLexiconAction(i18n));
 	register.addAction(WorkspaceEvents.RELOAD_CONTEXT, new ReloadContextAction(stateManager));
 	register.addAction(WorkspaceEvents.RECALCULATE_WORKSPACE_SIZE, new RecalculateWorkspaceAction(workspace));
     }

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceEvents.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceEvents.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceEvents.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -21,11 +21,7 @@
 package org.ourproject.kune.workspace.client;
 
 public interface WorkspaceEvents {
-    public static final String GET_LEXICON = "i18n.getLexicon";
     public static final String SHOW_TRANSLATOR = "i18n.ShowTranslator";
-    public static final String SHOW_SEARCHER = "ws.ShowSearcher";
-    public static final String GET_TRANSLATION = "i18n.GetTranslation";
-    public static final String DO_TRANSLATION = "i18n.doTranslation";
     public static final String RELOAD_CONTEXT = "ws.ReoloadContext";
     public static final String WS_SPLITTER_STARTRESIZING = "ws.SplitterStartResizing";
     public static final String WS_SPLITTER_STOPRESIZING = "ws.SplitterStopResizing";

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceFactory.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceFactory.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceFactory.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -19,8 +19,6 @@
  */
 package org.ourproject.kune.workspace.client;
 
-import org.ourproject.kune.platf.client.app.DesktopView;
-import org.ourproject.kune.platf.client.app.ui.DesktopPanel;
 import org.ourproject.kune.platf.client.extend.ExtensibleWidgetsManager;
 import org.ourproject.kune.platf.client.services.I18nTranslationService;
 import org.ourproject.kune.platf.client.services.KuneErrorHandler;
@@ -29,19 +27,14 @@
 import org.ourproject.kune.workspace.client.editor.TextEditorListener;
 import org.ourproject.kune.workspace.client.editor.TextEditorPanel;
 import org.ourproject.kune.workspace.client.editor.TextEditorPresenter;
-import org.ourproject.kune.workspace.client.i18n.I18nTranslatorComponent;
-import org.ourproject.kune.workspace.client.i18n.I18nTranslatorPresenter;
-import org.ourproject.kune.workspace.client.i18n.I18nTranslatorView;
 import org.ourproject.kune.workspace.client.i18n.LanguageSelectorComponent;
 import org.ourproject.kune.workspace.client.i18n.LanguageSelectorPresenter;
 import org.ourproject.kune.workspace.client.i18n.LanguageSelectorView;
-import org.ourproject.kune.workspace.client.i18n.ui.I18nTranslatorPanel;
 import org.ourproject.kune.workspace.client.i18n.ui.LanguageSelectorPanel;
 import org.ourproject.kune.workspace.client.licensefoot.LicenseComponent;
 import org.ourproject.kune.workspace.client.licensefoot.LicensePresenter;
 import org.ourproject.kune.workspace.client.licensefoot.LicenseView;
 import org.ourproject.kune.workspace.client.licensefoot.ui.LicensePanel;
-import org.ourproject.kune.workspace.client.sitebar.bar.SiteBarListener;
 import org.ourproject.kune.workspace.client.ui.ctx.items.ContextItems;
 import org.ourproject.kune.workspace.client.ui.ctx.items.ContextItemsPanel;
 import org.ourproject.kune.workspace.client.ui.ctx.items.ContextItemsPresenter;
@@ -96,12 +89,6 @@
 	return presenter;
     }
 
-    @Deprecated
-    public static DesktopView createDesktop(final Workspace workspace, final SiteBarListener listener,
-	    final Session session) {
-	return new DesktopPanel(workspace, listener, session, i18n);
-    }
-
     public static TextEditor createDocumentEditor(final TextEditorListener listener) {
 	final TextEditorPresenter presenter = new TextEditorPresenter(listener, true);
 	final TextEditorPanel panel = new TextEditorPanel(presenter, i18n);
@@ -109,13 +96,6 @@
 	return presenter;
     }
 
-    public static I18nTranslatorComponent createI18nTranslatorComponent() {
-	final I18nTranslatorPresenter presenter = new I18nTranslatorPresenter(session);
-	final I18nTranslatorView view = new I18nTranslatorPanel(presenter, i18n);
-	presenter.init(view);
-	return presenter;
-    }
-
     public static LanguageSelectorComponent createLanguageSelectorComponent() {
 	final LanguageSelectorPresenter presenter = new LanguageSelectorPresenter(session);
 	final LanguageSelectorView view = new LanguageSelectorPanel(presenter, i18n);

Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/actions/i18n/DoTranslationAction.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/actions/i18n/DoTranslationAction.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/actions/i18n/DoTranslationAction.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -1,61 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2008 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.workspace.client.actions.i18n;
-
-import org.ourproject.kune.platf.client.dispatch.Action;
-import org.ourproject.kune.platf.client.dto.DoTranslationActionParams;
-import org.ourproject.kune.platf.client.rpc.I18nService;
-import org.ourproject.kune.platf.client.rpc.I18nServiceAsync;
-import org.ourproject.kune.platf.client.state.Session;
-import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
-import org.ourproject.kune.workspace.client.sitebar.Site;
-
-import com.google.gwt.user.client.rpc.AsyncCallback;
-
-public class DoTranslationAction implements Action<DoTranslationActionParams> {
-
-    private final Session session;
-    private final I18nUITranslationService i18n;
-
-    public DoTranslationAction(final Session session, final I18nUITranslationService i18n) {
-        this.session = session;
-        this.i18n = i18n;
-    }
-
-    public void execute(final DoTranslationActionParams params) {
-        onDoTranslationAction(params);
-    }
-
-    private void onDoTranslationAction(final DoTranslationActionParams params) {
-        Site.showProgressSaving();
-        final I18nServiceAsync server = I18nService.App.getInstance();
-        server.setTranslation(session.getUserHash(), params.getId(), params.getText(), new AsyncCallback<String>() {
-            public void onFailure(final Throwable caught) {
-                Site.hideProgress();
-                Site.error(i18n.t("Server error saving translation"));
-            }
-
-            public void onSuccess(final String result) {
-                Site.hideProgress();
-                i18n.setTranslationAfterSave(params.getTrKey(), result);
-            }
-        });
-    }
-}

Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/actions/i18n/GetLexiconAction.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/actions/i18n/GetLexiconAction.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/actions/i18n/GetLexiconAction.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -1,57 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2008 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.workspace.client.actions.i18n;
-
-import java.util.HashMap;
-
-import org.ourproject.kune.platf.client.dispatch.Action;
-import org.ourproject.kune.platf.client.rpc.I18nService;
-import org.ourproject.kune.platf.client.rpc.I18nServiceAsync;
-import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
-
-import com.allen_sauer.gwt.log.client.Log;
-import com.google.gwt.user.client.rpc.AsyncCallback;
-
-public class GetLexiconAction implements Action<String> {
-
-    private final I18nUITranslationService i18n;
-
-    public GetLexiconAction(final I18nUITranslationService i18n) {
-        this.i18n = i18n;
-    }
-
-    public void execute(final String value) {
-        onGetLexicon(value);
-    }
-
-    private void onGetLexicon(final String language) {
-        final I18nServiceAsync server = I18nService.App.getInstance();
-        server.getLexicon(language, new AsyncCallback<HashMap<String, String>>() {
-            public void onFailure(final Throwable caught) {
-                Log.debug("Workspace adaptation to your language failed");
-            }
-
-            public void onSuccess(final HashMap<String, String> result) {
-                i18n.setLexicon(result);
-            }
-        });
-
-    }
-}

Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/actions/i18n/GetTranslationAction.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/actions/i18n/GetTranslationAction.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/actions/i18n/GetTranslationAction.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -1,52 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2008 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.workspace.client.actions.i18n;
-
-import org.ourproject.kune.platf.client.dispatch.Action;
-import org.ourproject.kune.platf.client.dto.GetTranslationActionParams;
-import org.ourproject.kune.platf.client.rpc.I18nService;
-import org.ourproject.kune.platf.client.rpc.I18nServiceAsync;
-import org.ourproject.kune.platf.client.state.Session;
-
-import com.google.gwt.user.client.rpc.AsyncCallback;
-
-public class GetTranslationAction implements Action<GetTranslationActionParams> {
-    private final Session session;
-
-    public GetTranslationAction(final Session session) {
-        this.session = session;
-    }
-
-    public void execute(final GetTranslationActionParams params) {
-        onGetTranslation(params.getLanguage(), params.getText());
-    }
-
-    private void onGetTranslation(final String language, final String text) {
-        final I18nServiceAsync server = I18nService.App.getInstance();
-        server.getTranslation(session.getUserHash(), language, text, new AsyncCallback<String>() {
-            public void onFailure(final Throwable caught) {
-            }
-
-            public void onSuccess(final String result) {
-            }
-        });
-
-    }
-}

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/actions/i18n/ShowTranslatorAction.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/actions/i18n/ShowTranslatorAction.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/actions/i18n/ShowTranslatorAction.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -33,22 +33,22 @@
     private final I18nTranslationService i18n;
 
     public ShowTranslatorAction(final Session session, final Workspace workspace, final I18nTranslationService i18n) {
-        this.session = session;
-        this.workspace = workspace;
-        this.i18n = i18n;
+	this.session = session;
+	this.workspace = workspace;
+	this.i18n = i18n;
     }
 
     public void execute(final Object value) {
-        onShowTranslatorAction();
+	onShowTranslatorAction();
     }
 
     private void onShowTranslatorAction() {
-        Site.showProgressLoading();
-        if (session.isLogged()) {
-            workspace.getI18nTranslatorComponent().show();
-        } else {
-            Site.info(i18n.t("Sign in or register to help with translation"));
-        }
-        Site.hideProgress();
+	Site.showProgressLoading();
+	if (session.isLogged()) {
+	    // workspace.getI18nTranslatorComponent().show();
+	} else {
+	    Site.info(i18n.t("Sign in or register to help with translation"));
+	}
+	Site.hideProgress();
     }
 }

Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/I18nTranslator.java (from rev 792, trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/I18nTranslatorComponent.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/I18nTranslatorComponent.java	2008-07-06 13:51:18 UTC (rev 792)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/I18nTranslator.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -0,0 +1,26 @@
+/*
+ *
+ * Copyright (C) 2007-2008 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package org.ourproject.kune.workspace.client.i18n;
+
+public interface I18nTranslator {
+
+    void show();
+
+}

Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/I18nTranslatorComponent.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/I18nTranslatorComponent.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/I18nTranslatorComponent.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -1,28 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2008 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.workspace.client.i18n;
-
-import org.ourproject.kune.platf.client.Component;
-
-public interface I18nTranslatorComponent extends Component {
-
-    void show();
-
-}

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/I18nTranslatorPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/I18nTranslatorPresenter.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/I18nTranslatorPresenter.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -22,63 +22,81 @@
 import org.ourproject.kune.platf.client.PlatformEvents;
 import org.ourproject.kune.platf.client.View;
 import org.ourproject.kune.platf.client.dispatch.DefaultDispatcher;
-import org.ourproject.kune.platf.client.dto.DoTranslationActionParams;
 import org.ourproject.kune.platf.client.dto.I18nLanguageDTO;
 import org.ourproject.kune.platf.client.extend.ExtensibleWidgetChild;
 import org.ourproject.kune.platf.client.extend.ExtensibleWidgetId;
+import org.ourproject.kune.platf.client.rpc.I18nServiceAsync;
 import org.ourproject.kune.platf.client.state.Session;
 import org.ourproject.kune.workspace.client.WorkspaceEvents;
+import org.ourproject.kune.workspace.client.sitebar.Site;
 
-public class I18nTranslatorPresenter implements I18nTranslatorComponent {
+import com.google.gwt.user.client.rpc.AsyncCallback;
+
+public class I18nTranslatorPresenter implements I18nTranslator {
     private I18nTranslatorView view;
     private final Session session;
+    private final I18nServiceAsync i18nService;
+    private final I18nUITranslationService i18n;
 
-    public I18nTranslatorPresenter(final Session session) {
-        this.session = session;
+    public I18nTranslatorPresenter(final Session session, final I18nServiceAsync i18nService,
+	    final I18nUITranslationService i18n) {
+	this.session = session;
+	this.i18nService = i18nService;
+	this.i18n = i18n;
     }
 
-    public void init(final I18nTranslatorView view) {
-        this.view = view;
+    public void attachIconToBottomBar(final View view) {
+	DefaultDispatcher.getInstance().fire(PlatformEvents.ATTACH_TO_EXTENSIBLE_WIDGET,
+		new ExtensibleWidgetChild(ExtensibleWidgetId.CONTENT_BOTTOM_ICONBAR, view));
     }
 
-    public View getView() {
-        return view;
+    public void doClose() {
+	view.hide();
+	DefaultDispatcher.getInstance().fire(PlatformEvents.DETACH_FROM_EXTENSIBLE_WIDGET,
+		new ExtensibleWidgetChild(ExtensibleWidgetId.CONTENT_BOTTOM_ICONBAR, view));
     }
 
-    public Object[][] getLanguages() {
-        return session.getLanguagesArray();
+    public void doShowTranslator() {
+	DefaultDispatcher.getInstance().fire(WorkspaceEvents.SHOW_TRANSLATOR, null);
     }
 
-    public void show() {
-        view.show();
+    public void doTranslation(final String id, final String trKey, final String translation) {
+	Site.showProgressSaving();
+	i18nService.setTranslation(session.getUserHash(), id, translation, new AsyncCallback<String>() {
+	    public void onFailure(final Throwable caught) {
+		Site.hideProgress();
+		Site.error(i18n.t("Server error saving translation"));
+	    }
+
+	    public void onSuccess(final String result) {
+		Site.hideProgress();
+		i18n.setTranslationAfterSave(trKey, result);
+	    }
+	});
     }
 
-    public void hide() {
-        view.hide();
+    public I18nLanguageDTO getLanguage() {
+	return session.getCurrentLanguage();
     }
 
-    public void doClose() {
-        view.hide();
-        DefaultDispatcher.getInstance().fire(PlatformEvents.DETACH_FROM_EXTENSIBLE_WIDGET,
-                new ExtensibleWidgetChild(ExtensibleWidgetId.CONTENT_BOTTOM_ICONBAR, view));
+    public Object[][] getLanguages() {
+	return session.getLanguagesArray();
     }
 
-    public void doTranslation(final String id, final String trKey, final String translation) {
-        DefaultDispatcher.getInstance().fire(WorkspaceEvents.DO_TRANSLATION,
-                new DoTranslationActionParams(id, trKey, translation));
+    public View getView() {
+	return view;
     }
 
-    public I18nLanguageDTO getLanguage() {
-        return session.getCurrentLanguage();
+    public void hide() {
+	view.hide();
     }
 
-    public void doShowTranslator() {
-        DefaultDispatcher.getInstance().fire(WorkspaceEvents.SHOW_TRANSLATOR, null);
+    public void init(final I18nTranslatorView view) {
+	this.view = view;
     }
 
-    public void attachIconToBottomBar(final View view) {
-        DefaultDispatcher.getInstance().fire(PlatformEvents.ATTACH_TO_EXTENSIBLE_WIDGET,
-                new ExtensibleWidgetChild(ExtensibleWidgetId.CONTENT_BOTTOM_ICONBAR, view));
+    public void show() {
+	view.show();
     }
 
 }

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/I18nUITranslationService.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/I18nUITranslationService.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/I18nUITranslationService.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -21,19 +21,25 @@
 
 import java.util.HashMap;
 
-import org.ourproject.kune.platf.client.dispatch.DefaultDispatcher;
-import org.ourproject.kune.platf.client.dto.GetTranslationActionParams;
+import org.ourproject.kune.platf.client.dto.I18nLanguageDTO;
+import org.ourproject.kune.platf.client.rpc.I18nServiceAsync;
 import org.ourproject.kune.platf.client.services.I18nTranslationService;
+import org.ourproject.kune.platf.client.state.Session;
 import org.ourproject.kune.platf.client.ui.KuneStringUtils;
-import org.ourproject.kune.workspace.client.WorkspaceEvents;
+import org.ourproject.kune.platf.client.ui.Location;
+import org.ourproject.kune.platf.client.ui.WindowUtils;
 
 import com.allen_sauer.gwt.log.client.Log;
+import com.calclab.suco.client.signal.Slot0;
+import com.google.gwt.user.client.rpc.AsyncCallback;
 
 public class I18nUITranslationService extends I18nTranslationService {
     private HashMap<String, String> lexicon;
-    private String currentLanguage;
-
+    private String currentLanguageCode;
     private I18nChangeListenerCollection i18nChangeListeners;
+    private I18nLanguageDTO initialLang;
+    private I18nServiceAsync i18nService;
+    private Session session;
 
     /*
      * If a UI element need to be fired when (for instance) the language changes
@@ -41,45 +47,77 @@
      * direction, for instance.
      */
     public void addI18nChangeListener(final I18nChangeListener listener) {
-        if (i18nChangeListeners == null) {
-            i18nChangeListeners = new I18nChangeListenerCollection();
-        }
-        i18nChangeListeners.add(listener);
+	if (i18nChangeListeners == null) {
+	    i18nChangeListeners = new I18nChangeListenerCollection();
+	}
+	i18nChangeListeners.add(listener);
     }
 
     public void changeCurrentLanguage(final String newLanguage) {
-        if (!newLanguage.equals(this.currentLanguage)) {
-            setCurrentLanguage(newLanguage);
-            changeLocale(newLanguage);
-        }
+	if (!newLanguage.equals(this.currentLanguageCode)) {
+	    setCurrentLanguage(newLanguage);
+	    changeLocale(newLanguage);
+	}
     }
 
     public String getCurrentLanguage() {
-        return currentLanguage;
+	return currentLanguageCode;
     }
 
+    public I18nLanguageDTO getInitialLang() {
+	return initialLang;
+    }
+
     public HashMap<String, String> getLexicon() {
-        return lexicon;
+	return lexicon;
     }
 
+    public void init(final I18nServiceAsync i18nService, final Session session, final Slot0 onReady) {
+	this.i18nService = i18nService;
+	this.session = session;
+	final Location loc = WindowUtils.getLocation();
+	final String locale = loc.getParameter("locale");
+	i18nService.getInitialLanguage(locale, new AsyncCallback<I18nLanguageDTO>() {
+	    public void onFailure(final Throwable caught) {
+		Log.error("Workspace adaptation to your language failed");
+	    }
+
+	    public void onSuccess(final I18nLanguageDTO result) {
+		initialLang = result;
+		currentLanguageCode = initialLang.getCode();
+		session.setCurrentLanguage(initialLang);
+		i18nService.getLexicon(initialLang.getCode(), new AsyncCallback<HashMap<String, String>>() {
+		    public void onFailure(final Throwable caught) {
+			Log.error("Workspace adaptation to your language failed");
+		    }
+
+		    public void onSuccess(final HashMap<String, String> result) {
+			lexicon = result;
+			onReady.onEvent();
+		    }
+		});
+	    }
+	});
+    }
+
     public void removeI18nChangeListener(final I18nChangeListener listener) {
-        if (i18nChangeListeners != null) {
-            i18nChangeListeners.remove(listener);
-        }
+	if (i18nChangeListeners != null) {
+	    i18nChangeListeners.remove(listener);
+	}
     }
 
     public void setCurrentLanguage(final String newLanguage) {
-        this.currentLanguage = newLanguage;
+	this.currentLanguageCode = newLanguage;
     }
 
     public void setLexicon(final HashMap<String, String> lexicon) {
-        this.lexicon = lexicon;
-        fireI18nLanguageChange();
+	this.lexicon = lexicon;
+	fireI18nLanguageChange();
     }
 
     public void setTranslationAfterSave(final String text, final String translation) {
-        lexicon.put(text, translation);
-        fireI18nLanguageChange();
+	lexicon.put(text, translation);
+	fireI18nLanguageChange();
     }
 
     /**
@@ -94,22 +132,27 @@
      * @return text translated in the current language
      */
     public String t(final String text) {
-        String encodeText = KuneStringUtils.escapeHtmlLight(text);
-        String translation = lexicon.get(encodeText);
-        if (lexicon.containsKey(encodeText)) {
-            if (translation == UNTRANSLATED_VALUE) {
-                // Not translated but in db, return text
-                translation = removeNT(encodeText);
-            }
-        } else {
-            // Not translated and not in db, make a petition for translation
-            DefaultDispatcher.getInstance().fireDeferred(WorkspaceEvents.GET_TRANSLATION,
-                    new GetTranslationActionParams(this.currentLanguage, text));
-            Log.debug("Registering in db '" + text + "' as pending translation");
-            translation = removeNT(encodeText);
-            lexicon.put(encodeText, UNTRANSLATED_VALUE);
-        }
-        return decodeHtml(translation);
+	final String encodeText = KuneStringUtils.escapeHtmlLight(text);
+	String translation = lexicon.get(encodeText);
+	if (lexicon.containsKey(encodeText)) {
+	    if (translation == UNTRANSLATED_VALUE) {
+		// Not translated but in db, return text
+		translation = removeNT(encodeText);
+	    }
+	} else {
+	    // Not translated and not in db, make a petition for translation
+	    i18nService.getTranslation(session.getUserHash(), currentLanguageCode, text, new AsyncCallback<String>() {
+		public void onFailure(final Throwable caught) {
+		}
+
+		public void onSuccess(final String result) {
+		}
+	    });
+	    Log.debug("Registering in db '" + text + "' as pending translation");
+	    translation = removeNT(encodeText);
+	    lexicon.put(encodeText, UNTRANSLATED_VALUE);
+	}
+	return decodeHtml(translation);
     }
 
     /**
@@ -158,9 +201,9 @@
        }-*/;
 
     private void fireI18nLanguageChange() {
-        if (i18nChangeListeners != null) {
-            i18nChangeListeners.fireI18nLanguageChange();
-        }
+	if (i18nChangeListeners != null) {
+	    i18nChangeListeners.fireI18nLanguageChange();
+	}
     }
 
 }

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/bar/SiteBarPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/bar/SiteBarPresenter.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/bar/SiteBarPresenter.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -36,12 +36,10 @@
     private final SiteBarListener listener;
     private String previousToken;
     private final Session session;
-    private final I18nTranslationService i18n;
 
     public SiteBarPresenter(final SiteBarListener listener, final Session session, final I18nTranslationService i18n) {
 	this.listener = listener;
 	this.session = session;
-	this.i18n = i18n;
     }
 
     public void changeState(final StateToken token) {

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ui/ParticipationSummaryPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ui/ParticipationSummaryPanel.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ui/ParticipationSummaryPanel.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -39,12 +39,13 @@
     public ParticipationSummaryPanel(final ParticipationSummaryPresenter presenter, final I18nTranslationService i18n,
 	    final WorkspaceSkeleton ws) {
 	super(true);
-	super.setHeaderText(i18n.t("Participates as..."));
+	// super.setHeaderText(i18n.t("Participates as..."));
+	super.setHeaderText(i18n.t("Participates in..."));
 	super.setHeaderTitle(i18n.t("Groups in which participates"));
 	super.setBorderStylePrimaryName("k-dropdownouter-part");
 	super.addStyleName("kune-Margin-Medium-t");
-	gridMenuPanel = new GridMenuPanel<GroupDTO>(i18n.t("This user is not member of any group"), true, false, false,
-		false, false);
+	gridMenuPanel = new GridMenuPanel<GroupDTO>(i18n.t("This user is not member of any group"), false, false,
+		false, false, false);
 	final EntitySummary entitySummary = ws.getEntitySummary();
 	entitySummary.addInSummary(this);
 	entitySummary.addListener(new ContainerListenerAdapter() {

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/WorkspaceManager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/WorkspaceManager.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/WorkspaceManager.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -31,8 +31,8 @@
     private final Provider<ParticipationSummary> participationSummaryProvider;
     private final Provider<GroupSummary> groupSummaryProvider;
     private final SitePublicSpaceLink publicSpaceLink;
-    private final RateIt rateIt;
-    private final RatePresenter ratePresenter;
+    private final Provider<RateIt> rateItProvider;
+    private final Provider<RatePresenter> ratePresenterProvider;
 
     public WorkspaceManager(final SitePublicSpaceLink publicSpaceLink, final EntityLogo entityLogo,
 	    final EntityTitlePresenter entityTitlePresenter, final EntitySubTitlePresenter entitySubTitlePresenter,
@@ -40,7 +40,7 @@
 	    final Provider<GroupMembersSummary> groupMembersSummaryProvider,
 	    final Provider<ParticipationSummary> participationSummaryProvider,
 	    final Provider<TagsSummary> tagsSummaryProvider, final Provider<GroupSummary> groupSummaryProvider,
-	    final RateIt rateIt, final RatePresenter ratePresenter) {
+	    final Provider<RateIt> rateItProvider, final Provider<RatePresenter> rateProvider) {
 	this.publicSpaceLink = publicSpaceLink;
 	this.entityLogo = entityLogo;
 	this.entityTitlePresenter = entityTitlePresenter;
@@ -51,8 +51,8 @@
 	this.participationSummaryProvider = participationSummaryProvider;
 	this.tagsProvider = tagsSummaryProvider;
 	this.groupSummaryProvider = groupSummaryProvider;
-	this.rateIt = rateIt;
-	this.ratePresenter = ratePresenter;
+	this.rateItProvider = rateItProvider;
+	this.ratePresenterProvider = rateProvider;
 	wsThemePresenter.onThemeChanged(new Slot2<WsTheme, WsTheme>() {
 	    public void onEvent(final WsTheme oldTheme, final WsTheme newTheme) {
 		entityLogo.setTheme(oldTheme, newTheme);
@@ -82,8 +82,8 @@
 	groupSummaryProvider.get().setState(state);
 	tagsProvider.get().setState(state);
 	wsThemePresenter.setState(state);
-	rateIt.setState(state);
-	ratePresenter.setState(state);
+	rateItProvider.get().setState(state);
+	ratePresenterProvider.get().setState(state);
     }
 
 }

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitenewgroup/SiteNewGroupLinkPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitenewgroup/SiteNewGroupLinkPanel.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitenewgroup/SiteNewGroupLinkPanel.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -15,5 +15,7 @@
 	newGroupHyperlink.setTargetHistoryToken(SiteToken.newgroup.toString());
 	ws.getSiteBar().addSeparator();
 	ws.getSiteBar().add(newGroupHyperlink);
+	ws.getSiteBar().addSpacer();
+	ws.getSiteBar().addSpacer();
     }
 }

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitepublic/SitePublicSpaceLinkPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitepublic/SitePublicSpaceLinkPanel.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitepublic/SitePublicSpaceLinkPanel.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -39,7 +39,8 @@
 	});
 	gotoPublic.setTitle(i18n.t("Leave the workspace and go to the public space of this group")
 		+ Site.IN_DEVELOPMENT);
-	gotoPublic.addStyleName("kune-SiteBarPanel-LabelLink");
+	gotoPublic.addStyleName("k-sitebar-labellink");
+	contentNoPublic.addStyleName("k-sitebar-labellink");
     }
 
     public void setContentGotoPublicUrl(final String publicUrl) {

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitesign/SiteSignInLinkPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitesign/SiteSignInLinkPanel.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitesign/SiteSignInLinkPanel.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -5,10 +5,8 @@
 import org.ourproject.kune.workspace.client.ui.newtmp.skel.WorkspaceSkeleton;
 
 import com.google.gwt.user.client.ui.Hyperlink;
-import com.gwtext.client.widgets.ToolbarButton;
 
 public class SiteSignInLinkPanel implements SiteSignInLinkView {
-    private final ToolbarButton loggedUserMenu;
     private final Hyperlink signInHyperlink;
 
     public SiteSignInLinkPanel(final SiteSignInLinkPresenter presenter, final I18nUITranslationService i18n,
@@ -16,22 +14,10 @@
 	signInHyperlink = new Hyperlink();
 	signInHyperlink.setText(i18n.t("Sign in to collaborate"));
 	signInHyperlink.setTargetHistoryToken(SiteToken.signin.toString());
-	loggedUserMenu = new ToolbarButton("user");
 	ws.getSiteBar().add(signInHyperlink);
-	// ws.getEntityWorkspace().setContainer(loggedUserMenu);
-	// loggedUserMenu.render(loggedUserMenu.getElement());
     }
 
-    public void setLoggedUserMenuVisible(final boolean visible) {
-	loggedUserMenu.setVisible(visible);
-    }
-
-    public void setLoggedUserName(final String name, final String homePage) {
-	loggedUserMenu.setText(name);
-    }
-
-    public void setVisibleSignInLink(final boolean visible) {
+    public void setVisible(final boolean visible) {
 	signInHyperlink.setVisible(visible);
     }
-
 }

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitesign/SiteSignInLinkPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitesign/SiteSignInLinkPresenter.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitesign/SiteSignInLinkPresenter.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -13,13 +13,12 @@
     public SiteSignInLinkPresenter(final Session session) {
 	session.onUserSignIn(new Slot<UserInfoDTO>() {
 	    public void onEvent(final UserInfoDTO user) {
-		doAfterSignIn(user);
+		view.setVisible(false);
 	    }
 	});
 	session.onUserSignOut(new Slot<Object>() {
 	    public void onEvent(final Object parameter) {
-		setLogged(false);
-		view.setLoggedUserName("", "");
+		view.setVisible(true);
 	    }
 	});
     }
@@ -30,21 +29,7 @@
 
     public void init(final SiteSignInLinkView view) {
 	this.view = view;
-	setLogged(false);
+	view.setVisible(false);
     }
 
-    private void doAfterSignIn(final UserInfoDTO user) {
-	if (user == null) {
-	    setLogged(false);
-	} else {
-	    setLogged(true);
-	    view.setLoggedUserName(user.getShortName(), user.getHomePage());
-	}
-    }
-
-    private void setLogged(boolean logged) {
-	view.setVisibleSignInLink(!logged);
-	view.setLoggedUserMenuVisible(logged);
-    }
-
 }

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitesign/SiteSignInLinkView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitesign/SiteSignInLinkView.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitesign/SiteSignInLinkView.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -4,10 +4,6 @@
 
 public interface SiteSignInLinkView extends View {
 
-    void setLoggedUserMenuVisible(boolean visible);
+    void setVisible(boolean visible);
 
-    void setLoggedUserName(String shortName, String homePage);
-
-    void setVisibleSignInLink(boolean visible);
-
 }

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitesign/SiteSignOutLinkPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitesign/SiteSignOutLinkPanel.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitesign/SiteSignOutLinkPanel.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -16,7 +16,7 @@
 	    final WorkspaceSkeleton ws) {
 	signOutLabel = new Label();
 	signOutLabel.setText(i18n.t("Sign out"));
-	signOutLabel.addStyleName("kune-SiteBarPanel-LabelLink");
+	signOutLabel.addStyleName("k-sitebar-labellink");
 	ws.getSiteBar().add(signOutLabel);
 	signOutLabel.addClickListener(new ClickListener() {
 	    public void onClick(final Widget arg0) {

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitesign/SiteSignOutLinkPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitesign/SiteSignOutLinkPresenter.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitesign/SiteSignOutLinkPresenter.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -28,7 +28,7 @@
 	this.session = session;
 	this.userServiceProvider = userServiceProvider;
 	session.onUserSignIn(new Slot<UserInfoDTO>() {
-	    public void onEvent(final UserInfoDTO parameter) {
+	    public void onEvent(final UserInfoDTO userInfoDTO) {
 		view.setVisible(true);
 	    }
 	});

Added: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/siteusermenu/SiteUserMenu.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/siteusermenu/SiteUserMenu.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/siteusermenu/SiteUserMenu.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -0,0 +1,5 @@
+package org.ourproject.kune.workspace.client.ui.newtmp.sitebar.siteusermenu;
+
+public interface SiteUserMenu {
+
+}

Added: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/siteusermenu/SiteUserMenuPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/siteusermenu/SiteUserMenuPanel.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/siteusermenu/SiteUserMenuPanel.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -0,0 +1,43 @@
+package org.ourproject.kune.workspace.client.ui.newtmp.sitebar.siteusermenu;
+
+import java.util.List;
+
+import org.ourproject.kune.platf.client.dto.LinkDTO;
+import org.ourproject.kune.workspace.client.ui.newtmp.skel.WorkspaceSkeleton;
+
+import com.google.gwt.user.client.ui.ClickListener;
+import com.google.gwt.user.client.ui.PushButton;
+import com.google.gwt.user.client.ui.Widget;
+import com.gwtext.client.widgets.menu.Menu;
+
+public class SiteUserMenuPanel implements SiteUserMenuView {
+
+    private final PushButton loggedUserMenu;
+    private final Widget separator;
+    private final Menu userMenu;
+
+    public SiteUserMenuPanel(final SiteUserMenuPresenter presenter, final WorkspaceSkeleton ws) {
+	loggedUserMenu = new PushButton("");
+	ws.getSiteBar().add(loggedUserMenu);
+	separator = ws.getSiteBar().addSeparator();
+	userMenu = new Menu();
+	loggedUserMenu.addClickListener(new ClickListener() {
+	    public void onClick(final Widget sender) {
+		userMenu.showAt(sender.getAbsoluteLeft(), sender.getAbsoluteTop());
+	    }
+	});
+    }
+
+    public void setLoggedUserName(final String name) {
+	loggedUserMenu.setText(name);
+    }
+
+    public void setUseGroupsIsMember(final List<LinkDTO> groupsIsAdmin, final List<LinkDTO> groupsIsCollab) {
+	// TODO Auto-generated method stub
+    }
+
+    public void setVisible(final boolean visible) {
+	loggedUserMenu.setVisible(visible);
+	separator.setVisible(visible);
+    }
+}

Added: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/siteusermenu/SiteUserMenuPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/siteusermenu/SiteUserMenuPresenter.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/siteusermenu/SiteUserMenuPresenter.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -0,0 +1,37 @@
+package org.ourproject.kune.workspace.client.ui.newtmp.sitebar.siteusermenu;
+
+import org.ourproject.kune.platf.client.View;
+import org.ourproject.kune.platf.client.dto.UserInfoDTO;
+import org.ourproject.kune.platf.client.state.Session;
+
+import com.calclab.suco.client.signal.Slot;
+
+public class SiteUserMenuPresenter implements SiteUserMenu {
+
+    private SiteUserMenuView view;
+
+    public SiteUserMenuPresenter(final Session session) {
+	session.onUserSignIn(new Slot<UserInfoDTO>() {
+	    public void onEvent(final UserInfoDTO userInfoDTO) {
+		view.setVisible(true);
+		view.setLoggedUserName(userInfoDTO.getShortName());
+		view.setUseGroupsIsMember(userInfoDTO.getGroupsIsAdmin(), userInfoDTO.getGroupsIsCollab());
+	    }
+	});
+	session.onUserSignOut(new Slot<Object>() {
+	    public void onEvent(final Object parameter) {
+		view.setVisible(false);
+		view.setLoggedUserName("");
+	    }
+	});
+    }
+
+    public View getView() {
+	return view;
+    }
+
+    public void init(final SiteUserMenuView view) {
+	this.view = view;
+    }
+
+}

Added: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/siteusermenu/SiteUserMenuView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/siteusermenu/SiteUserMenuView.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/siteusermenu/SiteUserMenuView.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -0,0 +1,16 @@
+package org.ourproject.kune.workspace.client.ui.newtmp.sitebar.siteusermenu;
+
+import java.util.List;
+
+import org.ourproject.kune.platf.client.View;
+import org.ourproject.kune.platf.client.dto.LinkDTO;
+
+public interface SiteUserMenuView extends View {
+
+    void setLoggedUserName(String name);
+
+    void setUseGroupsIsMember(List<LinkDTO> groupsIsAdmin, List<LinkDTO> groupsIsCollab);
+
+    void setVisible(boolean visible);
+
+}

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/skel/EntityWorkspace.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/skel/EntityWorkspace.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/skel/EntityWorkspace.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -65,10 +65,10 @@
 	contentBottomBar = new Toolbar();
 	containerTopBar = new Toolbar();
 	containerBottomBar = new Toolbar();
-	contentTopBar.addClass("k-toolbar-bottom-line");
-	contentBottomBar.addClass("k-toolbar-top-line");
-	containerTopBar.addClass("k-toolbar-bottom-line");
-	containerBottomBar.addClass("k-toolbar-top-line");
+	contentTopBar.addStyleName("k-toolbar-bottom-line");
+	contentBottomBar.addStyleName("k-toolbar-top-line");
+	containerTopBar.addStyleName("k-toolbar-bottom-line");
+	containerBottomBar.addStyleName("k-toolbar-top-line");
 	contentWrap.add(contentTopBar.getPanel(), Position.NORTH, false, DEF_TOOLBAR_HEIGHT);
 	containerWrap.add(containerTopBar.getPanel(), Position.NORTH, false, DEF_TOOLBAR_HEIGHT);
 	contentWrap.add(content, Position.CENTER);

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/skel/SiteBar.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/skel/SiteBar.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/skel/SiteBar.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -18,16 +18,16 @@
 	titleBar.add(widget);
     }
 
-    public void addFill() {
-	titleBar.addFill();
+    public Widget addFill() {
+	return titleBar.addFill();
     }
 
-    public void addSeparator() {
-	titleBar.addSeparator();
+    public Widget addSeparator() {
+	return titleBar.addSeparator();
     }
 
-    public void addSpacer() {
-	titleBar.addSpacer();
+    public Widget addSpacer() {
+	return titleBar.addSpacer();
     }
 
 }

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/skel/TitleBar.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/skel/TitleBar.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/skel/TitleBar.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -1,5 +1,48 @@
 package org.ourproject.kune.workspace.client.ui.newtmp.skel;
 
-public class TitleBar extends AbstractBar {
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.HorizontalPanel;
+import com.google.gwt.user.client.ui.Label;
+import com.google.gwt.user.client.ui.VerticalPanel;
+import com.google.gwt.user.client.ui.Widget;
 
-}
+public class TitleBar extends Composite {
+
+    private final HorizontalPanel childPanel;
+    private final HorizontalPanel mainPanel;
+
+    public TitleBar() {
+	mainPanel = new HorizontalPanel();
+	childPanel = new HorizontalPanel();
+	mainPanel.add(childPanel);
+	initWidget(mainPanel);
+	mainPanel.setWidth("100%");
+    }
+
+    public void add(final Widget widget) {
+	childPanel.add(widget);
+	childPanel.setCellVerticalAlignment(widget, VerticalPanel.ALIGN_MIDDLE);
+    }
+
+    public Widget addFill() {
+	final Label emptyLabel = new Label("");
+	this.add(emptyLabel);
+	childPanel.setCellWidth(emptyLabel, "100%");
+	return emptyLabel;
+    }
+
+    public Widget addSeparator() {
+	final Label emptyLabel = new Label("");
+	emptyLabel.setStyleName("ytb-sep");
+	emptyLabel.addStyleName("k-toolbar-sep");
+	this.add(emptyLabel);
+	return emptyLabel;
+    }
+
+    public Widget addSpacer() {
+	final Label emptyLabel = new Label("");
+	emptyLabel.setStyleName("ytb-spacer");
+	this.add(emptyLabel);
+	return emptyLabel;
+    }
+}
\ No newline at end of file

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/skel/Toolbar.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/skel/Toolbar.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/skel/Toolbar.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -2,12 +2,14 @@
 
 import org.ourproject.kune.platf.client.ui.DefaultBorderLayout;
 
+import com.google.gwt.user.client.ui.HorizontalPanel;
+import com.google.gwt.user.client.ui.Label;
 import com.google.gwt.user.client.ui.Widget;
 import com.gwtext.client.widgets.Panel;
 
 public class Toolbar {
     private final Panel container;
-    private final AbstractBar horPanel;
+    private final HorizontalPanel childPanel;
 
     public Toolbar() {
 	container = new Panel();
@@ -18,31 +20,41 @@
 	container.setHeader(false);
 	container.setBaseCls("x-toolbar");
 	container.addClass("x-panel");
-	horPanel = new AbstractBar();
-	container.add(horPanel);
+	childPanel = new HorizontalPanel();
+	container.add(childPanel);
     }
 
     public void add(final Widget widget) {
-	horPanel.add(widget);
+	childPanel.add(widget);
 	if (container.isRendered()) {
 	    container.doLayout(false);
 	}
     }
 
-    public void addClass(final String cls) {
-	container.addClass(cls);
+    public Widget addFill() {
+	final Label emptyLabel = new Label("");
+	this.add(emptyLabel);
+	childPanel.setCellWidth(emptyLabel, "100%");
+	return emptyLabel;
     }
 
-    public void addFill() {
-	horPanel.addFill();
+    public Widget addSeparator() {
+	final Label emptyLabel = new Label("");
+	emptyLabel.setStyleName("ytb-sep");
+	emptyLabel.addStyleName("k-toolbar-sep");
+	this.add(emptyLabel);
+	return emptyLabel;
     }
 
-    public void addSeparator() {
-	horPanel.addSeparator();
+    public Widget addSpacer() {
+	final Label emptyLabel = new Label("");
+	emptyLabel.setStyleName("ytb-spacer");
+	this.add(emptyLabel);
+	return emptyLabel;
     }
 
-    public void addSpacer() {
-	horPanel.addSpacer();
+    public void addStyleName(final String cls) {
+	container.addClass(cls);
     }
 
     public Panel getPanel() {

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/skel/WorkspaceSkeleton.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/skel/WorkspaceSkeleton.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/skel/WorkspaceSkeleton.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -3,6 +3,7 @@
 import org.ourproject.kune.platf.client.ui.DefaultBorderLayout;
 import org.ourproject.kune.workspace.client.ui.newtmp.themes.WsTheme;
 
+import com.google.gwt.user.client.ui.Label;
 import com.google.gwt.user.client.ui.RootPanel;
 import com.gwtext.client.core.ExtElement;
 import com.gwtext.client.widgets.MessageBox;
@@ -30,6 +31,8 @@
 	mainPanel.add(sitebar, DefaultBorderLayout.Position.NORTH, DefaultBorderLayout.DEF_TOOLBAR_HEIGHT);
 	mainPanel.add(entity.getPanel(), DefaultBorderLayout.Position.CENTER);
 	container.add(mainPanel.getPanel());
+	getEntityWorkspace().getContentTopBar().add(new Label("Sorry, kune workspace under heavy refactorization"));
+	new Viewport(container);
     }
 
     public Panel getEntityMainHeader() {
@@ -64,10 +67,6 @@
 	entity.setTheme(oldTheme, newTheme);
     }
 
-    public void show() {
-	new Viewport(container);
-    }
-
     public void showAlertMessage(final String title, final String message) {
 	MessageBox.alert(title, message, new MessageBox.AlertCallback() {
 	    public void execute() {

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/Workspace.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/Workspace.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/Workspace.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -26,7 +26,6 @@
 import org.ourproject.kune.platf.client.extend.ExtensibleWidgetChild;
 import org.ourproject.kune.platf.client.tool.ClientTool;
 import org.ourproject.kune.workspace.client.component.WorkspaceComponent;
-import org.ourproject.kune.workspace.client.i18n.I18nTranslatorComponent;
 import org.ourproject.kune.workspace.client.licensefoot.LicenseComponent;
 
 public interface Workspace extends Component {
@@ -53,8 +52,6 @@
 
     public ContentTitleComponent getContentTitleComponent();
 
-    public I18nTranslatorComponent getI18nTranslatorComponent();
-
     public LicenseComponent getLicenseComponent();
 
     public void setContent(WorkspaceComponent contentComponent);

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/WorkspacePresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/WorkspacePresenter.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/WorkspacePresenter.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -32,7 +32,6 @@
 import org.ourproject.kune.platf.client.tool.ClientTool;
 import org.ourproject.kune.workspace.client.WorkspaceEvents;
 import org.ourproject.kune.workspace.client.component.WorkspaceComponent;
-import org.ourproject.kune.workspace.client.i18n.I18nTranslatorComponent;
 import org.ourproject.kune.workspace.client.licensefoot.LicenseComponent;
 
 import com.google.gwt.user.client.ui.Widget;
@@ -96,10 +95,6 @@
 	return components.getContentTitleComponent();
     }
 
-    public I18nTranslatorComponent getI18nTranslatorComponent() {
-	return components.getI18nTranslatorComponent();
-    }
-
     public LicenseComponent getLicenseComponent() {
 	return components.getLicenseComponent();
     }

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/WorkspaceUIComponents.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/WorkspaceUIComponents.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/WorkspaceUIComponents.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -21,7 +21,6 @@
 package org.ourproject.kune.workspace.client.workspace;
 
 import org.ourproject.kune.workspace.client.WorkspaceFactory;
-import org.ourproject.kune.workspace.client.i18n.I18nTranslatorComponent;
 import org.ourproject.kune.workspace.client.licensefoot.LicenseComponent;
 
 public class WorkspaceUIComponents {
@@ -29,7 +28,6 @@
     private ContentTitleComponent contentTitle;
     private ContentSubTitleComponent contentSubTitle;
     private ContentToolBarComponent contentToolBar;
-    private I18nTranslatorComponent i18nTranslatorSearch;
 
     public WorkspaceUIComponents(final WorkspacePresenter presenter) {
     }
@@ -55,13 +53,6 @@
 	return contentToolBar;
     }
 
-    public I18nTranslatorComponent getI18nTranslatorComponent() {
-	if (i18nTranslatorSearch == null) {
-	    i18nTranslatorSearch = WorkspaceFactory.createI18nTranslatorComponent();
-	}
-	return i18nTranslatorSearch;
-    }
-
     public LicenseComponent getLicenseComponent() {
 	if (license == null) {
 	    license = WorkspaceFactory.createLicenseComponent();

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/WorkspacePanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/WorkspacePanel.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/WorkspacePanel.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -25,7 +25,6 @@
 import org.ourproject.kune.platf.client.services.I18nTranslationService;
 import org.ourproject.kune.platf.client.services.Images;
 import org.ourproject.kune.platf.client.tool.ToolTrigger;
-import org.ourproject.kune.platf.client.ui.DropDownPanel;
 import org.ourproject.kune.platf.client.ui.RoundedBorderDecorator;
 import org.ourproject.kune.platf.client.ui.SplitterListener;
 import org.ourproject.kune.platf.client.ui.gwtcustom.CustomHorizontalSplitPanel;
@@ -60,9 +59,6 @@
     private final VerticalPanel groupDropDownsVP;
     private final RoundedBorderDecorator contentTitleBarBorderDec;
     private final RoundedBorderDecorator bottomBorderDecorator;
-    private DropDownPanel groupMembersPanel;
-    private DropDownPanel participationPanel;
-    private DropDownPanel groupSummaryPanel;
     private final VerticalPanel cntcxtVP;
     private final ScrollPanel groupDropDownsSP;
     private final BottomIconsTrayPanel bottomIconsTrayPanel;
@@ -74,7 +70,6 @@
     private final HorizontalPanel contentBottomToolBarHP;
     private ContentBottomToolBarPanel contentBottomToolBarPanel;
     private LicensePanel bottomPanel;
-    private DropDownPanel tagsPanel;
 
     private int previousRightWidgetWidth;
     private final WorkspacePresenter presenter;
@@ -276,12 +271,12 @@
     }
 
     public void setGroupMembers(final View view) {
-	groupMembersPanel = (DropDownPanel) view;
+	// groupMembersPanel = (DropDownPanel) view;
 	// AddDropDown(groupMembersPanel, colorTheme.getGroupMembersDD());
     }
 
     public void setParticipation(final View view) {
-	participationPanel = (DropDownPanel) view;
+	// participationPanel = (DropDownPanel) view;
 	// AddDropDown(participationPanel, colorTheme.getParticipationDD());
     }
 
@@ -290,12 +285,12 @@
     }
 
     public void setSummary(final View view) {
-	groupSummaryPanel = (DropDownPanel) view;
+	// groupSummaryPanel = (DropDownPanel) view;
 	// AddDropDown(groupSummaryPanel, colorTheme.getSummaryDD());
     }
 
     public void setTags(final View view) {
-	tagsPanel = (DropDownPanel) view;
+	// tagsPanel = (DropDownPanel) view;
 	// AddDropDown(tagsPanel, colorTheme.getTagsDD());
     }
 
@@ -343,12 +338,6 @@
 	super.setVisible(visible);
     }
 
-    private void AddDropDown(final DropDownPanel panel, final String color) {
-	groupDropDownsVP.add(panel);
-	panel.setWidth("145px");
-	// panel.setColor(color);
-    }
-
     private void adjustSizeContentSP() {
 	final int width = cntcxtHSP.getLeftWidgetAvailableWidth() - 2;
 	final int height = cntcxtHSP.getOffsetHeight() - 29 - contentToolBarHP.getOffsetHeight();

Modified: trunk/src/main/resources/dozerBeanMapping.xml
===================================================================
--- trunk/src/main/resources/dozerBeanMapping.xml	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/main/resources/dozerBeanMapping.xml	2008-07-31 13:28:16 UTC (rev 822)
@@ -307,5 +307,14 @@
       <b>abuseInformersCount</b>
     </field>
   </mapping>
+  
+  <mapping>
+    <class-a>org.ourproject.kune.platf.client.dto.LinkDTO</class-a>
+    <class-b>org.ourproject.kune.platf.server.domain.User</class-b>
+    <field>
+      <a>longName</a>
+      <b>name</b>
+	</field>
+  </mapping>
 
 </mappings>
\ No newline at end of file

Modified: trunk/src/test/java/org/ourproject/kune/platf/server/mapper/MapperTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/mapper/MapperTest.java	2008-07-28 02:23:02 UTC (rev 821)
+++ trunk/src/test/java/org/ourproject/kune/platf/server/mapper/MapperTest.java	2008-07-31 13:28:16 UTC (rev 822)
@@ -44,199 +44,207 @@
 
     @Before
     public void inject() {
-        TestHelper.inject(this);
+	TestHelper.inject(this);
     }
 
     @Test
     public void testCommentMapper() {
-        final Content d = createTestContent();
-        Comment comment = new Comment();
-        comment.setContent(d);
-        comment.setText("Some text");
-        User user = new User();
-        comment.addPositiveVoter(user);
-        comment.addPositiveVoter(user);
-        CommentDTO commentDTO = mapper.map(comment, CommentDTO.class);
-        assertEquals(0, commentDTO.getNegativeVotersCount());
-        assertEquals(0, commentDTO.getAbuseInformersCount());
-        assertEquals(1, commentDTO.getPositiveVotersCount());
-        comment.addNegativeVoter(user);
-        comment.addNegativeVoter(user);
-        commentDTO = mapper.map(comment, CommentDTO.class);
-        assertEquals(1, commentDTO.getNegativeVotersCount());
-        assertEquals(0, commentDTO.getAbuseInformersCount());
-        assertEquals(0, commentDTO.getPositiveVotersCount());
-        comment.addAbuseInformer(user);
-        comment.addAbuseInformer(user);
-        commentDTO = mapper.map(comment, CommentDTO.class);
-        assertEquals(1, commentDTO.getNegativeVotersCount());
-        assertEquals(1, commentDTO.getAbuseInformersCount());
-        assertEquals(0, commentDTO.getPositiveVotersCount());
-        Comment childComment = new Comment();
-        childComment.setContent(d);
-        childComment.setParent(comment);
-        comment.getChilds().add(childComment);
-        commentDTO = mapper.map(comment, CommentDTO.class);
-        CommentDTO childCommentDTO = mapper.map(childComment, CommentDTO.class);
-        assertEquals(1, comment.getChilds().size());
-        assertEquals(commentDTO, childCommentDTO.getParent());
+	final Content d = createTestContent();
+	final Comment comment = new Comment();
+	comment.setContent(d);
+	comment.setText("Some text");
+	final User user = new User();
+	comment.addPositiveVoter(user);
+	comment.addPositiveVoter(user);
+	CommentDTO commentDTO = mapper.map(comment, CommentDTO.class);
+	assertEquals(0, commentDTO.getNegativeVotersCount());
+	assertEquals(0, commentDTO.getAbuseInformersCount());
+	assertEquals(1, commentDTO.getPositiveVotersCount());
+	comment.addNegativeVoter(user);
+	comment.addNegativeVoter(user);
+	commentDTO = mapper.map(comment, CommentDTO.class);
+	assertEquals(1, commentDTO.getNegativeVotersCount());
+	assertEquals(0, commentDTO.getAbuseInformersCount());
+	assertEquals(0, commentDTO.getPositiveVotersCount());
+	comment.addAbuseInformer(user);
+	comment.addAbuseInformer(user);
+	commentDTO = mapper.map(comment, CommentDTO.class);
+	assertEquals(1, commentDTO.getNegativeVotersCount());
+	assertEquals(1, commentDTO.getAbuseInformersCount());
+	assertEquals(0, commentDTO.getPositiveVotersCount());
+	final Comment childComment = new Comment();
+	childComment.setContent(d);
+	childComment.setParent(comment);
+	comment.getChilds().add(childComment);
+	commentDTO = mapper.map(comment, CommentDTO.class);
+	final CommentDTO childCommentDTO = mapper.map(childComment, CommentDTO.class);
+	assertEquals(1, comment.getChilds().size());
+	assertEquals(commentDTO, childCommentDTO.getParent());
     }
 
     @Test
     public void testContentDescriptorMapping() {
-        final Content d = new Content();
-        d.setId(1l);
-        final Revision revision = new Revision(d);
-        revision.setTitle("title");
-        d.addRevision(revision);
+	final Content d = new Content();
+	d.setId(1l);
+	final Revision revision = new Revision(d);
+	revision.setTitle("title");
+	d.addRevision(revision);
 
-        final ContentDTO dto = mapper.map(d, ContentDTO.class);
-        assertEquals(1, (long) dto.getId());
-        assertEquals("title", dto.getTitle());
+	final ContentDTO dto = mapper.map(d, ContentDTO.class);
+	assertEquals(1, (long) dto.getId());
+	assertEquals("title", dto.getTitle());
     }
 
     @Test
     public void testContentDescriptorToLinkMapping() {
-        final Content d = createTestContent();
+	final Content d = createTestContent();
 
-        final LinkDTO dto = mapper.map(d, LinkDTO.class);
-        assertEquals("title", dto.getLongName());
-        assertEquals("grouptest", dto.getShortName());
-        assertEquals("grouptest.docs.1.1", dto.getLink());
+	final LinkDTO dto = mapper.map(d, LinkDTO.class);
+	assertEquals("title", dto.getLongName());
+	assertEquals("grouptest", dto.getShortName());
+	assertEquals("grouptest.docs.1.1", dto.getLink());
     }
 
     @Test
     public void testContentMapping() {
-        final State c = new State();
-        c.setContentRights(new AccessRights(true, true, true));
-        final Group groupAdmins = TestDomainHelper.createGroup(1);
-        final Group groupEdit = TestDomainHelper.createGroup(2);
-        final Group groupView = TestDomainHelper.createGroup(3);
-        c.setAccessLists(TestDomainHelper.createAccessLists(groupAdmins, groupEdit, groupView));
-        c.setRate(10.2d);
-        c.setRateByUsers(3l);
-        c.setCurrentUserRate(null);
+	final State c = new State();
+	c.setContentRights(new AccessRights(true, true, true));
+	final Group groupAdmins = TestDomainHelper.createGroup(1);
+	final Group groupEdit = TestDomainHelper.createGroup(2);
+	final Group groupView = TestDomainHelper.createGroup(3);
+	c.setAccessLists(TestDomainHelper.createAccessLists(groupAdmins, groupEdit, groupView));
+	c.setRate(10.2d);
+	c.setRateByUsers(3l);
+	c.setCurrentUserRate(null);
 
-        final StateDTO dto = mapper.map(c, StateDTO.class);
-        assertEquals(c.getContentRights().isAdministrable(), dto.getContentRights().isAdministrable());
+	final StateDTO dto = mapper.map(c, StateDTO.class);
+	assertEquals(c.getContentRights().isAdministrable(), dto.getContentRights().isAdministrable());
 
-        assertValidAccessListsMapping(c.getAccessLists().getAdmins(), dto.getAccessLists().getAdmins());
-        assertValidAccessListsMapping(c.getAccessLists().getEditors(), dto.getAccessLists().getEditors());
-        assertValidAccessListsMapping(c.getAccessLists().getViewers(), dto.getAccessLists().getViewers());
+	assertValidAccessListsMapping(c.getAccessLists().getAdmins(), dto.getAccessLists().getAdmins());
+	assertValidAccessListsMapping(c.getAccessLists().getEditors(), dto.getAccessLists().getEditors());
+	assertValidAccessListsMapping(c.getAccessLists().getViewers(), dto.getAccessLists().getViewers());
 
-        assertEquals(dto.getRate(), c.getRate());
-        assertEquals(dto.getRateByUsers(), c.getRateByUsers());
-        assertEquals(dto.getCurrentUserRate(), c.getCurrentUserRate());
+	assertEquals(dto.getRate(), c.getRate());
+	assertEquals(dto.getRateByUsers(), c.getRateByUsers());
+	assertEquals(dto.getCurrentUserRate(), c.getCurrentUserRate());
     }
 
     @Test
     public void testFolderMapping() {
-        final Container container = new Container();
-        container.addChild(new Container());
-        container.addChild(new Container());
-        container.addContent(new Content());
-        container.addContent(new Content());
-        container.addContent(new Content());
-        final Container containerChild = new Container();
-        container.addChild(containerChild);
-        List<Container> absolutePathChild = new ArrayList<Container>();
-        absolutePathChild.add(container);
-        containerChild.setAbsolutePath(absolutePathChild);
+	final Container container = new Container();
+	container.addChild(new Container());
+	container.addChild(new Container());
+	container.addContent(new Content());
+	container.addContent(new Content());
+	container.addContent(new Content());
+	final Container containerChild = new Container();
+	container.addChild(containerChild);
+	final List<Container> absolutePathChild = new ArrayList<Container>();
+	absolutePathChild.add(container);
+	containerChild.setAbsolutePath(absolutePathChild);
 
-        final ContainerDTO dto = mapper.map(container, ContainerDTO.class);
-        assertEquals(3, dto.getChilds().size());
-        assertEquals(3, dto.getContents().size());
-        assertTrue(dto.getContents().get(0) instanceof ContentDTO);
-        assertTrue(dto.getChilds().get(0) instanceof ContainerDTO);
+	final ContainerDTO dto = mapper.map(container, ContainerDTO.class);
+	assertEquals(3, dto.getChilds().size());
+	assertEquals(3, dto.getContents().size());
+	assertTrue(dto.getContents().get(0) instanceof ContentDTO);
+	assertTrue(dto.getChilds().get(0) instanceof ContainerDTO);
 
-        final ContainerDTO dtoChild = mapper.map(containerChild, ContainerDTO.class);
-        assertTrue(dtoChild.getAbsolutePath()[0] instanceof ContainerSimpleDTO);
+	final ContainerDTO dtoChild = mapper.map(containerChild, ContainerDTO.class);
+	assertTrue(dtoChild.getAbsolutePath()[0] instanceof ContainerSimpleDTO);
     }
 
     @Test
     public void testGroupListMapping() {
-        assertMapping(GroupListMode.EVERYONE, GroupListDTO.EVERYONE);
-        assertMapping(GroupListMode.NOBODY, GroupListDTO.NOBODY);
-        assertMapping(GroupListMode.NORMAL, GroupListDTO.NORMAL);
+	assertMapping(GroupListMode.EVERYONE, GroupListDTO.EVERYONE);
+	assertMapping(GroupListMode.NOBODY, GroupListDTO.NOBODY);
+	assertMapping(GroupListMode.NORMAL, GroupListDTO.NORMAL);
     }
 
     @Test
     public void testGroupMapping() {
-        final Group group = new Group("shortName", "name");
-        final GroupDTO dto = mapper.map(group, GroupDTO.class);
-        assertEquals(group.getLongName(), dto.getLongName());
-        assertEquals(group.getShortName(), dto.getShortName());
+	final Group group = new Group("shortName", "name");
+	final GroupDTO dto = mapper.map(group, GroupDTO.class);
+	assertEquals(group.getLongName(), dto.getLongName());
+	assertEquals(group.getShortName(), dto.getShortName());
     }
 
     @Test
     public void testLicenseMapping() {
-        final License licenseCC = new License("by-nc-nd", "Creative Commons Attribution-NonCommercial-NoDerivs", "cc1",
-                "http://creativecommons.org/licenses/by-nc-nd/3.0/", true, false, false, "cc2", "cc3");
+	final License licenseCC = new License("by-nc-nd", "Creative Commons Attribution-NonCommercial-NoDerivs", "cc1",
+		"http://creativecommons.org/licenses/by-nc-nd/3.0/", true, false, false, "cc2", "cc3");
 
-        final License licenseNotCC = new License("gfdl", "GNU Free Documentation License", "nocc1",
-                "http://www.gnu.org/copyleft/fdl.html", false, true, false, "nocc2", "nocc3");
+	final License licenseNotCC = new License("gfdl", "GNU Free Documentation License", "nocc1",
+		"http://www.gnu.org/copyleft/fdl.html", false, true, false, "nocc2", "nocc3");
 
-        final LicenseDTO dtoCC = mapper.map(licenseCC, LicenseDTO.class);
-        final LicenseDTO dtoNotCC = mapper.map(licenseNotCC, LicenseDTO.class);
+	final LicenseDTO dtoCC = mapper.map(licenseCC, LicenseDTO.class);
+	final LicenseDTO dtoNotCC = mapper.map(licenseNotCC, LicenseDTO.class);
 
-        assertEquals("by-nc-nd", dtoCC.getShortName());
-        assertEquals("gfdl", dtoNotCC.getShortName());
-        assertEquals("Creative Commons Attribution-NonCommercial-NoDerivs", dtoCC.getLongName());
-        assertEquals("GNU Free Documentation License", dtoNotCC.getLongName());
-        assertEquals("http://creativecommons.org/licenses/by-nc-nd/3.0/", dtoCC.getUrl());
-        assertEquals("http://www.gnu.org/copyleft/fdl.html", dtoNotCC.getUrl());
-        assertTrue(dtoCC.isCC());
-        assertFalse(dtoNotCC.isCC());
-        assertFalse(dtoCC.isCopyleft());
-        assertTrue(dtoNotCC.isCopyleft());
-        assertFalse(dtoCC.isDeprecated());
-        assertFalse(dtoNotCC.isDeprecated());
-        assertEquals("cc1", dtoCC.getDescription());
-        assertEquals("cc2", dtoCC.getRdf());
-        assertEquals("cc3", dtoCC.getImageUrl());
-        assertEquals("nocc1", dtoNotCC.getDescription());
-        assertEquals("nocc2", dtoNotCC.getRdf());
-        assertEquals("nocc3", dtoNotCC.getImageUrl());
+	assertEquals("by-nc-nd", dtoCC.getShortName());
+	assertEquals("gfdl", dtoNotCC.getShortName());
+	assertEquals("Creative Commons Attribution-NonCommercial-NoDerivs", dtoCC.getLongName());
+	assertEquals("GNU Free Documentation License", dtoNotCC.getLongName());
+	assertEquals("http://creativecommons.org/licenses/by-nc-nd/3.0/", dtoCC.getUrl());
+	assertEquals("http://www.gnu.org/copyleft/fdl.html", dtoNotCC.getUrl());
+	assertTrue(dtoCC.isCC());
+	assertFalse(dtoNotCC.isCC());
+	assertFalse(dtoCC.isCopyleft());
+	assertTrue(dtoNotCC.isCopyleft());
+	assertFalse(dtoCC.isDeprecated());
+	assertFalse(dtoNotCC.isDeprecated());
+	assertEquals("cc1", dtoCC.getDescription());
+	assertEquals("cc2", dtoCC.getRdf());
+	assertEquals("cc3", dtoCC.getImageUrl());
+	assertEquals("nocc1", dtoNotCC.getDescription());
+	assertEquals("nocc2", dtoNotCC.getRdf());
+	assertEquals("nocc3", dtoNotCC.getImageUrl());
     }
 
+    @Test
+    public void testUserToLinkMappping() {
+	final User user = new User("shortName", "longName", "", "", null, null, null);
+	final LinkDTO dto = mapper.map(user, LinkDTO.class);
+	assertEquals("shortName", dto.getShortName());
+	assertEquals("longName", dto.getLongName());
+    }
+
     private void assertMapping(final GroupListMode mode, final String modeName) {
-        final GroupList list = new GroupList();
-        list.setMode(mode);
-        final GroupListDTO dto = mapper.map(list, GroupListDTO.class);
-        assertEquals(modeName, dto.getMode());
-        final GroupList listBack = mapper.map(dto, GroupList.class);
-        assertEquals(mode, listBack.getMode());
+	final GroupList list = new GroupList();
+	list.setMode(mode);
+	final GroupListDTO dto = mapper.map(list, GroupListDTO.class);
+	assertEquals(modeName, dto.getMode());
+	final GroupList listBack = mapper.map(dto, GroupList.class);
+	assertEquals(mode, listBack.getMode());
     }
 
     private void assertValidAccessListsMapping(final GroupList groupList, final GroupListDTO groupListDTO) {
-        final List<Group> listOrig = groupList.getList();
-        final List<GroupDTO> listDto = groupListDTO.getList();
-        assertEquals(listDto.size(), listOrig.size());
-        for (int i = 0; i < listDto.size(); i++) {
-            final Object object = listDto.get(i);
-            assertEquals(GroupDTO.class, object.getClass());
-            final GroupDTO d = (GroupDTO) object;
-            final Group g = listOrig.get(i);
-            assertNotNull(d);
-            assertNotNull(g);
-            final GroupDTO map = mapper.map(g, GroupDTO.class);
-            assertEquals(map, d);
-        }
+	final List<Group> listOrig = groupList.getList();
+	final List<GroupDTO> listDto = groupListDTO.getList();
+	assertEquals(listDto.size(), listOrig.size());
+	for (int i = 0; i < listDto.size(); i++) {
+	    final Object object = listDto.get(i);
+	    assertEquals(GroupDTO.class, object.getClass());
+	    final GroupDTO d = (GroupDTO) object;
+	    final Group g = listOrig.get(i);
+	    assertNotNull(d);
+	    assertNotNull(g);
+	    final GroupDTO map = mapper.map(g, GroupDTO.class);
+	    assertEquals(map, d);
+	}
     }
 
     private Content createTestContent() {
-        final Group group = new Group("grouptest", "This is a group Test");
-        final Container container = new Container();
-        container.setId(1l);
-        container.setToolName("docs");
-        container.setOwner(group);
-        container.setName("folder");
-        final Content d = new Content();
-        d.setId(1l);
-        final Revision revision = new Revision(d);
-        revision.setTitle("title");
-        d.addRevision(revision);
-        d.setContainer(container);
-        return d;
+	final Group group = new Group("grouptest", "This is a group Test");
+	final Container container = new Container();
+	container.setId(1l);
+	container.setToolName("docs");
+	container.setOwner(group);
+	container.setName("folder");
+	final Content d = new Content();
+	d.setId(1l);
+	final Revision revision = new Revision(d);
+	revision.setTitle("title");
+	d.addRevision(revision);
+	d.setContainer(container);
+	return d;
     }
 }




More information about the kune-commits mailing list