[kune-commits] r1334 - in trunk/src: main/java/cc/kune/blogs/client/actions main/java/cc/kune/common/client/actions/ui/descrip main/java/cc/kune/common/client/notify main/java/cc/kune/common/client/ui main/java/cc/kune/common/client/ui/dialogs main/java/cc/kune/common/public main/java/cc/kune/core/client main/java/cc/kune/core/client/groups/newgroup main/java/cc/kune/core/client/notify/msgs main/java/cc/kune/core/client/rpcservices main/java/cc/kune/core/client/sitebar main/java/cc/kune/core/client/sn/actions/conditions main/java/cc/kune/core/server/content main/java/cc/kune/core/server/rpc main/java/cc/kune/core/server/state main/java/cc/kune/core/shared/dto main/java/cc/kune/docs/client/actions main/java/cc/kune/gspace/client main/java/cc/kune/gspace/client/actions main/java/cc/kune/gspace/client/options/license main/java/cc/kune/gspace/client/options/logo main/java/cc/kune/gspace/client/viewers main/java/cc/kune/msgs/client main/java/cc/kune/msgs/client/resources main/java/cc/kune/wave/client main/java/cc/kune/wave/server test/java/cc/kune/wave/server test/java/org/ourproject/kune test/java/org/ourproject/kune/platf test/java/org/ourproject/kune/rack

Vicente J. Ruiz Jurado vjrj_ at ourproject.org
Tue May 3 10:22:22 CEST 2011


Author: vjrj_
Date: 2011-05-03 10:22:21 +0200 (Tue, 03 May 2011)
New Revision: 1334

Added:
   trunk/src/main/java/cc/kune/blogs/client/actions/AbstractOptionsMenu.java
   trunk/src/main/java/cc/kune/blogs/client/actions/ContentViewerOptionsMenu.java
   trunk/src/main/java/cc/kune/core/client/sitebar/ErrorsDialog.java
   trunk/src/main/java/cc/kune/core/client/sitebar/ErrorsDialog.ui.xml
   trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/IsNotParticipantOfCurrentStateCondition.java
   trunk/src/main/java/cc/kune/gspace/client/actions/ParticipateInContentBtn.java
   trunk/src/main/java/cc/kune/gspace/client/actions/RefreshContentMenuItem.java
   trunk/src/main/java/cc/kune/msgs/client/resources/UserMessageImagesUtil.java
Removed:
   trunk/src/main/java/cc/kune/gspace/client/actions/RefreshContentBtn.java
   trunk/src/test/java/org/ourproject/kune/platf/integration/
   trunk/src/test/java/org/ourproject/kune/platf/server/
   trunk/src/test/java/org/ourproject/kune/rack/filters/
   trunk/src/test/java/org/ourproject/kune/testhelper/
Modified:
   trunk/src/main/java/cc/kune/blogs/client/actions/BlogsClientActions.java
   trunk/src/main/java/cc/kune/blogs/client/actions/GoParentBlogBtn.java
   trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/AbstractGuiActionDescrip.java
   trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/GuiActionDescrip.java
   trunk/src/main/java/cc/kune/common/client/notify/NotifyLevel.java
   trunk/src/main/java/cc/kune/common/client/notify/NotifyUser.java
   trunk/src/main/java/cc/kune/common/client/ui/AbstractAtBorderPopupPanel.java
   trunk/src/main/java/cc/kune/common/client/ui/IconLabel.java
   trunk/src/main/java/cc/kune/common/client/ui/dialogs/BasicTopDialog.java
   trunk/src/main/java/cc/kune/common/public/kune-common.css
   trunk/src/main/java/cc/kune/core/client/CoreGinModule.java
   trunk/src/main/java/cc/kune/core/client/groups/newgroup/NewGroupPanel.java
   trunk/src/main/java/cc/kune/core/client/notify/msgs/UserNotifierPresenter.java
   trunk/src/main/java/cc/kune/core/client/rpcservices/ContentService.java
   trunk/src/main/java/cc/kune/core/client/rpcservices/ContentServiceAsync.java
   trunk/src/main/java/cc/kune/core/client/sitebar/AboutKuneDialog.java
   trunk/src/main/java/cc/kune/core/client/sitebar/AboutKuneDialog.ui.xml
   trunk/src/main/java/cc/kune/core/client/sitebar/SitebarActionsPanel.java
   trunk/src/main/java/cc/kune/core/client/sitebar/SitebarActionsPresenter.java
   trunk/src/main/java/cc/kune/core/server/content/ContentManager.java
   trunk/src/main/java/cc/kune/core/server/content/ContentManagerDefault.java
   trunk/src/main/java/cc/kune/core/server/rpc/ContentRPC.java
   trunk/src/main/java/cc/kune/core/server/state/StateContent.java
   trunk/src/main/java/cc/kune/core/server/state/StateServiceDefault.java
   trunk/src/main/java/cc/kune/core/shared/dto/StateContentDTO.java
   trunk/src/main/java/cc/kune/docs/client/actions/DocsClientActions.java
   trunk/src/main/java/cc/kune/gspace/client/GSpaceGinModule.java
   trunk/src/main/java/cc/kune/gspace/client/actions/GoParentContainerBtn.java
   trunk/src/main/java/cc/kune/gspace/client/options/license/EntityOptionsDefLicensePanel.java
   trunk/src/main/java/cc/kune/gspace/client/options/logo/EntityOptionsLogoPanel.java
   trunk/src/main/java/cc/kune/gspace/client/viewers/DocViewerPanel.java
   trunk/src/main/java/cc/kune/gspace/client/viewers/DocViewerPanel.ui.xml
   trunk/src/main/java/cc/kune/gspace/client/viewers/DocViewerPresenter.java
   trunk/src/main/java/cc/kune/msgs/client/UserMessage.java
   trunk/src/main/java/cc/kune/wave/client/WebClient.java
   trunk/src/main/java/cc/kune/wave/server/KuneWaveManager.java
   trunk/src/main/java/cc/kune/wave/server/KuneWaveManagerDefault.java
   trunk/src/test/java/cc/kune/wave/server/KuneWaveManagerDefaultTest.java
Log:
More actions, error dialog, participate action (work in progress)

Added: trunk/src/main/java/cc/kune/blogs/client/actions/AbstractOptionsMenu.java
===================================================================
--- trunk/src/main/java/cc/kune/blogs/client/actions/AbstractOptionsMenu.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/blogs/client/actions/AbstractOptionsMenu.java	2011-05-03 08:22:21 UTC (rev 1334)
@@ -0,0 +1,13 @@
+package cc.kune.blogs.client.actions;
+
+import cc.kune.common.client.actions.ui.descrip.MenuDescriptor;
+import cc.kune.core.client.resources.CoreResources;
+
+public abstract class AbstractOptionsMenu extends MenuDescriptor {
+
+    public AbstractOptionsMenu(final CoreResources res) {
+        super();
+        this.withIcon(res.arrowDownBlack()).withStyles("k-fr");
+    }
+
+}

Modified: trunk/src/main/java/cc/kune/blogs/client/actions/BlogsClientActions.java
===================================================================
--- trunk/src/main/java/cc/kune/blogs/client/actions/BlogsClientActions.java	2011-04-29 14:42:12 UTC (rev 1333)
+++ trunk/src/main/java/cc/kune/blogs/client/actions/BlogsClientActions.java	2011-05-03 08:22:21 UTC (rev 1334)
@@ -30,7 +30,8 @@
 import cc.kune.core.client.state.StateManager;
 import cc.kune.gspace.client.actions.AbstractFoldableToolActions;
 import cc.kune.gspace.client.actions.ActionGroups;
-import cc.kune.gspace.client.actions.RefreshContentBtn;
+import cc.kune.gspace.client.actions.ParticipateInContentBtn;
+import cc.kune.gspace.client.actions.RefreshContentMenuItem;
 import cc.kune.gspace.client.actions.SetAsHomePageMenuItem;
 
 import com.google.inject.Inject;
@@ -38,34 +39,36 @@
 
 public class BlogsClientActions extends AbstractFoldableToolActions {
 
-  final String[] all = { TYPE_ROOT, TYPE_BLOG, TYPE_POST, TYPE_UPLOADEDFILE };
-  final String[] containers = { TYPE_ROOT, TYPE_BLOG };
-  final String[] containersNoRoot = { TYPE_BLOG };
-  final String[] contents = { TYPE_POST, TYPE_UPLOADEDFILE };
-  final String[] contentsModerated = { TYPE_POST, TYPE_UPLOADEDFILE };
+    final String[] all = { TYPE_ROOT, TYPE_BLOG, TYPE_POST, TYPE_UPLOADEDFILE };
+    final String[] containers = { TYPE_ROOT, TYPE_BLOG };
+    final String[] containersNoRoot = { TYPE_BLOG };
+    final String[] contents = { TYPE_POST, TYPE_UPLOADEDFILE };
+    final String[] contentsModerated = { TYPE_POST, TYPE_UPLOADEDFILE };
 
-  @Inject
-  public BlogsClientActions(final I18nUITranslationService i18n, final Session session,
-      final StateManager stateManager, final ActionRegistryByType registry, final CoreResources res,
-      final Provider<GoParentBlogBtn> folderGoUp, final Provider<NewPostBtn> newDocBtn,
-      final Provider<NewBlogBtn> newFolderBtn, final Provider<OpenBlogMenuItem> openContentMenuItem,
-      final Provider<DelPostMenuItem> delContentMenuItem, final Provider<RefreshContentBtn> refresh,
-      final Provider<DelBlogMenuItem> delFolderMenuItem,
-      final Provider<SetAsHomePageMenuItem> setAsHomePage) {
-    super(session, stateManager, i18n, registry);
-    actionsRegistry.addAction(ActionGroups.VIEW, folderGoUp, contents);
-    actionsRegistry.addAction(ActionGroups.VIEW, folderGoUp, containersNoRoot);
-    actionsRegistry.addAction(ActionGroups.VIEW, newDocBtn, containersNoRoot);
-    actionsRegistry.addAction(ActionGroups.VIEW, newFolderBtn, TYPE_ROOT);
-    actionsRegistry.addAction(ActionGroups.VIEW, refresh, all);
-    actionsRegistry.addAction(ActionGroups.MENUITEM, openContentMenuItem, contents);
-    actionsRegistry.addAction(ActionGroups.MENUITEM, openContentMenuItem, containersNoRoot);
-    actionsRegistry.addAction(ActionGroups.MENUITEM, delContentMenuItem, contents);
-    actionsRegistry.addAction(ActionGroups.MENUITEM, delFolderMenuItem, containersNoRoot);
-    actionsRegistry.addAction(ActionGroups.MENUITEM, delFolderMenuItem, contents);
-  }
+    @Inject
+    public BlogsClientActions(final I18nUITranslationService i18n, final Session session,
+            final StateManager stateManager, final ActionRegistryByType registry, final CoreResources res,
+            final Provider<GoParentBlogBtn> folderGoUp, final Provider<NewPostBtn> newDocBtn,
+            final Provider<NewBlogBtn> newFolderBtn, final Provider<OpenBlogMenuItem> openContentMenuItem,
+            final Provider<DelPostMenuItem> delContentMenuItem, final Provider<RefreshContentMenuItem> refresh,
+            final Provider<ContentViewerOptionsMenu> optionsMenuContent,
+            final Provider<ParticipateInContentBtn> participateBtn, final Provider<DelBlogMenuItem> delFolderMenuItem,
+            final Provider<SetAsHomePageMenuItem> setAsHomePage) {
+        super(session, stateManager, i18n, registry);
+        actionsRegistry.addAction(ActionGroups.VIEW, folderGoUp, contents);
+        actionsRegistry.addAction(ActionGroups.VIEW, folderGoUp, containersNoRoot);
+        actionsRegistry.addAction(ActionGroups.VIEW, optionsMenuContent, all);
+        actionsRegistry.addAction(ActionGroups.VIEW, participateBtn, contents);
+        actionsRegistry.addAction(ActionGroups.VIEW, refresh, all);
+        actionsRegistry.addAction(ActionGroups.VIEW, newDocBtn, containersNoRoot);
+        actionsRegistry.addAction(ActionGroups.VIEW, newFolderBtn, TYPE_ROOT);
+        actionsRegistry.addAction(ActionGroups.MENUITEM, openContentMenuItem, contents);
+        actionsRegistry.addAction(ActionGroups.MENUITEM, openContentMenuItem, containersNoRoot);
+        actionsRegistry.addAction(ActionGroups.MENUITEM, delContentMenuItem, contents);
+        actionsRegistry.addAction(ActionGroups.MENUITEM, delFolderMenuItem, containersNoRoot);
+    }
 
-  @Override
-  protected void createPostSessionInitActions() {
-  }
+    @Override
+    protected void createPostSessionInitActions() {
+    }
 }

Added: trunk/src/main/java/cc/kune/blogs/client/actions/ContentViewerOptionsMenu.java
===================================================================
--- trunk/src/main/java/cc/kune/blogs/client/actions/ContentViewerOptionsMenu.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/blogs/client/actions/ContentViewerOptionsMenu.java	2011-05-03 08:22:21 UTC (rev 1334)
@@ -0,0 +1,16 @@
+package cc.kune.blogs.client.actions;
+
+import cc.kune.common.client.actions.ui.descrip.MenuDescriptor;
+import cc.kune.core.client.resources.CoreResources;
+
+import com.google.inject.Inject;
+
+public class ContentViewerOptionsMenu extends MenuDescriptor {
+
+    @Inject
+    public ContentViewerOptionsMenu(final CoreResources res) {
+        super();
+        this.withIcon(res.arrowdownsitebar()).withStyles("k-def-docbtn, k-fr, k-noborder, k-nobackcolor");
+    }
+
+}

Modified: trunk/src/main/java/cc/kune/blogs/client/actions/GoParentBlogBtn.java
===================================================================
--- trunk/src/main/java/cc/kune/blogs/client/actions/GoParentBlogBtn.java	2011-04-29 14:42:12 UTC (rev 1333)
+++ trunk/src/main/java/cc/kune/blogs/client/actions/GoParentBlogBtn.java	2011-05-03 08:22:21 UTC (rev 1334)
@@ -9,7 +9,8 @@
 public class GoParentBlogBtn extends GoParentContainerBtn {
 
     @Inject
-    public GoParentBlogBtn(final I18nTranslationService i18n, final GoParentContainerAction action, final CoreResources res) {
+    public GoParentBlogBtn(final I18nTranslationService i18n, final GoParentContainerAction action,
+            final CoreResources res) {
         super(i18n, action, res);
     }
 

Modified: trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/AbstractGuiActionDescrip.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/AbstractGuiActionDescrip.java	2011-04-29 14:42:12 UTC (rev 1333)
+++ trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/AbstractGuiActionDescrip.java	2011-05-03 08:22:21 UTC (rev 1334)
@@ -239,6 +239,12 @@
     }
 
     @Override
+    public GuiActionDescrip withId(final String id) {
+        setId(id);
+        return this;
+    }
+
+    @Override
     public GuiActionDescrip withParent(final GuiActionDescrip parent) {
         setParent(parent);
         return this;

Modified: trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/GuiActionDescrip.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/GuiActionDescrip.java	2011-04-29 14:42:12 UTC (rev 1333)
+++ trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/GuiActionDescrip.java	2011-05-03 08:22:21 UTC (rev 1334)
@@ -80,6 +80,8 @@
 
     GuiActionDescrip withIconCls(String icon);
 
+    GuiActionDescrip withId(String id);
+
     GuiActionDescrip withParent(GuiActionDescrip parent);
 
     GuiActionDescrip withShortcut(KeyStroke keystroke);

Modified: trunk/src/main/java/cc/kune/common/client/notify/NotifyLevel.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/notify/NotifyLevel.java	2011-04-29 14:42:12 UTC (rev 1333)
+++ trunk/src/main/java/cc/kune/common/client/notify/NotifyLevel.java	2011-05-03 08:22:21 UTC (rev 1334)
@@ -20,5 +20,5 @@
 package cc.kune.common.client.notify;
 
 public enum NotifyLevel {
-    info, important, veryImportant, error
+    error, important, info, log, veryImportant
 }

Modified: trunk/src/main/java/cc/kune/common/client/notify/NotifyUser.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/notify/NotifyUser.java	2011-04-29 14:42:12 UTC (rev 1333)
+++ trunk/src/main/java/cc/kune/common/client/notify/NotifyUser.java	2011-05-03 08:22:21 UTC (rev 1334)
@@ -88,6 +88,10 @@
 
     }
 
+    public static void logError(final String message) {
+        eventBus.fireEvent(new UserNotifyEvent(NotifyLevel.log, message));
+    }
+
     public static void showAlertMessage(final String title, final String message) {
         showAlertMessage(title, message, onOk);
     }

Modified: trunk/src/main/java/cc/kune/common/client/ui/AbstractAtBorderPopupPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/ui/AbstractAtBorderPopupPanel.java	2011-04-29 14:42:12 UTC (rev 1333)
+++ trunk/src/main/java/cc/kune/common/client/ui/AbstractAtBorderPopupPanel.java	2011-05-03 08:22:21 UTC (rev 1334)
@@ -27,8 +27,10 @@
 
 public abstract class AbstractAtBorderPopupPanel extends PopupPanel {
 
+    private String height;
     private boolean showCentered = true;
     protected UIObject showNearObject;
+    private String width;
 
     public AbstractAtBorderPopupPanel() {
         super(false, false);
@@ -44,15 +46,21 @@
         init();
     }
 
+    private String calculatePercent(final int currentSize, final String percent) {
+        return String.valueOf(currentSize * Integer.valueOf(percent.replace("%", "")) / 100) + "px";
+    }
+
     public void defaultStyle() {
         addStyleName("k-opacity90");
         addStyleName("k-box-10shadow");
     }
 
     private void init() {
+        setSizes();
         Window.addResizeHandler(new ResizeHandler() {
             @Override
             public void onResize(final ResizeEvent event) {
+                setSizeWithListener(event.getWidth(), event.getHeight());
                 if (isShowing()) {
                     if (showCentered) {
                         setCenterPositionImpl();
@@ -70,6 +78,46 @@
 
     protected abstract void setCenterPositionImpl();
 
+    @Override
+    public void setHeight(final String height) {
+        this.height = height;
+        setSizes();
+    }
+
+    @Override
+    public void setSize(final String width, final String height) {
+        this.width = width;
+        this.height = height;
+        setSizes();
+    }
+
+    private void setSizes() {
+        setSizeWithListener(Window.getClientWidth(), Window.getClientHeight());
+    }
+
+    private void setSizeWithListener(final int windowWidth, final int windowHeight) {
+        if (width != null) {
+            if (width.contains("%")) {
+                calculatePercent(windowWidth, width);
+            } else {
+                super.setWidth(width);
+            }
+        }
+        if (height != null) {
+            if (height.contains("%")) {
+                calculatePercent(windowHeight, height);
+            } else {
+                super.setHeight(height);
+            }
+        }
+    }
+
+    @Override
+    public void setWidth(final String width) {
+        this.width = width;
+        setSizes();
+    }
+
     public void showCentered() {
         showCentered = true;
         setCenterPositionImpl();

Modified: trunk/src/main/java/cc/kune/common/client/ui/IconLabel.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/ui/IconLabel.java	2011-04-29 14:42:12 UTC (rev 1333)
+++ trunk/src/main/java/cc/kune/common/client/ui/IconLabel.java	2011-05-03 08:22:21 UTC (rev 1334)
@@ -40,129 +40,131 @@
 
 public class IconLabel extends Composite implements HasWidgets, HasDirectionalText {
 
-  interface IconTitleUiBinder extends UiBinder<Widget, IconLabel> {
-  }
+    interface IconTitleUiBinder extends UiBinder<Widget, IconLabel> {
+    }
 
-  private static IconTitleUiBinder uiBinder = GWT.create(IconTitleUiBinder.class);
+    private static IconTitleUiBinder uiBinder = GWT.create(IconTitleUiBinder.class);
 
-  @UiField
-  FlowPanel flow;
-  @UiField
-  Image iconLeft;
-  @UiField
-  Image iconRight;
-  @UiField
-  InlineLabel label;
-  @UiField
-  FocusPanel self;
+    @UiField
+    FlowPanel flow;
+    @UiField
+    Image iconLeft;
+    @UiField
+    Image iconRight;
+    @UiField
+    InlineLabel label;
+    @UiField
+    FocusPanel self;
 
-  public IconLabel() {
-    this("");
-  }
+    public IconLabel() {
+        this("");
+    }
 
-  public IconLabel(final ImageResource imgRes, final String text) {
-    this(text);
-    if (imgRes != null) {
-      iconLeft.setResource(imgRes);
+    public IconLabel(final ImageResource imgRes, final String text) {
+        this(text);
+        if (imgRes != null) {
+            iconLeft.setResource(imgRes);
+        }
     }
-  }
 
-  public IconLabel(final String text) {
-    initWidget(uiBinder.createAndBindUi(this));
-    label.setText(text);
-    label.addStyleName("k-space-nowrap");
-    label.addStyleName("k-iconlabel-text");
-  }
+    public IconLabel(final String text) {
+        initWidget(uiBinder.createAndBindUi(this));
+        label.setText(text);
+        label.addStyleName("k-space-nowrap");
+        label.addStyleName("k-iconlabel-text");
+    }
 
-  @Override
-  public void add(final Widget w) {
-    flow.add(w);
-  }
+    @Override
+    public void add(final Widget w) {
+        flow.add(w);
+    }
 
-  @Override
-  public void addStyleName(final String style) {
-    flow.addStyleName(style);
-  }
+    @Override
+    public void addStyleName(final String style) {
+        flow.addStyleName(style);
+    }
 
-  public void addTextStyleName(final String style) {
-    label.addStyleName(style);
-  }
+    public void addTextStyleName(final String style) {
+        label.addStyleName(style);
+    }
 
-  @Override
-  public void clear() {
-    flow.clear();
-  }
+    @Override
+    public void clear() {
+        flow.clear();
+    }
 
-  public HasClickHandlers getFocus() {
-    return self;
-  }
+    public HasClickHandlers getFocus() {
+        return self;
+    }
 
-  @Override
-  public String getText() {
-    return label.getText();
-  }
+    @Override
+    public String getText() {
+        return label.getText();
+    }
 
-  @Override
-  public Direction getTextDirection() {
-    return label.getTextDirection();
-  }
+    @Override
+    public Direction getTextDirection() {
+        return label.getTextDirection();
+    }
 
-  @Override
-  public Iterator<Widget> iterator() {
-    return flow.iterator();
-  }
+    @Override
+    public Iterator<Widget> iterator() {
+        return flow.iterator();
+    }
 
-  @Override
-  public boolean remove(final Widget w) {
-    return flow.remove(w);
-  }
+    @Override
+    public boolean remove(final Widget w) {
+        return flow.remove(w);
+    }
 
-  public void setLabelText(final String text) {
-    label.setText(text);
-  }
+    public void setLabelText(final String text) {
+        label.setText(text);
+    }
 
-  public void setLeftIcon(final String imgCss) {
-    iconLeft.setUrl("images/clear.gif");
-    iconLeft.setStyleName(imgCss);
-    iconLeft.addStyleName("k-iconlabel-left");
-    iconLeft.addStyleName("oc-ico-pad");
-  }
+    public void setLeftIcon(final String imgCss) {
+        iconLeft.setUrl("images/clear.gif");
+        iconLeft.setStyleName(imgCss);
+        iconLeft.addStyleName("k-iconlabel-left");
+        iconLeft.addStyleName("oc-ico-pad");
+    }
 
-  public void setLeftIconResource(final ImageResource res) {
-    iconLeft.setResource(res);
-    iconLeft.addStyleName("k-iconlabel-left");
-  }
+    public void setLeftIconResource(final ImageResource res) {
+        iconLeft.setResource(res);
+        iconLeft.addStyleName("k-iconlabel-left");
+    }
 
-  public void setRightIcon(final String imgCss) {
-    iconRight.setUrl("images/clear.gif");
-    iconRight.setStyleName(imgCss);
-    iconRight.addStyleName("oc-ico-pad");
-    iconRight.addStyleName("k-iconlabel-right");
-  }
+    public void setRightIcon(final String imgCss) {
+        iconRight.setUrl("images/clear.gif");
+        iconRight.setStyleName(imgCss);
+        iconRight.addStyleName("oc-ico-pad");
+        iconRight.addStyleName("k-iconlabel-right");
+    }
 
-  public void setRightIconResource(final ImageResource res) {
-    iconRight.setResource(res);
-    iconRight.addStyleName("k-iconlabel-right");
-  }
+    public void setRightIconResource(final ImageResource res) {
+        iconRight.setResource(res);
+        iconRight.addStyleName("k-iconlabel-right");
+    }
 
-  @Override
-  public void setStyleName(final String style) {
-    flow.setStyleName(style);
-  }
+    @Override
+    public void setStyleName(final String style) {
+        flow.setStyleName(style);
+    }
 
-  @Override
-  public void setText(final String text) {
-    label.setText(text);
-  }
+    @Override
+    public void setText(final String text) {
+        label.setText(text);
+    }
 
-  @Override
-  public void setText(final String text, final Direction dir) {
-    label.setText(text, dir);
-  }
+    @Override
+    public void setText(final String text, final Direction dir) {
+        label.setText(text, dir);
+    }
 
-  public void setTooltip(final String text) {
-    Tooltip.to(label, text);
-    // Tooltip.to(iconRight, text);
-    // Tooltip.to(iconLeft, text);
-  }
+    public void setTooltip(final String text) {
+        Tooltip.to(label, text);
+    }
+
+    public void setWordWrap(final boolean wordWrap) {
+        label.setWordWrap(wordWrap);
+    }
 }

Modified: trunk/src/main/java/cc/kune/common/client/ui/dialogs/BasicTopDialog.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/ui/dialogs/BasicTopDialog.java	2011-04-29 14:42:12 UTC (rev 1333)
+++ trunk/src/main/java/cc/kune/common/client/ui/dialogs/BasicTopDialog.java	2011-05-03 08:22:21 UTC (rev 1334)
@@ -28,135 +28,134 @@
 
 public class BasicTopDialog extends BasicDialog {
 
-  public static class Builder {
-    private final boolean autohide;
-    private boolean autoscroll = false;
-    private final String dialogId;
-    private String firstButtonId;
-    private String firstButtonTitle;
-    private String height = "70%";
-    private String icon;
-    private final boolean modal;
-    private String sndButtonId;
-    private String sndButtonTitle;
-    private int tabIndexStart = 0;
-    private String title;
-    private String width = "400px";
+    public static class Builder {
+        private final boolean autohide;
+        private boolean autoscroll = false;
+        private final String dialogId;
+        private String firstButtonId;
+        private String firstButtonTitle;
+        private String height = "70%";
+        private String icon;
+        private final boolean modal;
+        private String sndButtonId;
+        private String sndButtonTitle;
+        private int tabIndexStart = 0;
+        private String title;
+        private String width = "400px";
 
-    public Builder(final String dialogId, final boolean autohide, final boolean modal) {
-      // Required params
-      this.autohide = autohide;
-      this.modal = modal;
-      this.dialogId = dialogId;
-    }
+        public Builder(final String dialogId, final boolean autohide, final boolean modal) {
+            // Required params
+            this.autohide = autohide;
+            this.modal = modal;
+            this.dialogId = dialogId;
+        }
 
-    public Builder autoscroll(final boolean autoscroll) {
-      // Not used for now
-      this.autoscroll = autoscroll;
-      return this;
-    }
+        public Builder autoscroll(final boolean autoscroll) {
+            // Not used for now
+            this.autoscroll = autoscroll;
+            return this;
+        }
 
-    public BasicTopDialog build() {
-      return new BasicTopDialog(this);
-    }
+        public BasicTopDialog build() {
+            return new BasicTopDialog(this);
+        }
 
-    public Builder firstButtonId(final String firstButtonId) {
-      this.firstButtonId = firstButtonId;
-      return this;
-    }
+        public Builder firstButtonId(final String firstButtonId) {
+            this.firstButtonId = firstButtonId;
+            return this;
+        }
 
-    public Builder firstButtonTitle(final String firstButtonTitle) {
-      this.firstButtonTitle = firstButtonTitle;
-      return this;
-    }
+        public Builder firstButtonTitle(final String firstButtonTitle) {
+            this.firstButtonTitle = firstButtonTitle;
+            return this;
+        }
 
-    public Builder height(final int height) {
-      this.height = String.valueOf(height);
-      return this;
-    }
+        public Builder height(final int height) {
+            this.height = String.valueOf(height);
+            return this;
+        }
 
-    public Builder height(final String height) {
-      this.height = height;
-      return this;
-    }
+        public Builder height(final String height) {
+            this.height = height;
+            return this;
+        }
 
-    public Builder icon(final String icon) {
-      this.icon = icon;
-      return this;
-    }
+        public Builder icon(final String icon) {
+            this.icon = icon;
+            return this;
+        }
 
-    public Builder sndButtonId(final String sndButtonId) {
-      this.sndButtonId = sndButtonId;
-      return this;
-    }
+        public Builder sndButtonId(final String sndButtonId) {
+            this.sndButtonId = sndButtonId;
+            return this;
+        }
 
-    public Builder sndButtonTitle(final String sndButtonTitle) {
-      this.sndButtonTitle = sndButtonTitle;
-      return this;
-    }
+        public Builder sndButtonTitle(final String sndButtonTitle) {
+            this.sndButtonTitle = sndButtonTitle;
+            return this;
+        }
 
-    public Builder tabIndexStart(final int tabIndexStart) {
-      this.tabIndexStart = tabIndexStart;
-      return this;
-    }
+        public Builder tabIndexStart(final int tabIndexStart) {
+            this.tabIndexStart = tabIndexStart;
+            return this;
+        }
 
-    public Builder title(final String title) {
-      this.title = title;
-      return this;
-    }
+        public Builder title(final String title) {
+            this.title = title;
+            return this;
+        }
 
-    public Builder width(final int width) {
-      this.width = String.valueOf(width);
-      return this;
-    }
+        public Builder width(final int width) {
+            this.width = String.valueOf(width);
+            return this;
+        }
 
-    public Builder width(final String width) {
-      this.width = width;
-      return this;
+        public Builder width(final String width) {
+            this.width = width;
+            return this;
+        }
+
     }
 
-  }
+    private final PopupTopPanel popup;
 
-  private final PopupTopPanel popup;
+    private BasicTopDialog(final Builder builder) {
+        popup = new PopupTopPanel(builder.autohide, builder.modal);
+        popup.add(this);
+        popup.ensureDebugId(builder.dialogId);
+        super.getTitleText().setText(builder.title);
+        if (TextUtils.notEmpty(builder.icon)) {
+            super.setTitleIcon(builder.icon);
+        }
+        super.setFirstBtnText(builder.firstButtonTitle);
+        super.setFirstBtnId(builder.firstButtonId);
+        super.setFirstBtnTabIndex(builder.tabIndexStart);
+        super.setSecondBtnText(builder.sndButtonTitle);
+        super.setSecondBtnId(builder.sndButtonId);
+        super.setSecondBtnTabIndex(builder.tabIndexStart + 1);
+        super.getTitleText().setText(builder.title);
+        popup.setWidth(builder.width);
+        popup.setHeight(builder.height);
+    }
 
-  private BasicTopDialog(final Builder builder) {
-    popup = new PopupTopPanel(builder.autohide, builder.modal);
-    popup.add(this);
-    popup.ensureDebugId(builder.dialogId);
-    super.getTitleText().setText(builder.title);
-    if (TextUtils.notEmpty(builder.icon)) {
-      super.setTitleIcon(builder.icon);
+    public HasCloseHandlers<PopupPanel> getClose() {
+        return popup;
     }
-    super.setFirstBtnText(builder.firstButtonTitle);
-    super.setFirstBtnId(builder.firstButtonId);
-    super.setFirstBtnTabIndex(builder.tabIndexStart);
-    super.setSecondBtnText(builder.sndButtonTitle);
-    super.setSecondBtnId(builder.sndButtonId);
-    super.setSecondBtnTabIndex(builder.tabIndexStart + 1);
-    super.getTitleText().setText(builder.title);
-    super.setSize(builder.width, builder.height);
-  }
 
-  public HasCloseHandlers<PopupPanel> getClose() {
-    return popup;
-  }
+    public void hide() {
+        popup.hide();
+    }
 
-  public void hide() {
-    popup.hide();
+    @Override
+    public void setFirstBtnTitle(final String title) {
+        super.setFirstBtnTitle(title);
+    }
 
-  }
+    public void showCentered() {
+        popup.showCentered();
+    }
 
-  @Override
-  public void setFirstBtnTitle(final String title) {
-    super.setFirstBtnTitle(title);
-
-  }
-
-  public void showCentered() {
-    popup.showCentered();
-  }
-
-  public void showRelativeTo(final UIObject object) {
-    popup.showRelativeTo(object);
-  }
+    public void showRelativeTo(final UIObject object) {
+        popup.showRelativeTo(object);
+    }
 }

Modified: trunk/src/main/java/cc/kune/common/public/kune-common.css
===================================================================
--- trunk/src/main/java/cc/kune/common/public/kune-common.css	2011-04-29 14:42:12 UTC (rev 1333)
+++ trunk/src/main/java/cc/kune/common/public/kune-common.css	2011-05-03 08:22:21 UTC (rev 1334)
@@ -144,11 +144,11 @@
 .k-dialog-innerp {
   background-color: #FFFFFF;
   border: solid 1px #F2F2F2;
-  margin: 34px 16px 20px 16px;
+  margin: 0px 4px 10px;
 }
 
 .k-dialog-btn-area {
-  padding: 0 15px 15px 15px;
+  padding: 0 5px 5px 5px;
   margin-bottom: 30px;
 }
 

Modified: trunk/src/main/java/cc/kune/core/client/CoreGinModule.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/CoreGinModule.java	2011-04-29 14:42:12 UTC (rev 1333)
+++ trunk/src/main/java/cc/kune/core/client/CoreGinModule.java	2011-05-03 08:22:21 UTC (rev 1334)
@@ -59,6 +59,7 @@
 import cc.kune.core.client.notify.spiner.SpinerPresenter;
 import cc.kune.core.client.notify.spiner.SpinerViewImpl;
 import cc.kune.core.client.registry.ContentCapabilitiesRegistry;
+import cc.kune.core.client.sitebar.ErrorsDialog;
 import cc.kune.core.client.sitebar.SiteUserOptions;
 import cc.kune.core.client.sitebar.SiteUserOptionsPresenter;
 import cc.kune.core.client.sitebar.SitebarActions;
@@ -207,6 +208,8 @@
         s(SitebarNewGroupLink.class);
         s(SitebarSignInLink.class);
         s(SitebarSignOutLink.class);
+
+        s(ErrorsDialog.class);
     }
 
 }

Modified: trunk/src/main/java/cc/kune/core/client/groups/newgroup/NewGroupPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/groups/newgroup/NewGroupPanel.java	2011-04-29 14:42:12 UTC (rev 1333)
+++ trunk/src/main/java/cc/kune/core/client/groups/newgroup/NewGroupPanel.java	2011-05-03 08:22:21 UTC (rev 1334)
@@ -89,7 +89,6 @@
         dialog = builder.build();
         this.i18n = i18n;
         this.mask = mask;
-        // Field.setMsgTarget("side");
         form = createNewGroupInitialDataForm();
 
         messageErrorBar = new MessageToolbar(img, ERROR_MSG_BAR);

Modified: trunk/src/main/java/cc/kune/core/client/notify/msgs/UserNotifierPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/notify/msgs/UserNotifierPresenter.java	2011-04-29 14:42:12 UTC (rev 1333)
+++ trunk/src/main/java/cc/kune/core/client/notify/msgs/UserNotifierPresenter.java	2011-05-03 08:22:21 UTC (rev 1334)
@@ -19,6 +19,7 @@
  */
 package cc.kune.core.client.notify.msgs;
 
+import cc.kune.common.client.notify.NotifyLevel;
 import cc.kune.core.client.notify.msgs.UserNotifierPresenter.UserNotifierProxy;
 import cc.kune.core.client.notify.msgs.UserNotifierPresenter.UserNotifierView;
 
@@ -46,8 +47,10 @@
     }
 
     @ProxyEvent
-    public void onUserNotify(UserNotifyEvent event) {
-        getView().notify(event);
+    public void onUserNotify(final UserNotifyEvent event) {
+        if (event.getLevel() != NotifyLevel.log) {
+            getView().notify(event);
+        }
     }
 
     @Override

Modified: trunk/src/main/java/cc/kune/core/client/rpcservices/ContentService.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/rpcservices/ContentService.java	2011-04-29 14:42:12 UTC (rev 1333)
+++ trunk/src/main/java/cc/kune/core/client/rpcservices/ContentService.java	2011-05-03 08:22:21 UTC (rev 1334)
@@ -51,6 +51,8 @@
     StateContainerDTO addFolder(String hash, StateToken parentToken, String typeId, String title)
             throws DefaultException;
 
+    void addParticipant(String userHash, StateToken token, String participant) throws DefaultException;
+
     StateContainerDTO addRoom(String user, StateToken parentToken, String name) throws DefaultException;
 
     StateContentDTO delContent(String userHash, StateToken token) throws DefaultException;

Modified: trunk/src/main/java/cc/kune/core/client/rpcservices/ContentServiceAsync.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/rpcservices/ContentServiceAsync.java	2011-04-29 14:42:12 UTC (rev 1333)
+++ trunk/src/main/java/cc/kune/core/client/rpcservices/ContentServiceAsync.java	2011-05-03 08:22:21 UTC (rev 1334)
@@ -21,6 +21,7 @@
 
 import java.util.Date;
 
+import cc.kune.core.client.errors.DefaultException;
 import cc.kune.core.shared.domain.ContentStatus;
 import cc.kune.core.shared.domain.RateResult;
 import cc.kune.core.shared.domain.TagCloudResult;
@@ -49,6 +50,9 @@
     void addFolder(String hash, StateToken parentToken, String title, String typeId,
             AsyncCallback<StateContainerDTO> callback);
 
+    void addParticipant(String userHash, StateToken token, String authorShortName, AsyncCallback<Void> asyncCallback)
+            throws DefaultException;
+
     void addRoom(String user, StateToken parentToken, String name, AsyncCallback<StateContainerDTO> callback);
 
     void delContent(String userHash, StateToken token, AsyncCallback<StateContentDTO> asyncCallback);

Modified: trunk/src/main/java/cc/kune/core/client/sitebar/AboutKuneDialog.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sitebar/AboutKuneDialog.java	2011-04-29 14:42:12 UTC (rev 1333)
+++ trunk/src/main/java/cc/kune/core/client/sitebar/AboutKuneDialog.java	2011-05-03 08:22:21 UTC (rev 1334)
@@ -20,8 +20,6 @@
     public static final String ABOUT_KUNE_BTN_ID = "kune-about-button-diag";
     public static final String ABOUT_KUNE_ID = "kune-about-diag";
     private static final Binder BINDER = GWT.create(Binder.class);
-
-    public static final String SITE_OPTIONS_MENU = "kune-sop-om";
     private final BasicTopDialog dialog;
     @UiField
     FlowPanel flow;
@@ -31,7 +29,7 @@
     @Inject
     public AboutKuneDialog(final I18nTranslationService i18n) {
         dialog = new BasicTopDialog.Builder(ABOUT_KUNE_ID, true, true).title(i18n.t("About Kune")).autoscroll(false).firstButtonTitle(
-                i18n.t("Ok")).firstButtonId(ABOUT_KUNE_BTN_ID).tabIndexStart(1).build();
+                i18n.t("Ok")).firstButtonId(ABOUT_KUNE_BTN_ID).tabIndexStart(1).height("70%").build();
         dialog.getInnerPanel().add(BINDER.createAndBindUi(this));
         dialog.getFirstBtn().addClickHandler(new ClickHandler() {
             @Override

Modified: trunk/src/main/java/cc/kune/core/client/sitebar/AboutKuneDialog.ui.xml
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sitebar/AboutKuneDialog.ui.xml	2011-04-29 14:42:12 UTC (rev 1333)
+++ trunk/src/main/java/cc/kune/core/client/sitebar/AboutKuneDialog.ui.xml	2011-05-03 08:22:21 UTC (rev 1334)
@@ -4,15 +4,12 @@
   xmlns:g='urn:import:com.google.gwt.user.client.ui'>
   <ui:style>
     .panel {
-        width: 400px;
-        height: 400px;
     }
 
     .frame {
         border: 0px;
         margin: 0px;
         width: 100%;
-        height: 400px;
         background-color: #F2F2F2;
     }
   </ui:style>

Added: trunk/src/main/java/cc/kune/core/client/sitebar/ErrorsDialog.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sitebar/ErrorsDialog.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/sitebar/ErrorsDialog.java	2011-05-03 08:22:21 UTC (rev 1334)
@@ -0,0 +1,64 @@
+package cc.kune.core.client.sitebar;
+
+import cc.kune.common.client.notify.NotifyLevel;
+import cc.kune.common.client.ui.IconLabel;
+import cc.kune.common.client.ui.dialogs.BasicTopDialog;
+import cc.kune.core.client.notify.msgs.UserNotifyEvent;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.msgs.client.resources.UserMessageImagesUtil;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.event.shared.EventBus;
+import com.google.gwt.uibinder.client.UiBinder;
+import com.google.gwt.uibinder.client.UiField;
+import com.google.gwt.user.client.ui.InlineLabel;
+import com.google.gwt.user.client.ui.VerticalPanel;
+import com.google.gwt.user.client.ui.Widget;
+import com.google.inject.Inject;
+
+public class ErrorsDialog {
+
+    interface Binder extends UiBinder<Widget, ErrorsDialog> {
+    }
+    private static final Binder BINDER = GWT.create(Binder.class);
+    public static final String ERROR_LOGGER_BUTTON_ID = "kune-error-button-diag";
+    public static final String ERROR_LOGGER_ID = "kune-error-diag";
+
+    private final BasicTopDialog dialog;
+    @UiField
+    VerticalPanel panel;
+
+    @Inject
+    public ErrorsDialog(final I18nTranslationService i18n, final EventBus eventBus) {
+        dialog = new BasicTopDialog.Builder(ERROR_LOGGER_ID, true, true).title(i18n.t("Errors info")).autoscroll(true).firstButtonTitle(
+                i18n.t("Ok")).firstButtonId(ERROR_LOGGER_BUTTON_ID).tabIndexStart(1).height("300px").build();
+        dialog.getTitleText().setText(i18n.t("Info about errors"));
+        final InlineLabel subTitle = new InlineLabel(i18n.t("Please copy/paste this info to report problems"));
+        dialog.getInnerPanel().add(subTitle);
+        dialog.getInnerPanel().add(BINDER.createAndBindUi(this));
+        dialog.getFirstBtn().addClickHandler(new ClickHandler() {
+            @Override
+            public void onClick(final ClickEvent event) {
+                dialog.hide();
+            }
+        });
+        eventBus.addHandler(UserNotifyEvent.getType(), new UserNotifyEvent.UserNotifyHandler() {
+            @Override
+            public void onUserNotify(final UserNotifyEvent event) {
+                final NotifyLevel level = event.getLevel();
+                final IconLabel iconMessage = new IconLabel();
+                iconMessage.setLeftIconResource(UserMessageImagesUtil.getIcon(level));
+                iconMessage.setText(event.getMessage());
+                iconMessage.setWordWrap(true);
+                panel.insert(iconMessage, 0);
+            }
+        });
+    }
+
+    public void showCentered() {
+        dialog.showCentered();
+    }
+
+}

Added: trunk/src/main/java/cc/kune/core/client/sitebar/ErrorsDialog.ui.xml
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sitebar/ErrorsDialog.ui.xml	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/sitebar/ErrorsDialog.ui.xml	2011-05-03 08:22:21 UTC (rev 1334)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
+<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
+  xmlns:g='urn:import:com.google.gwt.user.client.ui'>
+  <ui:style>
+    .panel {
+        background-color: #F2F2F2;
+    }
+  </ui:style>
+<g:ScrollPanel>
+  <g:VerticalPanel styleName="{style.panel}" ui:field="panel">
+  </g:VerticalPanel>
+</g:ScrollPanel>
+</ui:UiBinder>

Modified: trunk/src/main/java/cc/kune/core/client/sitebar/SitebarActionsPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sitebar/SitebarActionsPanel.java	2011-04-29 14:42:12 UTC (rev 1333)
+++ trunk/src/main/java/cc/kune/core/client/sitebar/SitebarActionsPanel.java	2011-05-03 08:22:21 UTC (rev 1334)
@@ -33,16 +33,18 @@
 public class SitebarActionsPanel extends ViewImpl implements SitebarActionsView {
 
     private final Provider<AboutKuneDialog> aboutPanel;
+    private final ErrorsDialog errorPanel;
     private final ActionSimplePanel toolbarLeft;
     private final ActionSimplePanel toolbarRight;
 
     @Inject
     public SitebarActionsPanel(final GSpaceArmor armor, final ActionSimplePanel toolbarRight,
             final ActionSimplePanel toolbarLeft, final I18nTranslationService i18n,
-            final Provider<AboutKuneDialog> aboutPanel) {
+            final Provider<AboutKuneDialog> aboutPanel, final ErrorsDialog errorPanel) {
         this.toolbarRight = toolbarRight;
         this.toolbarLeft = toolbarLeft;
         this.aboutPanel = aboutPanel;
+        this.errorPanel = errorPanel;
         toolbarRight.addStyleName("k-sitebar");
         toolbarRight.addStyleName("k-floatright");
         toolbarLeft.addStyleName("k-sitebar");
@@ -71,4 +73,9 @@
         aboutPanel.get().showCentered();
     }
 
+    @Override
+    public void showErrorDialog() {
+        errorPanel.showCentered();
+    }
+
 }

Modified: trunk/src/main/java/cc/kune/core/client/sitebar/SitebarActionsPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sitebar/SitebarActionsPresenter.java	2011-04-29 14:42:12 UTC (rev 1333)
+++ trunk/src/main/java/cc/kune/core/client/sitebar/SitebarActionsPresenter.java	2011-05-03 08:22:21 UTC (rev 1334)
@@ -54,6 +54,7 @@
     @ProxyCodeSplit
     public interface SitebarActionsProxy extends Proxy<SitebarActionsPresenter> {
     }
+
     public interface SitebarActionsView extends View {
 
         IsActionExtensible getLeftBar();
@@ -61,11 +62,14 @@
         IsActionExtensible getRightBar();
 
         void showAboutDialog();
+
+        void showErrorDialog();
     }
+    public static final ToolbarDescriptor LEFT_TOOLBAR = new ToolbarDescriptor();
 
-    public static final ToolbarDescriptor LEFT_TOOLBAR = new ToolbarDescriptor();
     public static final MenuDescriptor OPTIONS_MENU = new MenuDescriptor();
     public static final ToolbarDescriptor RIGHT_TOOLBAR = new ToolbarDescriptor();
+    public static final String SITE_OPTIONS_MENU = "kune-sop-om";
 
     private final I18nTranslationService i18n;
     private final IconResources icons;
@@ -105,6 +109,7 @@
     }
 
     private void init() {
+        OPTIONS_MENU.withId(SITE_OPTIONS_MENU);
         getView().getLeftBar().add(LEFT_TOOLBAR);
         getView().getRightBar().add(RIGHT_TOOLBAR);
     }
@@ -131,8 +136,13 @@
         bugsAction.putValue(Action.SMALL_ICON, icons.bug());
         final MenuItemDescriptor reportBugs = new MenuItemDescriptor(OPTIONS_MENU, bugsAction);
 
-        // final KeyStroke shortcut = Shortcut.getShortcut(true, true, false,
-        // false, Character.valueOf('K'));
+        final AbstractExtendedAction errorAction = new AbstractExtendedAction() {
+            @Override
+            public void actionPerformed(final ActionEvent event) {
+                getView().showErrorDialog();
+            }
+        };
+
         final AbstractExtendedAction aboutAction = new AbstractExtendedAction() {
             @Override
             public void actionPerformed(final ActionEvent event) {
@@ -146,7 +156,6 @@
                 KuneWindowUtils.open("http://incubator.apache.org/wave/");
             }
         };
-
         final MenuItemDescriptor gotoKuneDevSite = new MenuItemDescriptor(OPTIONS_MENU, new AbstractAction() {
             @Override
             public void actionPerformed(final ActionEvent event) {
@@ -160,6 +169,8 @@
         wavePowered.putValue(Action.SMALL_ICON, res.waveIcon());
         aboutAction.putValue(Action.NAME, i18n.t("About kune"));
         aboutAction.putValue(Action.SMALL_ICON, res.info());
+        errorAction.putValue(Action.NAME, i18n.t("Errors info"));
+        errorAction.putValue(Action.SMALL_ICON, res.important());
         // aboutAction.setShortcut(shortcut);
         // shortcutReg.put(shortcut, aboutAction);
 
@@ -171,10 +182,10 @@
         right.add(OPTIONS_MENU);
         right.add(gotoKuneDevSite);
         right.add(reportBugs);
+        right.add(new MenuItemDescriptor(OPTIONS_MENU, errorAction));
         right.add(new MenuItemDescriptor(OPTIONS_MENU, aboutAction));
         right.add(menuSeparator);
         right.add(new MenuItemDescriptor(OPTIONS_MENU, wavePowered));
-
     }
 
     @Override

Added: trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/IsNotParticipantOfCurrentStateCondition.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/IsNotParticipantOfCurrentStateCondition.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/IsNotParticipantOfCurrentStateCondition.java	2011-05-03 08:22:21 UTC (rev 1334)
@@ -0,0 +1,26 @@
+package cc.kune.core.client.sn.actions.conditions;
+
+import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
+import cc.kune.common.client.actions.ui.descrip.GuiAddCondition;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.shared.dto.StateContentDTO;
+
+import com.google.inject.Inject;
+import com.google.inject.Singleton;
+
+ at Singleton
+public class IsNotParticipantOfCurrentStateCondition implements GuiAddCondition {
+
+    private final Session session;
+
+    @Inject
+    public IsNotParticipantOfCurrentStateCondition(final Session session) {
+        this.session = session;
+    }
+
+    @Override
+    public boolean mustBeAdded(final GuiActionDescrip descr) {
+        final StateContentDTO currentState = session.getContentState();
+        return !currentState.isParticipant();
+    }
+}

Modified: trunk/src/main/java/cc/kune/core/server/content/ContentManager.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/content/ContentManager.java	2011-04-29 14:42:12 UTC (rev 1333)
+++ trunk/src/main/java/cc/kune/core/server/content/ContentManager.java	2011-05-03 08:22:21 UTC (rev 1334)
@@ -45,6 +45,8 @@
 
     void addAuthor(User user, Long contentId, String authorShortName) throws DefaultException;
 
+    void addParticipant(User user, Long contentId, String participant);
+
     Content createContent(String title, String body, User author, Container container, String typeId);
 
     boolean findIfExistsTitle(Container container, String title);

Modified: trunk/src/main/java/cc/kune/core/server/content/ContentManagerDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/content/ContentManagerDefault.java	2011-04-29 14:42:12 UTC (rev 1333)
+++ trunk/src/main/java/cc/kune/core/server/content/ContentManagerDefault.java	2011-05-03 08:22:21 UTC (rev 1334)
@@ -65,255 +65,256 @@
 @Singleton
 public class ContentManagerDefault extends DefaultManager<Content, Long> implements ContentManager {
 
-  private final ContainerFinder containerFinder;
-  private final ContentFinder contentFinder;
-  private final FinderService finder;
-  private final KuneWaveManager kuneWaveManager;
-  private final I18nLanguageFinder languageFinder;
-  private final ParticipantUtils participantUtils;
-  private final TagUserContentManager tagManager;
-  private final UserFinder userFinder;
+    private final ContainerFinder containerFinder;
+    private final ContentFinder contentFinder;
+    private final FinderService finder;
+    private final KuneWaveManager kuneWaveManager;
+    private final I18nLanguageFinder languageFinder;
+    private final ParticipantUtils participantUtils;
+    private final TagUserContentManager tagManager;
+    private final UserFinder userFinder;
 
-  @Inject
-  public ContentManagerDefault(final ContentFinder contentFinder, final ContainerFinder containerFinder,
-      final Provider<EntityManager> provider, final FinderService finder, final UserFinder userFinder,
-      final I18nLanguageFinder languageFinder, final TagUserContentManager tagManager,
-      final KuneWaveManager kuneWaveManager, final ParticipantUtils participantUtils) {
-    super(provider, Content.class);
-    this.contentFinder = contentFinder;
-    this.containerFinder = containerFinder;
-    this.finder = finder;
-    this.userFinder = userFinder;
-    this.languageFinder = languageFinder;
-    this.tagManager = tagManager;
-    this.kuneWaveManager = kuneWaveManager;
-    this.participantUtils = participantUtils;
-  }
+    @Inject
+    public ContentManagerDefault(final ContentFinder contentFinder, final ContainerFinder containerFinder,
+            final Provider<EntityManager> provider, final FinderService finder, final UserFinder userFinder,
+            final I18nLanguageFinder languageFinder, final TagUserContentManager tagManager,
+            final KuneWaveManager kuneWaveManager, final ParticipantUtils participantUtils) {
+        super(provider, Content.class);
+        this.contentFinder = contentFinder;
+        this.containerFinder = containerFinder;
+        this.finder = finder;
+        this.userFinder = userFinder;
+        this.languageFinder = languageFinder;
+        this.tagManager = tagManager;
+        this.kuneWaveManager = kuneWaveManager;
+        this.participantUtils = participantUtils;
+    }
 
-  @Override
-  public void addAuthor(final User user, final Long contentId, final String authorShortName)
-      throws DefaultException {
-    final Content content = finder.getContent(contentId);
-    final User author = userFinder.getByShortName(authorShortName);
-    if (author == null) {
-      throw new UserNotFoundException();
+    @Override
+    public void addAuthor(final User user, final Long contentId, final String authorShortName) throws DefaultException {
+        final Content content = finder.getContent(contentId);
+        final User author = userFinder.getByShortName(authorShortName);
+        if (author == null) {
+            throw new UserNotFoundException();
+        }
+        content.addAuthor(author);
     }
-    content.addAuthor(author);
-  }
 
-  @Override
-  public Content createContent(final String title, final String body, final User author,
-      final Container container, final String typeId) {
-    String contentBody;
-    FilenameUtils.checkBasicFilename(title);
-    final String newtitle = findInexistentTitle(container, title);
-    final Content newContent = new Content();
-    newContent.addAuthor(author);
-    newContent.setLanguage(author.getLanguage());
-    newContent.setTypeId(typeId);
-    container.addContent(newContent);
-    newContent.setContainer(container);
-    final Revision revision = new Revision(newContent);
-    revision.setTitle(newtitle);
-    // Duplicate in StateServiceDefault
-    if (newContent.isWave()) {
-      final WaveRef waveRef = kuneWaveManager.createWave(title, body,
-          participantUtils.of(author.getShortName()));
-      contentBody = JavaWaverefEncoder.encodeToUriPathSegment(waveRef);
-    } else {
-      contentBody = body;
+    @Override
+    public void addParticipant(final User user, final Long contentId, final String participant) {
+        final Content content = finder.getContent(contentId);
+        if (content.isWave()) {
+            kuneWaveManager.addParticipant(getWaveRef(content), content.getAuthors().get(0).getShortName(),
+                    user.getShortName(), participant);
+        }
     }
-    revision.setBody(contentBody);
-    newContent.addRevision(revision);
-    return persist(newContent);
-  }
 
-  private MultiFieldQueryParser createMultiFieldParser() {
-    final MultiFieldQueryParser parser = new MultiFieldQueryParser(DEF_GLOBAL_SEARCH_FIELDS,
-        new StandardAnalyzer());
-    return parser;
-  }
+    @Override
+    public Content createContent(final String title, final String body, final User author, final Container container,
+            final String typeId) {
+        String contentBody;
+        FilenameUtils.checkBasicFilename(title);
+        final String newtitle = findInexistentTitle(container, title);
+        final Content newContent = new Content();
+        newContent.addAuthor(author);
+        newContent.setLanguage(author.getLanguage());
+        newContent.setTypeId(typeId);
+        container.addContent(newContent);
+        newContent.setContainer(container);
+        final Revision revision = new Revision(newContent);
+        revision.setTitle(newtitle);
+        // Duplicate in StateServiceDefault
+        if (newContent.isWave()) {
+            final WaveRef waveRef = kuneWaveManager.createWave(title, body, participantUtils.of(author.getShortName()));
+            contentBody = JavaWaverefEncoder.encodeToUriPathSegment(waveRef);
+        } else {
+            contentBody = body;
+        }
+        revision.setBody(contentBody);
+        newContent.addRevision(revision);
+        return persist(newContent);
+    }
 
-  @Override
-  public boolean findIfExistsTitle(final Container container, final String title) {
-    return (contentFinder.findIfExistsTitle(container, title) > 0)
-        || (containerFinder.findIfExistsTitle(container, title) > 0);
-  }
+    private MultiFieldQueryParser createMultiFieldParser() {
+        final MultiFieldQueryParser parser = new MultiFieldQueryParser(DEF_GLOBAL_SEARCH_FIELDS, new StandardAnalyzer());
+        return parser;
+    }
 
-  private String findInexistentTitle(final Container container, final String title) {
-    String initialTitle = String.valueOf(title);
-    while (findIfExistsTitle(container, initialTitle)) {
-      initialTitle = FileUtils.getNextSequentialFileName(initialTitle);
+    @Override
+    public boolean findIfExistsTitle(final Container container, final String title) {
+        return (contentFinder.findIfExistsTitle(container, title) > 0)
+                || (containerFinder.findIfExistsTitle(container, title) > 0);
     }
-    return initialTitle;
-  }
 
-  @Override
-  public Double getRateAvg(final Content content) {
-    return finder.getRateAvg(content);
-  }
+    private String findInexistentTitle(final Container container, final String title) {
+        String initialTitle = String.valueOf(title);
+        while (findIfExistsTitle(container, initialTitle)) {
+            initialTitle = FileUtils.getNextSequentialFileName(initialTitle);
+        }
+        return initialTitle;
+    }
 
-  @Override
-  public Long getRateByUsers(final Content content) {
-    return finder.getRateByUsers(content);
-  }
+    @Override
+    public Double getRateAvg(final Content content) {
+        return finder.getRateAvg(content);
+    }
 
-  @Override
-  public Double getRateContent(final User rater, final Content content) {
-    final Rate rate = finder.getRate(rater, content);
-    if (rate != null) {
-      return rate.getValue();
-    } else {
-      return null;
+    @Override
+    public Long getRateByUsers(final Content content) {
+        return finder.getRateByUsers(content);
     }
-  }
 
-  @Override
-  public RateResult rateContent(final User rater, final Long contentId, final Double value)
-      throws DefaultException {
-    final Content content = finder.getContent(contentId);
-    final Rate oldRate = finder.getRate(rater, content);
-    if (oldRate == null) {
-      final Rate rate = new Rate(rater, content, value);
-      super.persist(rate, Rate.class);
-    } else {
-      oldRate.setValue(value);
-      super.persist(oldRate, Rate.class);
+    @Override
+    public Double getRateContent(final User rater, final Content content) {
+        final Rate rate = finder.getRate(rater, content);
+        if (rate != null) {
+            return rate.getValue();
+        } else {
+            return null;
+        }
     }
-    final Double rateAvg = getRateAvg(content);
-    final Long rateByUsers = getRateByUsers(content);
-    return new RateResult(rateAvg != null ? rateAvg : 0D, rateByUsers != null ? rateByUsers.intValue()
-        : 0, value);
-  }
 
-  @Override
-  public void removeAuthor(final User user, final Long contentId, final String authorShortName)
-      throws DefaultException {
-    final Content content = finder.getContent(contentId);
-    final User author = userFinder.getByShortName(authorShortName);
-    if (author == null) {
-      throw new UserNotFoundException();
+    private WaveRef getWaveRef(final Content content) {
+        try {
+            return JavaWaverefEncoder.decodeWaveRefFromPath(String.valueOf(content.getLastRevision().getBody()));
+        } catch (final InvalidWaveRefException e) {
+            throw new DefaultException("Error getting the wave");
+        }
     }
-    content.removeAuthor(author);
-  }
 
-  @Override
-  public Content renameContent(final User user, final Long contentId, final String newTitle)
-      throws DefaultException {
-    final String newTitleWithoutNL = FilenameUtils.chomp(newTitle);
-    FilenameUtils.checkBasicFilename(newTitleWithoutNL);
-    final Content content = finder.getContent(contentId);
-    if (findIfExistsTitle(content.getContainer(), newTitleWithoutNL)) {
-      throw new NameInUseException();
+    @Override
+    public RateResult rateContent(final User rater, final Long contentId, final Double value) throws DefaultException {
+        final Content content = finder.getContent(contentId);
+        final Rate oldRate = finder.getRate(rater, content);
+        if (oldRate == null) {
+            final Rate rate = new Rate(rater, content, value);
+            super.persist(rate, Rate.class);
+        } else {
+            oldRate.setValue(value);
+            super.persist(oldRate, Rate.class);
+        }
+        final Double rateAvg = getRateAvg(content);
+        final Long rateByUsers = getRateByUsers(content);
+        return new RateResult(rateAvg != null ? rateAvg : 0D, rateByUsers != null ? rateByUsers.intValue() : 0, value);
     }
-    content.getLastRevision().setTitle(newTitleWithoutNL);
-    if (content.isWave()) {
-      final String author = content.getAuthors().get(0).getShortName();
-      try {
-        kuneWaveManager.setTitle(
-            JavaWaverefEncoder.decodeWaveRefFromPath(String.valueOf(content.getLastRevision().getBody())),
-            newTitle, author);
-      } catch (final InvalidWaveRefException e) {
-        throw new DefaultException("Error setting the wave title");
-      }
+
+    @Override
+    public void removeAuthor(final User user, final Long contentId, final String authorShortName)
+            throws DefaultException {
+        final Content content = finder.getContent(contentId);
+        final User author = userFinder.getByShortName(authorShortName);
+        if (author == null) {
+            throw new UserNotFoundException();
+        }
+        content.removeAuthor(author);
     }
-    return content;
-  }
 
-  @Override
-  public Content save(final User editor, final Content content) {
-    return persist(content);
-  }
+    @Override
+    public Content renameContent(final User user, final Long contentId, final String newTitle) throws DefaultException {
+        final String newTitleWithoutNL = FilenameUtils.chomp(newTitle);
+        FilenameUtils.checkBasicFilename(newTitleWithoutNL);
+        final Content content = finder.getContent(contentId);
+        if (findIfExistsTitle(content.getContainer(), newTitleWithoutNL)) {
+            throw new NameInUseException();
+        }
+        content.getLastRevision().setTitle(newTitleWithoutNL);
+        if (content.isWave()) {
+            final String author = content.getAuthors().get(0).getShortName();
+            kuneWaveManager.setTitle(getWaveRef(content), newTitle, author);
+        }
+        return content;
+    }
 
-  @Override
-  public Content save(final User editor, final Content content, final String body) {
-    final Revision revision = new Revision(content);
-    revision.setEditor(editor);
-    revision.setTitle(content.getTitle());
-    revision.setBody(body);
-    content.addRevision(revision);
-    return persist(content);
-  }
+    @Override
+    public Content save(final User editor, final Content content) {
+        return persist(content);
+    }
 
-  @Override
-  public SearchResult<Content> search(final String search) {
-    return this.search(search, null, null);
-  }
+    @Override
+    public Content save(final User editor, final Content content, final String body) {
+        final Revision revision = new Revision(content);
+        revision.setEditor(editor);
+        revision.setTitle(content.getTitle());
+        revision.setBody(body);
+        content.addRevision(revision);
+        return persist(content);
+    }
 
-  @Override
-  public SearchResult<Content> search(final String search, final Integer firstResult,
-      final Integer maxResults) {
-    final MultiFieldQueryParser parser = createMultiFieldParser();
-    Query query;
-    try {
-      query = parser.parse(search);
-    } catch (final ParseException e) {
-      throw new ServerManagerException("Error parsing search");
+    @Override
+    public SearchResult<Content> search(final String search) {
+        return this.search(search, null, null);
     }
-    return super.search(query, firstResult, maxResults);
-  }
 
-  @Override
-  public SearchResult<Content> searchMime(final String search, final Integer firstResult,
-      final Integer maxResults, final String groupShortName, final String mimetype) {
-    final List<Content> list = contentFinder.findMime(groupShortName, "%" + search + "%", mimetype,
-        firstResult, maxResults);
-    final Long count = contentFinder.findMimeCount(groupShortName, "%" + search + "%", mimetype);
-    return new SearchResult<Content>(count.intValue(), list);
-  }
+    @Override
+    public SearchResult<Content> search(final String search, final Integer firstResult, final Integer maxResults) {
+        final MultiFieldQueryParser parser = createMultiFieldParser();
+        Query query;
+        try {
+            query = parser.parse(search);
+        } catch (final ParseException e) {
+            throw new ServerManagerException("Error parsing search");
+        }
+        return super.search(query, firstResult, maxResults);
+    }
 
-  @Override
-  public SearchResult<?> searchMime(final String search, final Integer firstResult,
-      final Integer maxResults, final String groupShortName, final String mimetype,
-      final String mimetype2) {
-    final List<Content> list = contentFinder.find2Mime(groupShortName, "%" + search + "%", mimetype,
-        mimetype2, firstResult, maxResults);
-    final Long count = contentFinder.find2MimeCount(groupShortName, "%" + search + "%", mimetype,
-        mimetype2);
-    return new SearchResult<Content>(count.intValue(), list);
-  }
+    @Override
+    public SearchResult<Content> searchMime(final String search, final Integer firstResult, final Integer maxResults,
+            final String groupShortName, final String mimetype) {
+        final List<Content> list = contentFinder.findMime(groupShortName, "%" + search + "%", mimetype, firstResult,
+                maxResults);
+        final Long count = contentFinder.findMimeCount(groupShortName, "%" + search + "%", mimetype);
+        return new SearchResult<Content>(count.intValue(), list);
+    }
 
-  @Override
-  public I18nLanguage setLanguage(final User user, final Long contentId, final String languageCode)
-      throws DefaultException {
-    final Content content = finder.getContent(contentId);
-    final I18nLanguage language = languageFinder.findByCode(languageCode);
-    if (language == null) {
-      throw new I18nNotFoundException();
+    @Override
+    public SearchResult<?> searchMime(final String search, final Integer firstResult, final Integer maxResults,
+            final String groupShortName, final String mimetype, final String mimetype2) {
+        final List<Content> list = contentFinder.find2Mime(groupShortName, "%" + search + "%", mimetype, mimetype2,
+                firstResult, maxResults);
+        final Long count = contentFinder.find2MimeCount(groupShortName, "%" + search + "%", mimetype, mimetype2);
+        return new SearchResult<Content>(count.intValue(), list);
     }
-    content.setLanguage(language);
-    return language;
-  }
 
-  @Override
-  public void setPublishedOn(final User user, final Long contentId, final Date publishedOn)
-      throws DefaultException {
-    final Content content = finder.getContent(contentId);
-    content.setPublishedOn(publishedOn);
-  }
+    @Override
+    public I18nLanguage setLanguage(final User user, final Long contentId, final String languageCode)
+            throws DefaultException {
+        final Content content = finder.getContent(contentId);
+        final I18nLanguage language = languageFinder.findByCode(languageCode);
+        if (language == null) {
+            throw new I18nNotFoundException();
+        }
+        content.setLanguage(language);
+        return language;
+    }
 
-  @Override
-  public Content setStatus(final Long contentId, final ContentStatus status) {
-    final Content content = finder.getContent(contentId);
-    content.setStatus(status);
-    switch (status) {
-    case publishedOnline:
-      content.setPublishedOn(new Date());
-      content.setDeletedOn(null);
-      break;
-    case inTheDustbin:
-      content.setDeletedOn(new Date());
-      content.setPublishedOn(null);
-      break;
-    default:
-      break;
+    @Override
+    public void setPublishedOn(final User user, final Long contentId, final Date publishedOn) throws DefaultException {
+        final Content content = finder.getContent(contentId);
+        content.setPublishedOn(publishedOn);
     }
-    return content;
-  }
 
-  @Override
-  public void setTags(final User user, final Long contentId, final String tags) throws DefaultException {
-    final Content content = finder.getContent(contentId);
-    tagManager.setTags(user, content, tags);
-  }
+    @Override
+    public Content setStatus(final Long contentId, final ContentStatus status) {
+        final Content content = finder.getContent(contentId);
+        content.setStatus(status);
+        switch (status) {
+        case publishedOnline:
+            content.setPublishedOn(new Date());
+            content.setDeletedOn(null);
+            break;
+        case inTheDustbin:
+            content.setDeletedOn(new Date());
+            content.setPublishedOn(null);
+            break;
+        default:
+            break;
+        }
+        return content;
+    }
+
+    @Override
+    public void setTags(final User user, final Long contentId, final String tags) throws DefaultException {
+        final Content content = finder.getContent(contentId);
+        tagManager.setTags(user, content, tags);
+    }
 }

Modified: trunk/src/main/java/cc/kune/core/server/rpc/ContentRPC.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/rpc/ContentRPC.java	2011-04-29 14:42:12 UTC (rev 1333)
+++ trunk/src/main/java/cc/kune/core/server/rpc/ContentRPC.java	2011-05-03 08:22:21 UTC (rev 1334)
@@ -169,6 +169,17 @@
 
     @Override
     @Authenticated
+    @Authorizated(accessRolRequired = AccessRol.Editor, mustCheckMembership = false)
+    @Transactional
+    public void addParticipant(final String userHash, final StateToken token, final String participant)
+            throws DefaultException {
+        final Long contentId = ContentUtils.parseId(token.getDocument());
+        final User user = getCurrentUser();
+        contentManager.addParticipant(user, contentId, participant);
+    }
+
+    @Override
+    @Authenticated
     @Authorizated(actionLevel = ActionLevel.container, accessRolRequired = AccessRol.Editor)
     @Transactional
     public StateContainerDTO addRoom(final String userHash, final StateToken parentToken, final String roomName)

Modified: trunk/src/main/java/cc/kune/core/server/state/StateContent.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/state/StateContent.java	2011-04-29 14:42:12 UTC (rev 1333)
+++ trunk/src/main/java/cc/kune/core/server/state/StateContent.java	2011-05-03 08:22:21 UTC (rev 1334)
@@ -28,137 +28,144 @@
 import cc.kune.domain.User;
 
 public class StateContent extends StateContainer {
+    private List<User> authors;
+    private String content;
+    private AccessRights contentRights;
+    private Double currentUserRate;
+    private String documentId;
+    private boolean isParticipant;
+    private boolean isWave;
+    private BasicMimeType mimeType;
+    private Date publishedOn;
+    private Double rate;
+    private Integer rateByUsers;
+    private ContentStatus status;
+    private String tags;
+    private int version;
+    private String waveRef;
 
-  private List<User> authors;
-  private String content;
-  private AccessRights contentRights;
-  private Double currentUserRate;
-  private String documentId;
-  private boolean isWave;
-  private BasicMimeType mimeType;
-  private Date publishedOn;
-  private Double rate;
-  private Integer rateByUsers;
-  private ContentStatus status;
-  private String tags;
-  private int version;
-  private String waveRef;
+    public StateContent() {
+    }
 
-  public StateContent() {
-  }
+    public List<User> getAuthors() {
+        return authors;
+    }
 
-  public List<User> getAuthors() {
-    return authors;
-  }
+    public String getContent() {
+        return content;
+    }
 
-  public String getContent() {
-    return content;
-  }
+    public AccessRights getContentRights() {
+        return contentRights;
+    }
 
-  public AccessRights getContentRights() {
-    return contentRights;
-  }
+    public Double getCurrentUserRate() {
+        return currentUserRate;
+    }
 
-  public Double getCurrentUserRate() {
-    return currentUserRate;
-  }
+    public String getDocumentId() {
+        return documentId;
+    }
 
-  public String getDocumentId() {
-    return documentId;
-  }
+    public BasicMimeType getMimeType() {
+        return mimeType;
+    }
 
-  public BasicMimeType getMimeType() {
-    return mimeType;
-  }
+    public Date getPublishedOn() {
+        return publishedOn;
+    }
 
-  public Date getPublishedOn() {
-    return publishedOn;
-  }
+    public Double getRate() {
+        return rate;
+    }
 
-  public Double getRate() {
-    return rate;
-  }
+    public Integer getRateByUsers() {
+        return rateByUsers;
+    }
 
-  public Integer getRateByUsers() {
-    return rateByUsers;
-  }
+    public ContentStatus getStatus() {
+        return status;
+    }
 
-  public ContentStatus getStatus() {
-    return status;
-  }
+    public String getTags() {
+        return tags;
+    }
 
-  public String getTags() {
-    return tags;
-  }
+    public int getVersion() {
+        return version;
+    }
 
-  public int getVersion() {
-    return version;
-  }
+    public String getWaveRef() {
+        return waveRef;
+    }
 
-  public String getWaveRef() {
-    return waveRef;
-  }
+    public boolean isParticipant() {
+        return isParticipant;
+    }
 
-  public boolean isWave() {
-    return waveRef != null;
-  }
+    public boolean isWave() {
+        return waveRef != null;
+    }
 
-  public void setAuthors(final List<User> authors) {
-    this.authors = authors;
-  }
+    public void setAuthors(final List<User> authors) {
+        this.authors = authors;
+    }
 
-  public void setContent(final String content) {
-    this.content = content;
-  }
+    public void setContent(final String content) {
+        this.content = content;
+    }
 
-  public void setContentRights(final AccessRights contentRights) {
-    this.contentRights = contentRights;
-  }
+    public void setContentRights(final AccessRights contentRights) {
+        this.contentRights = contentRights;
+    }
 
-  public void setCurrentUserRate(final Double currentUserRate) {
-    this.currentUserRate = currentUserRate;
-  }
+    public void setCurrentUserRate(final Double currentUserRate) {
+        this.currentUserRate = currentUserRate;
+    }
 
-  public void setDocumentId(final String documentId) {
-    this.documentId = documentId;
-  }
+    public void setDocumentId(final String documentId) {
+        this.documentId = documentId;
+    }
 
-  public void setMimeType(final BasicMimeType mimeType) {
-    this.mimeType = mimeType;
-  }
+    void setIsParticipant(final boolean isParticipant) {
+        this.isParticipant = isParticipant;
+    }
 
-  public void setPublishedOn(final Date publishedOn) {
-    this.publishedOn = publishedOn;
-  }
+    public void setMimeType(final BasicMimeType mimeType) {
+        this.mimeType = mimeType;
+    }
 
-  public void setRate(final Double rate) {
-    this.rate = rate;
-  }
+    public void setPublishedOn(final Date publishedOn) {
+        this.publishedOn = publishedOn;
+    }
 
-  public void setRateByUsers(final Integer rateByUsers) {
-    this.rateByUsers = rateByUsers;
-  }
+    public void setRate(final Double rate) {
+        this.rate = rate;
+    }
 
-  public void setStatus(final ContentStatus status) {
-    this.status = status;
-  }
+    public void setRateByUsers(final Integer rateByUsers) {
+        this.rateByUsers = rateByUsers;
+    }
 
-  public void setTags(final String tags) {
-    this.tags = tags;
-  }
+    public void setStatus(final ContentStatus status) {
+        this.status = status;
+    }
 
-  public void setVersion(final int version) {
-    this.version = version;
-  }
+    public void setTags(final String tags) {
+        this.tags = tags;
+    }
 
-  public void setWaveRef(final String waveRef) {
-    this.waveRef = waveRef;
-  }
+    public void setVersion(final int version) {
+        this.version = version;
+    }
 
-  @Override
-  public String toString() {
-    return "State[" + getStateToken() + "/" + getTypeId() + (mimeType != null ? "-" + mimeType : "")
-        + "]";
-  }
+    public void setWaveRef(final String waveRef) {
+        this.waveRef = waveRef;
+    }
 
+    @Override
+    public String toString() {
+        return "State[" + getStateToken() + "/" + getTypeId() + (mimeType != null ? "-" + mimeType : "") + "]";
+    }
+
 }

Modified: trunk/src/main/java/cc/kune/core/server/state/StateServiceDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/state/StateServiceDefault.java	2011-04-29 14:42:12 UTC (rev 1333)
+++ trunk/src/main/java/cc/kune/core/server/state/StateServiceDefault.java	2011-05-03 08:22:21 UTC (rev 1334)
@@ -44,123 +44,123 @@
 @Singleton
 public class StateServiceDefault implements StateService {
 
-  private final ContentManager contentManager;
-  private final GroupManager groupManager;
-  private final I18nTranslationService i18n;
-  private final KuneWaveManager kuneWaveManager;
-  private final AccessRightsService rightsService;
-  private final SocialNetworkManager socialNetworkManager;
-  private final TagUserContentManager tagManager;
+    private final ContentManager contentManager;
+    private final GroupManager groupManager;
+    private final I18nTranslationService i18n;
+    private final KuneWaveManager kuneWaveManager;
+    private final AccessRightsService rightsService;
+    private final SocialNetworkManager socialNetworkManager;
+    private final TagUserContentManager tagManager;
 
-  @Inject
-  public StateServiceDefault(final GroupManager groupManager,
-      final SocialNetworkManager socialNetworkManager, final ContentManager contentManager,
-      final TagUserContentManager tagManager, final AccessRightsService rightsService,
-      final I18nTranslationService i18n, final KuneWaveManager kuneWaveManager) {
-    this.groupManager = groupManager;
-    this.socialNetworkManager = socialNetworkManager;
-    this.contentManager = contentManager;
-    this.tagManager = tagManager;
-    this.rightsService = rightsService;
-    this.i18n = i18n;
-    this.kuneWaveManager = kuneWaveManager;
-  }
+    @Inject
+    public StateServiceDefault(final GroupManager groupManager, final SocialNetworkManager socialNetworkManager,
+            final ContentManager contentManager, final TagUserContentManager tagManager,
+            final AccessRightsService rightsService, final I18nTranslationService i18n,
+            final KuneWaveManager kuneWaveManager) {
+        this.groupManager = groupManager;
+        this.socialNetworkManager = socialNetworkManager;
+        this.contentManager = contentManager;
+        this.tagManager = tagManager;
+        this.rightsService = rightsService;
+        this.i18n = i18n;
+        this.kuneWaveManager = kuneWaveManager;
+    }
 
-  private Container calculateRootContainer(final Container container) {
-    return container.isRoot() ? container : container.getAbsolutePath().get(0);
-  }
+    private Container calculateRootContainer(final Container container) {
+        return container.isRoot() ? container : container.getAbsolutePath().get(0);
+    }
 
-  @Override
-  public StateContainer create(final User userLogged, final Container container) {
-    final StateContainer state = new StateContainer();
-    state.setTitle(container.getName());
-    state.setTypeId(container.getTypeId());
-    state.setLanguage(container.getLanguage());
-    state.setStateToken(container.getStateToken());
-    state.setRootContainer(calculateRootContainer(container));
-    state.setLicense(container.getOwner().getDefaultLicense());
-    state.setAccessLists(container.getAccessLists());
-    final Group group = container.getOwner();
-    setCommon(state, userLogged, group, container);
-    return state;
-  }
+    @Override
+    public StateContainer create(final User userLogged, final Container container) {
+        final StateContainer state = new StateContainer();
+        state.setTitle(container.getName());
+        state.setTypeId(container.getTypeId());
+        state.setLanguage(container.getLanguage());
+        state.setStateToken(container.getStateToken());
+        state.setRootContainer(calculateRootContainer(container));
+        state.setLicense(container.getOwner().getDefaultLicense());
+        state.setAccessLists(container.getAccessLists());
+        final Group group = container.getOwner();
+        setCommon(state, userLogged, group, container);
+        return state;
+    }
 
-  @Override
-  public StateContent create(final User userLogged, final Content content) {
-    final StateContent state = new StateContent();
-    final String typeId = content.getTypeId();
-    state.setTypeId(typeId);
-    state.setMimeType(content.getMimeType());
-    state.setDocumentId(content.getId().toString());
-    state.setLanguage(content.getLanguage());
-    state.setPublishedOn(content.getPublishedOn());
-    state.setAuthors(content.getAuthors());
-    state.setTags(tagManager.getTagsAsString(userLogged, content));
-    state.setStatus(content.getStatus());
-    state.setStateToken(content.getStateToken());
-    final Revision revision = content.getLastRevision();
-    state.setVersion(content.getVersion());
-    final char[] text = revision.getBody();
-    final String textBody = text == null ? null : new String(text);
-    if (content.isWave()) {
-      state.setWaveRef(textBody);
-      try {
-        final Wavelet wavelet = kuneWaveManager.fetchWavelet(
-            JavaWaverefEncoder.decodeWaveRefFromPath(textBody),
-            content.getAuthors().get(0).getShortName());
-        state.setContent(wavelet.getRootBlip().getContent());
-        state.setTitle(wavelet.getTitle());
-      } catch (final InvalidWaveRefException e) {
-        throw new DefaultException("Error retriving Wave");
-      }
-    } else {
-      state.setContent(textBody);
-      state.setTitle(revision.getTitle());
+    @Override
+    public StateContent create(final User userLogged, final Content content) {
+        final StateContent state = new StateContent();
+        final String typeId = content.getTypeId();
+        state.setTypeId(typeId);
+        state.setMimeType(content.getMimeType());
+        state.setDocumentId(content.getId().toString());
+        state.setLanguage(content.getLanguage());
+        state.setPublishedOn(content.getPublishedOn());
+        state.setAuthors(content.getAuthors());
+        state.setTags(tagManager.getTagsAsString(userLogged, content));
+        state.setStatus(content.getStatus());
+        state.setStateToken(content.getStateToken());
+        final Revision revision = content.getLastRevision();
+        state.setVersion(content.getVersion());
+        final char[] text = revision.getBody();
+        final String textBody = text == null ? null : new String(text);
+        if (content.isWave()) {
+            state.setWaveRef(textBody);
+            try {
+                final Wavelet wavelet = kuneWaveManager.fetchWavelet(
+                        JavaWaverefEncoder.decodeWaveRefFromPath(textBody), content.getAuthors().get(0).getShortName());
+                state.setContent(wavelet.getRootBlip().getContent());
+                state.setTitle(wavelet.getTitle());
+                state.setIsParticipant(kuneWaveManager.isParticipant(wavelet, userLogged.getShortName()));
+            } catch (final InvalidWaveRefException e) {
+                throw new DefaultException("Error retriving Wave");
+            }
+        } else {
+            state.setContent(textBody);
+            state.setTitle(revision.getTitle());
+        }
+        final Container container = content.getContainer();
+        state.setRootContainer(calculateRootContainer(container));
+        final License license = content.getLicense();
+        final Group group = container.getOwner();
+        state.setLicense(license == null ? group.getDefaultLicense() : license);
+        state.setContentRights(rightsService.get(userLogged, content.getAccessLists()));
+        state.setAccessLists(content.getAccessLists());
+        setCommon(state, userLogged, group, container);
+        if (userLogged != User.UNKNOWN_USER) {
+            state.setCurrentUserRate(contentManager.getRateContent(userLogged, content));
+        }
+        // FIXME: user RateResult
+        final Double rateAvg = contentManager.getRateAvg(content);
+        state.setRate(rateAvg != null ? rateAvg : 0D);
+        final Long rateByUsers = contentManager.getRateByUsers(content);
+        state.setRateByUsers(rateByUsers != null ? rateByUsers.intValue() : 0);
+        return state;
     }
-    final Container container = content.getContainer();
-    state.setRootContainer(calculateRootContainer(container));
-    final License license = content.getLicense();
-    final Group group = container.getOwner();
-    state.setLicense(license == null ? group.getDefaultLicense() : license);
-    state.setContentRights(rightsService.get(userLogged, content.getAccessLists()));
-    state.setAccessLists(content.getAccessLists());
-    setCommon(state, userLogged, group, container);
-    if (userLogged != User.UNKNOWN_USER) {
-      state.setCurrentUserRate(contentManager.getRateContent(userLogged, content));
+
+    @Override
+    public StateNoContent createNoHome(final User userLogged, final String groupShortName) {
+        final Group group = groupManager.findByShortName(groupShortName);
+        assert (group.isPersonal());
+        final StateNoContent state = new StateNoContent();
+        state.setGroup(group);
+        state.setEnabledTools(groupManager.findEnabledTools(group.getId()));
+        setSocialNetwork(state, userLogged, group);
+        state.setStateToken(group.getStateToken());
+        state.setTitle("<h2>" + i18n.t("This user does not have a homepage") + "</h2>");
+        return state;
     }
-    // FIXME: user RateResult
-    final Double rateAvg = contentManager.getRateAvg(content);
-    state.setRate(rateAvg != null ? rateAvg : 0D);
-    final Long rateByUsers = contentManager.getRateByUsers(content);
-    state.setRateByUsers(rateByUsers != null ? rateByUsers.intValue() : 0);
-    return state;
-  }
 
-  @Override
-  public StateNoContent createNoHome(final User userLogged, final String groupShortName) {
-    final Group group = groupManager.findByShortName(groupShortName);
-    assert (group.isPersonal());
-    final StateNoContent state = new StateNoContent();
-    state.setGroup(group);
-    state.setEnabledTools(groupManager.findEnabledTools(group.getId()));
-    setSocialNetwork(state, userLogged, group);
-    state.setStateToken(group.getStateToken());
-    state.setTitle("<h2>" + i18n.t("This user does not have a homepage") + "</h2>");
-    return state;
-  }
+    private void setCommon(final StateContainer state, final User userLogged, final Group group,
+            final Container container) {
+        state.setToolName(container.getToolName());
+        state.setGroup(group);
+        state.setContainer(container);
+        state.setContainerRights(rightsService.get(userLogged, container.getAccessLists()));
+        state.setEnabledTools(groupManager.findEnabledTools(group.getId()));
+        state.setTagCloudResult(tagManager.getTagCloudResultByGroup(group));
+        setSocialNetwork(state, userLogged, group);
+    }
 
-  private void setCommon(final StateContainer state, final User userLogged, final Group group,
-      final Container container) {
-    state.setToolName(container.getToolName());
-    state.setGroup(group);
-    state.setContainer(container);
-    state.setContainerRights(rightsService.get(userLogged, container.getAccessLists()));
-    state.setEnabledTools(groupManager.findEnabledTools(group.getId()));
-    state.setTagCloudResult(tagManager.getTagCloudResultByGroup(group));
-    setSocialNetwork(state, userLogged, group);
-  }
-
-  private void setSocialNetwork(final StateAbstract state, final User userLogged, final Group group) {
-    state.setSocialNetworkData(socialNetworkManager.getSocialNetworkData(userLogged, group));
-  }
+    private void setSocialNetwork(final StateAbstract state, final User userLogged, final Group group) {
+        state.setSocialNetworkData(socialNetworkManager.getSocialNetworkData(userLogged, group));
+    }
 }

Modified: trunk/src/main/java/cc/kune/core/shared/dto/StateContentDTO.java
===================================================================
--- trunk/src/main/java/cc/kune/core/shared/dto/StateContentDTO.java	2011-04-29 14:42:12 UTC (rev 1333)
+++ trunk/src/main/java/cc/kune/core/shared/dto/StateContentDTO.java	2011-05-03 08:22:21 UTC (rev 1334)
@@ -35,6 +35,7 @@
     private AccessRights contentRights;
     private Double currentUserRate;
     private String documentId;
+    private boolean isParticipant;
     private BasicMimeTypeDTO mimeType;
     private Date publishedOn;
     private Double rate;
@@ -99,6 +100,10 @@
         return waveRef;
     }
 
+    public boolean isParticipant() {
+        return isParticipant;
+    }
+
     public void setAuthors(final List<UserSimpleDTO> authors) {
         this.authors = authors;
     }
@@ -119,6 +124,10 @@
         this.documentId = documentId;
     }
 
+    void setIsParticipant(final boolean isParticipant) {
+        this.isParticipant = isParticipant;
+    }
+
     public void setMimeType(final BasicMimeTypeDTO mimeType) {
         this.mimeType = mimeType;
     }

Modified: trunk/src/main/java/cc/kune/docs/client/actions/DocsClientActions.java
===================================================================
--- trunk/src/main/java/cc/kune/docs/client/actions/DocsClientActions.java	2011-04-29 14:42:12 UTC (rev 1333)
+++ trunk/src/main/java/cc/kune/docs/client/actions/DocsClientActions.java	2011-05-03 08:22:21 UTC (rev 1334)
@@ -23,6 +23,7 @@
 import static cc.kune.docs.shared.DocsConstants.TYPE_FOLDER;
 import static cc.kune.docs.shared.DocsConstants.TYPE_ROOT;
 import static cc.kune.docs.shared.DocsConstants.TYPE_UPLOADEDFILE;
+import cc.kune.blogs.client.actions.ContentViewerOptionsMenu;
 import cc.kune.core.client.actions.ActionRegistryByType;
 import cc.kune.core.client.i18n.I18nUITranslationService;
 import cc.kune.core.client.resources.CoreResources;
@@ -30,7 +31,8 @@
 import cc.kune.core.client.state.StateManager;
 import cc.kune.gspace.client.actions.AbstractFoldableToolActions;
 import cc.kune.gspace.client.actions.ActionGroups;
-import cc.kune.gspace.client.actions.RefreshContentBtn;
+import cc.kune.gspace.client.actions.ParticipateInContentBtn;
+import cc.kune.gspace.client.actions.RefreshContentMenuItem;
 import cc.kune.gspace.client.actions.SetAsHomePageMenuItem;
 
 import com.google.inject.Inject;
@@ -38,34 +40,39 @@
 
 public class DocsClientActions extends AbstractFoldableToolActions {
 
-  final String[] all = { TYPE_ROOT, TYPE_FOLDER, TYPE_DOCUMENT, TYPE_UPLOADEDFILE };
-  final String[] containers = { TYPE_ROOT, TYPE_FOLDER };
-  final String[] containersNoRoot = { TYPE_FOLDER };
-  final String[] contents = { TYPE_DOCUMENT, TYPE_UPLOADEDFILE };
-  final String[] contentsModerated = { TYPE_DOCUMENT, TYPE_UPLOADEDFILE };
+    final String[] all = { TYPE_ROOT, TYPE_FOLDER, TYPE_DOCUMENT, TYPE_UPLOADEDFILE };
+    final String[] containers = { TYPE_ROOT, TYPE_FOLDER };
+    final String[] containersNoRoot = { TYPE_FOLDER };
+    final String[] contents = { TYPE_DOCUMENT, TYPE_UPLOADEDFILE };
+    final String[] contentsModerated = { TYPE_DOCUMENT, TYPE_UPLOADEDFILE };
 
-  @Inject
-  public DocsClientActions(final I18nUITranslationService i18n, final Session session,
-      final StateManager stateManager, final ActionRegistryByType registry, final CoreResources res,
-      final Provider<GoParentFolderBtn> folderGoUp, final Provider<NewDocBtn> newDocBtn,
-      final Provider<NewFolderBtn> newFolderBtn, final Provider<OpenDocMenuItem> openContentMenuItem,
-      final Provider<DelDocMenuItem> delContentMenuItem,
-      final Provider<DelFolderMenuItem> delFolderMenuItem, final Provider<RefreshContentBtn> refresh,
-      final Provider<SetAsHomePageMenuItem> setAsHomePage) {
-    super(session, stateManager, i18n, registry);
-    actionsRegistry.addAction(ActionGroups.VIEW, folderGoUp, contents);
-    actionsRegistry.addAction(ActionGroups.VIEW, folderGoUp, containersNoRoot);
-    actionsRegistry.addAction(ActionGroups.VIEW, newDocBtn, containers);
-    actionsRegistry.addAction(ActionGroups.VIEW, newFolderBtn, containers);
-    actionsRegistry.addAction(ActionGroups.VIEW, refresh, all);
-    actionsRegistry.addAction(ActionGroups.MENUITEM, openContentMenuItem, contents);
-    actionsRegistry.addAction(ActionGroups.MENUITEM, openContentMenuItem, containersNoRoot);
-    actionsRegistry.addAction(ActionGroups.MENUITEM, delContentMenuItem, contents);
-    actionsRegistry.addAction(ActionGroups.MENUITEM, delFolderMenuItem, containersNoRoot);
-    actionsRegistry.addAction(ActionGroups.MENUITEM, setAsHomePage, contents);
-  }
+    @Inject
+    public DocsClientActions(final I18nUITranslationService i18n, final Session session,
+            final StateManager stateManager, final ActionRegistryByType registry, final CoreResources res,
+            final Provider<GoParentFolderBtn> folderGoUp, final Provider<NewDocBtn> newDocBtn,
+            final Provider<NewFolderBtn> newFolderBtn, final Provider<OpenDocMenuItem> openContentMenuItem,
+            final Provider<DelDocMenuItem> delContentMenuItem,
+            final Provider<ContentViewerOptionsMenu> optionsMenuContent,
+            final Provider<ParticipateInContentBtn> participateBtn,
+            final Provider<DelFolderMenuItem> delFolderMenuItem, final Provider<RefreshContentMenuItem> refresh,
+            final Provider<SetAsHomePageMenuItem> setAsHomePage) {
+        super(session, stateManager, i18n, registry);
+        actionsRegistry.addAction(ActionGroups.VIEW, optionsMenuContent, all);
+        actionsRegistry.addAction(ActionGroups.VIEW, refresh, all);
+        actionsRegistry.addAction(ActionGroups.VIEW, folderGoUp, contents);
+        actionsRegistry.addAction(ActionGroups.VIEW, folderGoUp, containersNoRoot);
+        actionsRegistry.addAction(ActionGroups.VIEW, newDocBtn, containers);
+        actionsRegistry.addAction(ActionGroups.VIEW, participateBtn,
+         contents);
+        actionsRegistry.addAction(ActionGroups.VIEW, newFolderBtn, containers);
+        actionsRegistry.addAction(ActionGroups.MENUITEM, openContentMenuItem, contents);
+        actionsRegistry.addAction(ActionGroups.MENUITEM, openContentMenuItem, containersNoRoot);
+        actionsRegistry.addAction(ActionGroups.MENUITEM, delContentMenuItem, contents);
+        actionsRegistry.addAction(ActionGroups.MENUITEM, delFolderMenuItem, containersNoRoot);
+        actionsRegistry.addAction(ActionGroups.MENUITEM, setAsHomePage, contents);
+    }
 
-  @Override
-  protected void createPostSessionInitActions() {
-  }
+    @Override
+    protected void createPostSessionInitActions() {
+    }
 }

Modified: trunk/src/main/java/cc/kune/gspace/client/GSpaceGinModule.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/GSpaceGinModule.java	2011-04-29 14:42:12 UTC (rev 1333)
+++ trunk/src/main/java/cc/kune/gspace/client/GSpaceGinModule.java	2011-05-03 08:22:21 UTC (rev 1334)
@@ -19,6 +19,7 @@
  */
 package cc.kune.gspace.client;
 
+import cc.kune.blogs.client.actions.ContentViewerOptionsMenu;
 import cc.kune.client.ExtendedGinModule;
 import cc.kune.gspace.client.actions.RenameAction;
 import cc.kune.gspace.client.options.GroupOptions;
@@ -81,56 +82,58 @@
 
 public class GSpaceGinModule extends ExtendedGinModule {
 
-  /*
-   * (non-Javadoc)
-   * 
-   * @see com.google.gwt.inject.client.AbstractGinModule#configure()
-   */
-  @Override
-  protected void configure() {
-    bindPresenter(EntityLicensePresenter.class, EntityLicensePresenter.EntityLicenseView.class,
-        EntityLicensePanel.class, EntityLicensePresenter.EntityLicenseProxy.class);
-    bindPresenter(TagsSummaryPresenter.class, TagsSummaryPresenter.TagsSummaryView.class,
-        TagsSummaryPanel.class, TagsSummaryPresenter.TagsSummaryProxy.class);
-    bind(GSpaceArmorImpl.class).in(Singleton.class);
-    bind(GSpaceArmor.class).to(GSpaceArmorImpl.class).in(Singleton.class);
-    bind(GSpaceParts.class).asEagerSingleton();
-    bindPresenter(ToolSelectorPresenter.class, ToolSelectorPresenter.ToolSelectorView.class,
-        ToolSelectorPanel.class, ToolSelectorPresenter.ToolSelectorProxy.class);
-    bind(ToolSelector.class).to(ToolSelectorPresenter.class).in(Singleton.class);
-    bindPresenter(DocViewerPresenter.class, DocViewerPresenter.DocViewerView.class,
-        DocViewerPanel.class, DocViewerPresenter.DocViewerProxy.class);
-    bindPresenter(FolderViewerPresenter.class, FolderViewerPresenter.FolderViewerView.class,
-        FolderViewerAsTablePanel.class, FolderViewerPresenter.FolderViewerProxy.class);
+    /*
+     * (non-Javadoc)
+     * 
+     * @see com.google.gwt.inject.client.AbstractGinModule#configure()
+     */
+    @Override
+    protected void configure() {
+        bindPresenter(EntityLicensePresenter.class, EntityLicensePresenter.EntityLicenseView.class,
+                EntityLicensePanel.class, EntityLicensePresenter.EntityLicenseProxy.class);
+        bindPresenter(TagsSummaryPresenter.class, TagsSummaryPresenter.TagsSummaryView.class, TagsSummaryPanel.class,
+                TagsSummaryPresenter.TagsSummaryProxy.class);
+        bind(GSpaceArmorImpl.class).in(Singleton.class);
+        bind(GSpaceArmor.class).to(GSpaceArmorImpl.class).in(Singleton.class);
+        bind(GSpaceParts.class).asEagerSingleton();
+        bindPresenter(ToolSelectorPresenter.class, ToolSelectorPresenter.ToolSelectorView.class,
+                ToolSelectorPanel.class, ToolSelectorPresenter.ToolSelectorProxy.class);
+        bind(ToolSelector.class).to(ToolSelectorPresenter.class).in(Singleton.class);
+        bindPresenter(DocViewerPresenter.class, DocViewerPresenter.DocViewerView.class, DocViewerPanel.class,
+                DocViewerPresenter.DocViewerProxy.class);
+        bindPresenter(FolderViewerPresenter.class, FolderViewerPresenter.FolderViewerView.class,
+                FolderViewerAsTablePanel.class, FolderViewerPresenter.FolderViewerProxy.class);
 
-    s(GroupOptions.class, GroupOptionsPresenter.class);
-    s(GroupOptionsView.class, GroupOptionsPanel.class);
-    s(UserOptions.class, UserOptionsPresenter.class);
-    s(UserOptionsView.class, UserOptionsPanel.class);
+        s(GroupOptions.class, GroupOptionsPresenter.class);
+        s(GroupOptionsView.class, GroupOptionsPanel.class);
+        s(UserOptions.class, UserOptionsPresenter.class);
+        s(UserOptionsView.class, UserOptionsPanel.class);
 
-    s(UserOptionsCollection.class);
-    s(GroupOptionsCollection.class);
+        s(UserOptionsCollection.class);
+        s(GroupOptionsCollection.class);
 
-    s(GroupOptionsDefLicense.class, GroupOptionsDefLicensePresenter.class);
-    s(GroupOptionsDefLicenseView.class, GroupOptionsDefLicensePanel.class);
-    s(GroupOptionsPublicSpaceConf.class, GroupOptionsPublicSpaceConfPresenter.class);
-    s(GroupOptionsPublicSpaceConfView.class, GroupOptionsPublicSpaceConfPanel.class);
-    s(GroupOptionsLogo.class, GroupOptionsLogoPresenter.class);
-    s(GroupOptionsLogoView.class, GroupOptionsLogoPanel.class);
-    s(GroupOptionsToolsConf.class, GroupOptionsToolsConfPresenter.class);
-    s(GroupOptionsToolsConfView.class, GroupOptionsToolsConfPanel.class);
+        s(GroupOptionsDefLicense.class, GroupOptionsDefLicensePresenter.class);
+        s(GroupOptionsDefLicenseView.class, GroupOptionsDefLicensePanel.class);
+        s(GroupOptionsPublicSpaceConf.class, GroupOptionsPublicSpaceConfPresenter.class);
+        s(GroupOptionsPublicSpaceConfView.class, GroupOptionsPublicSpaceConfPanel.class);
+        s(GroupOptionsLogo.class, GroupOptionsLogoPresenter.class);
+        s(GroupOptionsLogoView.class, GroupOptionsLogoPanel.class);
+        s(GroupOptionsToolsConf.class, GroupOptionsToolsConfPresenter.class);
+        s(GroupOptionsToolsConfView.class, GroupOptionsToolsConfPanel.class);
 
-    s(UserOptionsDefLicense.class, UserOptionsDefLicensePresenter.class);
-    s(UserOptionsDefLicenseView.class, UserOptionsDefLicensePanel.class);
-    s(UserOptionsPublicSpaceConf.class, UserOptionsPublicSpaceConfPresenter.class);
-    s(UserOptionsPublicSpaceConfView.class, UserOptionsPublicSpaceConfPanel.class);
-    s(UserOptionsLogo.class, UserOptionsLogoPresenter.class);
-    s(UserOptionsLogoView.class, UserOptionsLogoPanel.class);
-    s(UserOptionsToolsConf.class, UserOptionsToolsConfPresenter.class);
-    s(UserOptionsToolsConfView.class, UserOptionsToolsConfPanel.class);
+        s(UserOptionsDefLicense.class, UserOptionsDefLicensePresenter.class);
+        s(UserOptionsDefLicenseView.class, UserOptionsDefLicensePanel.class);
+        s(UserOptionsPublicSpaceConf.class, UserOptionsPublicSpaceConfPresenter.class);
+        s(UserOptionsPublicSpaceConfView.class, UserOptionsPublicSpaceConfPanel.class);
+        s(UserOptionsLogo.class, UserOptionsLogoPresenter.class);
+        s(UserOptionsLogoView.class, UserOptionsLogoPanel.class);
+        s(UserOptionsToolsConf.class, UserOptionsToolsConfPresenter.class);
+        s(UserOptionsToolsConfView.class, UserOptionsToolsConfPanel.class);
 
-    s(GSpaceBackManager.class, GSpaceBackManagerImpl.class);
+        s(GSpaceBackManager.class, GSpaceBackManagerImpl.class);
 
-    s(RenameAction.class);
-  }
+        // Actions
+        s(ContentViewerOptionsMenu.class);
+        s(RenameAction.class);
+    }
 }
\ No newline at end of file

Modified: trunk/src/main/java/cc/kune/gspace/client/actions/GoParentContainerBtn.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/actions/GoParentContainerBtn.java	2011-04-29 14:42:12 UTC (rev 1333)
+++ trunk/src/main/java/cc/kune/gspace/client/actions/GoParentContainerBtn.java	2011-05-03 08:22:21 UTC (rev 1334)
@@ -46,9 +46,10 @@
 
     }
 
-    public GoParentContainerBtn(final I18nTranslationService i18n, final GoParentContainerAction action, final CoreResources res) {
+    public GoParentContainerBtn(final I18nTranslationService i18n, final GoParentContainerAction action,
+            final CoreResources res) {
         super(action);
-        this.withToolTip(i18n.t("Go up: Open the container folder")).withIcon(res.folderGoUp());
+        this.withToolTip(i18n.t("Go up: Open the container folder")).withIcon(res.folderGoUp()).withStyles("k-fl");
     }
 
 }

Added: trunk/src/main/java/cc/kune/gspace/client/actions/ParticipateInContentBtn.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/actions/ParticipateInContentBtn.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/client/actions/ParticipateInContentBtn.java	2011-05-03 08:22:21 UTC (rev 1334)
@@ -0,0 +1,64 @@
+package cc.kune.gspace.client.actions;
+
+import cc.kune.common.client.actions.ActionEvent;
+import cc.kune.common.client.actions.ui.descrip.ButtonDescriptor;
+import cc.kune.common.client.notify.NotifyUser;
+import cc.kune.core.client.actions.RolAction;
+import cc.kune.core.client.resources.CoreResources;
+import cc.kune.core.client.rpcservices.AsyncCallbackSimple;
+import cc.kune.core.client.rpcservices.ContentServiceAsync;
+import cc.kune.core.client.sn.actions.conditions.IsCurrentStateEditableCondition;
+import cc.kune.core.client.sn.actions.conditions.IsLoggedCondition;
+import cc.kune.core.client.sn.actions.conditions.IsNotParticipantOfCurrentStateCondition;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.client.state.StateManager;
+import cc.kune.core.shared.dto.AccessRolDTO;
+import cc.kune.core.shared.dto.HasContent;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+
+public class ParticipateInContentBtn extends ButtonDescriptor {
+
+    public static class ParticipateInContentAction extends RolAction {
+
+        private final Provider<ContentServiceAsync> contentService;
+        private final Session session;
+        private final StateManager stateManager;
+
+        @Inject
+        public ParticipateInContentAction(final Session session, final StateManager stateManager,
+                final I18nTranslationService i18n, final Provider<ContentServiceAsync> contentService) {
+            super(AccessRolDTO.Editor, true);
+            this.session = session;
+            this.stateManager = stateManager;
+            this.contentService = contentService;
+        }
+
+        @Override
+        public void actionPerformed(final ActionEvent event) {
+            NotifyUser.showProgressProcessing();
+            stateManager.gotoStateToken(((HasContent) session.getCurrentState()).getContainer().getStateToken());
+            contentService.get().addParticipant(session.getUserHash(), session.getCurrentStateToken(),
+                    session.getCurrentUser().getShortName(), new AsyncCallbackSimple<Void>() {
+                        @Override
+                        public void onSuccess(final Void arg) {
+                            NotifyUser.hideProgress();
+                        }
+                    });
+        }
+    }
+
+    @Inject
+    public ParticipateInContentBtn(final I18nTranslationService i18n, final ParticipateInContentAction action,
+            final IsLoggedCondition isLogged, final IsCurrentStateEditableCondition isEditable,
+            final IsNotParticipantOfCurrentStateCondition isNotParticipant, final CoreResources res) {
+        super(action);
+        this.withText(i18n.t("Participate")).withToolTip("Participate in the edition of this page").withIcon(
+                res.contentEdit()).withStyles("k-def-docbtn, k-fl");
+        super.add(isLogged);
+        super.add(isEditable);
+        super.add(isNotParticipant);
+    }
+}

Deleted: trunk/src/main/java/cc/kune/gspace/client/actions/RefreshContentBtn.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/actions/RefreshContentBtn.java	2011-04-29 14:42:12 UTC (rev 1333)
+++ trunk/src/main/java/cc/kune/gspace/client/actions/RefreshContentBtn.java	2011-05-03 08:22:21 UTC (rev 1334)
@@ -1,37 +0,0 @@
-package cc.kune.gspace.client.actions;
-
-import cc.kune.common.client.actions.AbstractExtendedAction;
-import cc.kune.common.client.actions.ActionEvent;
-import cc.kune.common.client.actions.ui.descrip.ButtonDescriptor;
-import cc.kune.core.client.resources.nav.NavResources;
-import cc.kune.core.client.state.StateManager;
-import cc.kune.core.shared.i18n.I18nTranslationService;
-
-import com.google.inject.Inject;
-
-public class RefreshContentBtn extends ButtonDescriptor {
-
-  public static class GoParentContainerAction extends AbstractExtendedAction {
-
-    private final StateManager stateManager;
-
-    @Inject
-    public GoParentContainerAction(final StateManager stateManager) {
-      this.stateManager = stateManager;
-    }
-
-    @Override
-    public void actionPerformed(final ActionEvent event) {
-      stateManager.refreshCurrentGroupState();
-    }
-
-  }
-
-  @Inject
-  public RefreshContentBtn(final I18nTranslationService i18n, final GoParentContainerAction action,
-      final NavResources res) {
-    super(action);
-    this.withToolTip(i18n.t("Reload current page")).withIcon(res.refresh());
-  }
-
-}

Copied: trunk/src/main/java/cc/kune/gspace/client/actions/RefreshContentMenuItem.java (from rev 1333, trunk/src/main/java/cc/kune/gspace/client/actions/RefreshContentBtn.java)
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/actions/RefreshContentMenuItem.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/client/actions/RefreshContentMenuItem.java	2011-05-03 08:22:21 UTC (rev 1334)
@@ -0,0 +1,38 @@
+package cc.kune.gspace.client.actions;
+
+import cc.kune.blogs.client.actions.ContentViewerOptionsMenu;
+import cc.kune.common.client.actions.AbstractExtendedAction;
+import cc.kune.common.client.actions.ActionEvent;
+import cc.kune.common.client.actions.ui.descrip.MenuItemDescriptor;
+import cc.kune.core.client.resources.nav.NavResources;
+import cc.kune.core.client.state.StateManager;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.google.inject.Inject;
+
+public class RefreshContentMenuItem extends MenuItemDescriptor {
+
+    public static class GoParentContainerAction extends AbstractExtendedAction {
+
+        private final StateManager stateManager;
+
+        @Inject
+        public GoParentContainerAction(final StateManager stateManager) {
+            this.stateManager = stateManager;
+        }
+
+        @Override
+        public void actionPerformed(final ActionEvent event) {
+            stateManager.refreshCurrentGroupState();
+        }
+
+    }
+
+    @Inject
+    public RefreshContentMenuItem(final I18nTranslationService i18n, final GoParentContainerAction action,
+            final ContentViewerOptionsMenu optionsMenu, final NavResources res) {
+        super(action);
+        this.withText(i18n.t("Reload current page")).withIcon(res.refresh()).withParent(optionsMenu);
+    }
+
+}


Property changes on: trunk/src/main/java/cc/kune/gspace/client/actions/RefreshContentMenuItem.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: trunk/src/main/java/cc/kune/gspace/client/options/license/EntityOptionsDefLicensePanel.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/options/license/EntityOptionsDefLicensePanel.java	2011-04-29 14:42:12 UTC (rev 1333)
+++ trunk/src/main/java/cc/kune/gspace/client/options/license/EntityOptionsDefLicensePanel.java	2011-05-03 08:22:21 UTC (rev 1334)
@@ -37,48 +37,49 @@
 
 public class EntityOptionsDefLicensePanel extends Composite implements EntityOptionsDefLicenseView {
 
-  private final Button change;
-  private final Image licenseImage;
-  private final IconLabel tabTitle;
+    private final Button change;
+    private final Image licenseImage;
+    private final IconLabel tabTitle;
 
-  public EntityOptionsDefLicensePanel(final I18nTranslationService i18n, final CoreResources res) {
-    tabTitle = new IconLabel(res.copyleft(), i18n.t("License"));
-    final VerticalPanel vp = new VerticalPanel();
-    final Label intro = new Label();
-    intro.setText(i18n.t("This is the default license for all the contents of this group (you can also select another different license per content):"));
-    vp.add(intro);
-    licenseImage = new Image();
-    vp.add(licenseImage);
-    licenseImage.addStyleName("kune-pointer");
-    change = new Button(i18n.t("Change"));
-    initWidget(vp);
-    super.setHeight(String.valueOf(EntityOptionsView.HEIGHT));
-    super.setWidth(String.valueOf(EntityOptionsView.WIDTH));
-  }
+    public EntityOptionsDefLicensePanel(final I18nTranslationService i18n, final CoreResources res) {
+        tabTitle = new IconLabel(res.copyleft(), i18n.t("License"));
+        final VerticalPanel vp = new VerticalPanel();
+        final Label intro = new Label();
+        intro.setWordWrap(true);
+        intro.setText(i18n.t("This is the default license for all the contents of this group (you can also select another different license per content):"));
+        vp.add(intro);
+        licenseImage = new Image();
+        vp.add(licenseImage);
+        licenseImage.addStyleName("kune-pointer");
+        change = new Button(i18n.t("Change"));
+        initWidget(vp);
+        super.setHeight(String.valueOf(EntityOptionsView.HEIGHT));
+        super.setWidth(String.valueOf(EntityOptionsView.WIDTH));
+    }
 
-  @Override
-  public HasClickHandlers getChange() {
-    return change;
-  }
+    @Override
+    public HasClickHandlers getChange() {
+        return change;
+    }
 
-  @Override
-  public HasClickHandlers getLicenseImage() {
-    return licenseImage;
-  }
+    @Override
+    public HasClickHandlers getLicenseImage() {
+        return licenseImage;
+    }
 
-  @Override
-  public IsWidget getTabTitle() {
-    return tabTitle;
-  }
+    @Override
+    public IsWidget getTabTitle() {
+        return tabTitle;
+    }
 
-  @Override
-  public void openWindow(final String url) {
-    KuneWindowUtils.open(url);
-  }
+    @Override
+    public void openWindow(final String url) {
+        KuneWindowUtils.open(url);
+    }
 
-  @Override
-  public void setLicense(final LicenseDTO defaultLicense) {
-    licenseImage.setUrl(defaultLicense.getImageUrl());
-    Tooltip.to(licenseImage, defaultLicense.getLongName());
-  }
+    @Override
+    public void setLicense(final LicenseDTO defaultLicense) {
+        licenseImage.setUrl(defaultLicense.getImageUrl());
+        Tooltip.to(licenseImage, defaultLicense.getLongName());
+    }
 }

Modified: trunk/src/main/java/cc/kune/gspace/client/options/logo/EntityOptionsLogoPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/options/logo/EntityOptionsLogoPanel.java	2011-04-29 14:42:12 UTC (rev 1333)
+++ trunk/src/main/java/cc/kune/gspace/client/options/logo/EntityOptionsLogoPanel.java	2011-05-03 08:22:21 UTC (rev 1334)
@@ -46,172 +46,173 @@
 
 public class EntityOptionsLogoPanel extends Composite implements EntityOptionsLogoView {
 
-  public static final String ICON_UPLD_SERVLET = "servlets/EntityLogoUploadManager";
-  private final Label dialogInfoLabel;
-  private final FileUpload fileUpload = new FileUpload();
-  private final FormPanel form = new FormPanel();
-  private final I18nTranslationService i18n;
-  private OnAcceptCallback onAccept;
-  private final IconLabel tabTitle;
-  private final Hidden tokenField;
-  private final Hidden userhashField;
+    public static final String ICON_UPLD_SERVLET = "servlets/EntityLogoUploadManager";
+    private final Label dialogInfoLabel;
+    private final FileUpload fileUpload = new FileUpload();
+    private final FormPanel form = new FormPanel();
+    private final I18nTranslationService i18n;
+    private OnAcceptCallback onAccept;
+    private final IconLabel tabTitle;
+    private final Hidden tokenField;
+    private final Hidden userhashField;
 
-  // private final TextField file;
+    // private final TextField file;
 
-  public EntityOptionsLogoPanel(final EventBus eventBus, final I18nTranslationService i18n,
-      final String panelId, final String buttonId, final String inputId, final NavResources res) {
-    super();
-    this.i18n = i18n;
-    tabTitle = new IconLabel(res.picture(), "");
-    // super.setButtonAlign(HorizontalAlignment.LEFT);
-    // super.setFrame(true);
-    // super.setAutoScroll(false);
-    // super.setBorder(false);
-    // super.setFileUpload(true);
-    // super.setWidth(400);
-    // super.setIconCls("k-picture-icon");
-    // super.setMethod(Method.POST);
-    // super.setUrl(ICON_UPLD_SERVLET);
-    // super.setWaitMsgTarget(true);
-    // super.setHideLabels(true);
-    // super.setPadding(10);
-    // super.addFormListener(new FormListener() {
-    // @Override
-    // public boolean doBeforeAction(final Form form) {
-    // return true;
-    // }
-    //
-    // @Override
-    // public void onActionComplete(final Form form, final int httpStatus,
-    // final String responseText) {
-    // presenter.onSubmitComplete(httpStatus, responseText);
-    // }
-    //
-    // @Override
-    // public void onActionFailed(final Form form, final int httpStatus,
-    // final String responseText) {
-    // presenter.onSubmitFailed(httpStatus, responseText);
-    // }
-    // });
-    // super.add(dialogInfoLabel);
-    // file = new TextField("File", inputId);
-    // final EventCallback keyListener = new EventCallback() {
-    // @Override
-    // public void execute(final EventObject e) {
-    // // setEnableFileField();
-    // }
-    // };
-    // file.addKeyPressListener(keyListener);
-    // file.setId(inputId);
-    // file.setInputType("file");
-    // super.add(file);
-    // final FieldListenerAdapter changeListener = new
-    // FieldListenerAdapter() {
-    // @Override
-    // public void onChange(final Field field, final Object newVal, final
-    // Object oldVal) {
-    // NotifyUser.info("change");
-    // // setEnableFileField();
-    // }
-    // };
-    // // Don't works:
-    // file.addListener(changeListener);
-    // setId(panelId);
-    //
-    // sendButton.setId(buttonId);
-    // super.addButton(sendButton);
+    public EntityOptionsLogoPanel(final EventBus eventBus, final I18nTranslationService i18n, final String panelId,
+            final String buttonId, final String inputId, final NavResources res) {
+        super();
+        this.i18n = i18n;
+        tabTitle = new IconLabel(res.picture(), "");
+        // super.setButtonAlign(HorizontalAlignment.LEFT);
+        // super.setFrame(true);
+        // super.setAutoScroll(false);
+        // super.setBorder(false);
+        // super.setFileUpload(true);
+        // super.setWidth(400);
+        // super.setIconCls("k-picture-icon");
+        // super.setMethod(Method.POST);
+        // super.setUrl(ICON_UPLD_SERVLET);
+        // super.setWaitMsgTarget(true);
+        // super.setHideLabels(true);
+        // super.setPadding(10);
+        // super.addFormListener(new FormListener() {
+        // @Override
+        // public boolean doBeforeAction(final Form form) {
+        // return true;
+        // }
+        //
+        // @Override
+        // public void onActionComplete(final Form form, final int httpStatus,
+        // final String responseText) {
+        // presenter.onSubmitComplete(httpStatus, responseText);
+        // }
+        //
+        // @Override
+        // public void onActionFailed(final Form form, final int httpStatus,
+        // final String responseText) {
+        // presenter.onSubmitFailed(httpStatus, responseText);
+        // }
+        // });
+        // super.add(dialogInfoLabel);
+        // file = new TextField("File", inputId);
+        // final EventCallback keyListener = new EventCallback() {
+        // @Override
+        // public void execute(final EventObject e) {
+        // // setEnableFileField();
+        // }
+        // };
+        // file.addKeyPressListener(keyListener);
+        // file.setId(inputId);
+        // file.setInputType("file");
+        // super.add(file);
+        // final FieldListenerAdapter changeListener = new
+        // FieldListenerAdapter() {
+        // @Override
+        // public void onChange(final Field field, final Object newVal, final
+        // Object oldVal) {
+        // NotifyUser.info("change");
+        // // setEnableFileField();
+        // }
+        // };
+        // // Don't works:
+        // file.addListener(changeListener);
+        // setId(panelId);
+        //
+        // sendButton.setId(buttonId);
+        // super.addButton(sendButton);
 
-    dialogInfoLabel = new Label();
+        dialogInfoLabel = new Label();
+        dialogInfoLabel.setWordWrap(true);
 
-    form.setEncoding(FormPanel.ENCODING_MULTIPART);
-    form.setMethod(FormPanel.METHOD_POST);
-    form.setAction(GWT.getModuleBaseURL() + ICON_UPLD_SERVLET);
+        form.setEncoding(FormPanel.ENCODING_MULTIPART);
+        form.setMethod(FormPanel.METHOD_POST);
+        form.setAction(GWT.getModuleBaseURL() + ICON_UPLD_SERVLET);
 
-    userhashField = new Hidden(FileConstants.HASH, FileConstants.HASH);
-    tokenField = new Hidden(FileConstants.TOKEN, FileConstants.TOKEN);
+        userhashField = new Hidden(FileConstants.HASH, FileConstants.HASH);
+        tokenField = new Hidden(FileConstants.TOKEN, FileConstants.TOKEN);
 
-    final VerticalPanel holder = new VerticalPanel();
+        final VerticalPanel holder = new VerticalPanel();
 
-    fileUpload.setName("upload");
-    holder.add(dialogInfoLabel);
-    holder.add(fileUpload);
-    holder.add(userhashField);
-    holder.add(tokenField);
-    holder.add(new Button(i18n.t("Send"), new ClickHandler() {
-      @Override
-      public void onClick(final ClickEvent event) {
-        Log.info("You selected: " + fileUpload.getFilename(), null);
-        form.submit();
-      }
-    }));
+        fileUpload.setName("upload");
+        holder.add(dialogInfoLabel);
+        holder.add(fileUpload);
+        holder.add(userhashField);
+        holder.add(tokenField);
+        holder.add(new Button(i18n.t("Send"), new ClickHandler() {
+            @Override
+            public void onClick(final ClickEvent event) {
+                Log.info("You selected: " + fileUpload.getFilename(), null);
+                form.submit();
+            }
+        }));
 
-    form.addSubmitHandler(new FormPanel.SubmitHandler() {
-      @Override
-      public void onSubmit(final SubmitEvent event) {
-        // final String filename = file.getValueAsString();
-        // if (filename != null && filename.length() > 0) {
-        // getForm().submit();
-        // }
+        form.addSubmitHandler(new FormPanel.SubmitHandler() {
+            @Override
+            public void onSubmit(final SubmitEvent event) {
+                // final String filename = file.getValueAsString();
+                // if (filename != null && filename.length() > 0) {
+                // getForm().submit();
+                // }
 
-        if (!"".equalsIgnoreCase(fileUpload.getFilename())) {
-          GWT.log("UPLOADING FILE????", null);
-          // NOW WHAT????
-        } else {
-          event.cancel(); // cancel the event
-        }
+                if (!"".equalsIgnoreCase(fileUpload.getFilename())) {
+                    GWT.log("UPLOADING FILE????", null);
+                    // NOW WHAT????
+                } else {
+                    event.cancel(); // cancel the event
+                }
 
-      }
-    });
+            }
+        });
 
-    form.addSubmitCompleteHandler(new FormPanel.SubmitCompleteHandler() {
-      @Override
-      public void onSubmitComplete(final SubmitCompleteEvent event) {
-        CurrentLogoChangedEvent.fire(eventBus);
-      }
-    });
-    form.add(holder);
-    initWidget(form);
-    setHeight(String.valueOf(EntityOptionsView.HEIGHT));
-    setWidth(String.valueOf(EntityOptionsView.WIDTH));
-  }
+        form.addSubmitCompleteHandler(new FormPanel.SubmitCompleteHandler() {
+            @Override
+            public void onSubmitComplete(final SubmitCompleteEvent event) {
+                CurrentLogoChangedEvent.fire(eventBus);
+            }
+        });
+        form.add(holder);
+        initWidget(form);
+        setHeight(String.valueOf(EntityOptionsView.HEIGHT));
+        setWidth(String.valueOf(EntityOptionsView.WIDTH));
+    }
 
-  @Override
-  public OnAcceptCallback getOnSubmit() {
-    // TODO Auto-generated method stub
-    return null;
-  }
+    @Override
+    public OnAcceptCallback getOnSubmit() {
+        // TODO Auto-generated method stub
+        return null;
+    }
 
-  @Override
-  public IsWidget getTabTitle() {
-    return tabTitle;
-  }
+    @Override
+    public IsWidget getTabTitle() {
+        return tabTitle;
+    }
 
-  public void reset() {
-    form.reset();
-  }
+    public void reset() {
+        form.reset();
+    }
 
-  @Override
-  public void setNormalGroupsLabels() {
-    dialogInfoLabel.setText(i18n.t("Select an image in your computer as the logo for this group. "
-        + "For best results use a [%d]x[%d] pixel image. We will automatically resize bigger images.",
-        FileConstants.LOGO_DEF_HEIGHT, FileConstants.LOGO_DEF_HEIGHT)
-        + TextUtils.brbr());
-    tabTitle.setText(CoreMessages.ENT_LOGO_SELECTOR_NORMAL_TITLE);
-  }
+    @Override
+    public void setNormalGroupsLabels() {
+        dialogInfoLabel.setText(i18n.t("Select an image in your computer as the logo for this group. "
+                + "For best results use a [%d]x[%d] pixel image. We will automatically resize bigger images.",
+                FileConstants.LOGO_DEF_HEIGHT, FileConstants.LOGO_DEF_HEIGHT)
+                + TextUtils.brbr());
+        tabTitle.setText(CoreMessages.ENT_LOGO_SELECTOR_NORMAL_TITLE);
+    }
 
-  @Override
-  public void setPersonalGroupsLabels() {
-    dialogInfoLabel.setText(i18n.t("Select an image in your computer as your avatar. "
-        + "For best results use a [%d]x[%d] pixel image. We will automatically resize bigger images.",
-        FileConstants.LOGO_DEF_HEIGHT, FileConstants.LOGO_DEF_HEIGHT)
-        + "<br/><br/>");
-    tabTitle.setText(CoreMessages.ENT_LOGO_SELECTOR_PERSON_TITLE);
-  }
+    @Override
+    public void setPersonalGroupsLabels() {
+        dialogInfoLabel.setText(i18n.t("Select an image in your computer as your avatar. "
+                + "For best results use a [%d]x[%d] pixel image. We will automatically resize bigger images.",
+                FileConstants.LOGO_DEF_HEIGHT, FileConstants.LOGO_DEF_HEIGHT)
+                + "<br/><br/>");
+        tabTitle.setText(CoreMessages.ENT_LOGO_SELECTOR_PERSON_TITLE);
+    }
 
-  @Override
-  public void setUploadParams(final String userHash, final String token) {
-    userhashField.setValue(userHash);
-    tokenField.setValue(token);
-  }
+    @Override
+    public void setUploadParams(final String userHash, final String token) {
+        userhashField.setValue(userHash);
+        tokenField.setValue(token);
+    }
 
 }

Modified: trunk/src/main/java/cc/kune/gspace/client/viewers/DocViewerPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/viewers/DocViewerPanel.java	2011-04-29 14:42:12 UTC (rev 1333)
+++ trunk/src/main/java/cc/kune/gspace/client/viewers/DocViewerPanel.java	2011-05-03 08:22:21 UTC (rev 1334)
@@ -44,141 +44,147 @@
 import com.gwtplatform.mvp.client.ViewImpl;
 
 public class DocViewerPanel extends ViewImpl implements DocViewerView {
-  interface DocsViewerPanelUiBinder extends UiBinder<Widget, DocViewerPanel> {
-  }
+    interface DocsViewerPanelUiBinder extends UiBinder<Widget, DocViewerPanel> {
+    }
 
-  private static DocsViewerPanelUiBinder uiBinder = GWT.create(DocsViewerPanelUiBinder.class);
+    private static DocsViewerPanelUiBinder uiBinder = GWT.create(DocsViewerPanelUiBinder.class);
 
-  private final ContentCapabilitiesRegistry capabilitiesRegistry;
-  private RemoteViewServiceMultiplexer channel;
-  private final ContentTitleWidget contentTitle;
-  @UiField
-  DeckPanel deck;
-  private final GSpaceArmor gsArmor;
-  private IdGenerator idGenerator;
-  private final Element loading = new LoadingIndicator().getElement();
-  @UiField
-  InlineHTML onlyViewPanel;
-  private ProfileManager profiles;
-  /** The wave panel, if a wave is open. */
-  private StagesProvider wave;
-  @UiField
-  FramedPanel waveFrame;
-  @UiField
-  ImplPanel waveHolder;
-  private final WaveStore waveStore = new SimpleWaveStore();
+    private final ContentCapabilitiesRegistry capabilitiesRegistry;
+    private RemoteViewServiceMultiplexer channel;
+    private final ContentTitleWidget contentTitle;
+    @UiField
+    DeckPanel deck;
+    private final GSpaceArmor gsArmor;
+    private IdGenerator idGenerator;
+    private final Element loading = new LoadingIndicator().getElement();
+    @UiField
+    InlineHTML onlyViewPanel;
+    private ProfileManager profiles;
+    /** The wave panel, if a wave is open. */
+    private StagesProvider wave;
+    @UiField
+    FramedPanel waveFrame;
+    @UiField
+    ImplPanel waveHolder;
+    private final WaveStore waveStore = new SimpleWaveStore();
 
-  private final Widget widget;
+    private final Widget widget;
 
-  @Inject
-  public DocViewerPanel(final GSpaceArmor wsArmor,
-      final ContentCapabilitiesRegistry capabilitiesRegistry, final I18nTranslationService i18n) {
-    this.gsArmor = wsArmor;
-    this.capabilitiesRegistry = capabilitiesRegistry;
-    widget = uiBinder.createAndBindUi(this);
-    contentTitle = new ContentTitleWidget(i18n, gsArmor, capabilitiesRegistry.getIconsRegistry());
-  }
+    @Inject
+    public DocViewerPanel(final GSpaceArmor wsArmor, final ContentCapabilitiesRegistry capabilitiesRegistry,
+            final I18nTranslationService i18n) {
+        this.gsArmor = wsArmor;
+        this.capabilitiesRegistry = capabilitiesRegistry;
+        widget = uiBinder.createAndBindUi(this);
+        contentTitle = new ContentTitleWidget(i18n, gsArmor, capabilitiesRegistry.getIconsRegistry());
+    }
 
-  @Override
-  public Widget asWidget() {
-    return widget;
-  }
+    @Override
+    public Widget asWidget() {
+        return widget;
+    }
 
-  @Override
-  public void attach() {
-    final ForIsWidget docContainer = gsArmor.getDocContainer();
-    docContainer.add(widget);
-  }
+    @Override
+    public void attach() {
+        final ForIsWidget docContainer = gsArmor.getDocContainer();
+        docContainer.add(widget);
+    }
 
-  @Override
-  public void clear() {
-    onlyViewPanel.setHTML("");
-    gsArmor.getSubheaderToolbar().clear();
-    UiUtils.clear(gsArmor.getDocContainer());
-    UiUtils.clear(gsArmor.getDocHeader());
-  }
+    @Override
+    public void clear() {
+        onlyViewPanel.setHTML("");
+        gsArmor.getSubheaderToolbar().clear();
+        UiUtils.clear(gsArmor.getDocContainer());
+        UiUtils.clear(gsArmor.getDocHeader());
+    }
 
-  @Override
-  public void detach() {
-    clear();
-  }
+    @Override
+    public void detach() {
+        clear();
+    }
 
-  @Override
-  public HasEditHandler getEditTitle() {
-    return contentTitle.getEditableTitle();
-  }
+    @Override
+    public HasEditHandler getEditTitle() {
+        return contentTitle.getEditableTitle();
+    }
 
-  private WaveRef getWaveRef(final String waveRefS) {
-    try {
-      return GwtWaverefEncoder.decodeWaveRefFromPath(waveRefS);
-    } catch (final InvalidWaveRefException e) {
-      throw new UIException("Invalid waveref: " + waveRefS);
+    private WaveRef getWaveRef(final String waveRefS) {
+        try {
+            return GwtWaverefEncoder.decodeWaveRefFromPath(waveRefS);
+        } catch (final InvalidWaveRefException e) {
+            throw new UIException("Invalid waveref: " + waveRefS);
+        }
     }
-  }
 
-  private void initWaveClientIfNeeded() {
-    if (channel == null) {
-      final WaveWebSocketClient webSocket = new WaveWebSocketClient(WebClient.useSocketIO(),
-          WebClient.getWebSocketBaseUrl(GWT.getModuleBaseURL()));
-      webSocket.connect();
-      channel = new RemoteViewServiceMultiplexer(webSocket,
-          new ParticipantId(Session.get().getAddress()).getAddress());
-      profiles = new ProfileManagerImpl(Session.get().getDomain());
-      idGenerator = ClientIdGenerator.create();
+    private void initWaveClientIfNeeded() {
+        if (channel == null) {
+            final WaveWebSocketClient webSocket = new WaveWebSocketClient(WebClient.useSocketIO(),
+                    WebClient.getWebSocketBaseUrl(GWT.getModuleBaseURL()));
+            webSocket.connect();
+            channel = new RemoteViewServiceMultiplexer(webSocket,
+                    new ParticipantId(Session.get().getAddress()).getAddress());
+            profiles = new ProfileManagerImpl(Session.get().getDomain());
+            idGenerator = ClientIdGenerator.create();
+        }
     }
-  }
 
-  @Override
-  public void setActions(final GuiActionDescCollection actions) {
-    gsArmor.getSubheaderToolbar().clear();
-    gsArmor.getSubheaderToolbar().addAll(actions);
-  }
+    @Override
+    public void setActions(final GuiActionDescCollection actions) {
+        gsArmor.getSubheaderToolbar().clear();
+        gsArmor.getSubheaderToolbar().addAll(actions);
+    }
 
-  @Override
-  public void setContent(final StateContentDTO state) {
-    final boolean editable = state.getContentRights().isEditable();
-    contentTitle.setTitle(state.getTitle(), state.getTypeId(), state.getMimeType(), editable
-        && capabilitiesRegistry.isRenamable(state.getTypeId()));
-    if (editable) {
-      initWaveClientIfNeeded();
-      setEditableWaveContent(state.getWaveRef(), false);
-      // waveHolder.clear();
-      // waveHolder.add(new Label(state.getContent()
-      // + " (but here goes the Wave editor -we are testing it-)"));
-      // onlyViewPanel.setHTML(SafeHtmlUtils.fromTrustedString(state.getContent()));
-    } else {
-      onlyViewPanel.setHTML(SafeHtmlUtils.fromTrustedString(state.getContent()));
+    @Override
+    public void setContent(final StateContentDTO state) {
+        final boolean editable = state.getContentRights().isEditable();
+        setTitle(state, editable);
+        onlyViewPanel.setHTML(SafeHtmlUtils.fromTrustedString(state.getContent()));
+        deck.showWidget(1);
     }
-    // deck.showWidget(editable ? 0 : 1);
-    deck.showWidget(1);
-  }
 
-  @Override
-  public void setEditableTitle(final String title) {
-    contentTitle.setText(title);
-  }
+    @Override
+    public void setEditableContent(final StateContentDTO state) {
+        setTitle(state, true);
+        initWaveClientIfNeeded();
+        setEditableWaveContent(state.getWaveRef(), false);
+        deck.showWidget(0);
+        // waveHolder.clear();
+        // waveHolder.add(new Label(state.getContent()
+        // + " (but here goes the Wave editor -we are testing it-)"));
+        // onlyViewPanel.setHTML(SafeHtmlUtils.fromTrustedString(state.getContent()));
+    }
 
-  private void setEditableWaveContent(final String waveRefS, final boolean isNewWave) {
-    final WaveRef waveRef = getWaveRef(waveRefS);
+    @Override
+    public void setEditableTitle(final String title) {
+        contentTitle.setText(title);
+    }
 
-    if (wave != null) {
-      wave.destroy();
-      wave = null;
+    private void setEditableWaveContent(final String waveRefS, final boolean isNewWave) {
+        final WaveRef waveRef = getWaveRef(waveRefS);
+
+        if (wave != null) {
+            wave.destroy();
+            wave = null;
+        }
+
+        // Release the display:none.
+        // UIObject.setVisible(waveFrame.getElement(), true);
+        waveHolder.getElement().appendChild(loading);
+        final Element holder = waveHolder.getElement().appendChild(Document.get().createDivElement());
+        final StagesProvider wave = new StagesProvider(holder, waveHolder, waveRef, channel, idGenerator, profiles,
+                waveStore, isNewWave);
+        this.wave = wave;
+        wave.load(new Command() {
+            @Override
+            public void execute() {
+                loading.removeFromParent();
+            }
+        });
     }
 
-    // Release the display:none.
-    // UIObject.setVisible(waveFrame.getElement(), true);
-    waveHolder.getElement().appendChild(loading);
-    final Element holder = waveHolder.getElement().appendChild(Document.get().createDivElement());
-    final StagesProvider wave = new StagesProvider(holder, waveHolder, waveRef, channel, idGenerator,
-        profiles, waveStore, isNewWave);
-    this.wave = wave;
-    wave.load(new Command() {
-      @Override
-      public void execute() {
-        loading.removeFromParent();
-      }
-    });
-  }
+    private void setTitle(final StateContentDTO state, final boolean editable) {
+        contentTitle.setTitle(state.getTitle(), state.getTypeId(), state.getMimeType(), editable
+                && capabilitiesRegistry.isRenamable(state.getTypeId()));
+    }
 
 }

Modified: trunk/src/main/java/cc/kune/gspace/client/viewers/DocViewerPanel.ui.xml
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/viewers/DocViewerPanel.ui.xml	2011-04-29 14:42:12 UTC (rev 1333)
+++ trunk/src/main/java/cc/kune/gspace/client/viewers/DocViewerPanel.ui.xml	2011-05-03 08:22:21 UTC (rev 1334)
@@ -4,23 +4,22 @@
   xmlns:w='urn:import:org.waveprotocol.wave.client.widget.common'>
   <ui:style>
     .wavePanel {
-      margin: 0 0 0 0;
+        margin: 0 0 0 0;
     }
 
     .waveHolder {
-      position: absolute;
-      top: 0;
-      bottom: 0;
-      left: 0;
-      right: 0;
+        position: absolute;
+        top: 0;
+        bottom: 0;
+        left: 0;
+        right: 0;
     }
   </ui:style>
   <g:HTMLPanel width="100%" height="100%">
     <g:DeckPanel ui:field="deck" addStyleNames="k-doc-content-deck">
       <f:FramedPanel ui:field="waveFrame" addStyleNames="{style.wavePanel}">
+        <w:ImplPanel ui:field="waveHolder" addStyleNames="{style.waveHolder}" />
       </f:FramedPanel>
-      <w:ImplPanel ui:field="waveHolder" addStyleNames="{style.waveHolder}" />
-<!--       <g:InlineHTML ui:field="delete" /> -->
       <g:InlineHTML ui:field="onlyViewPanel" />
     </g:DeckPanel>
   </g:HTMLPanel>

Modified: trunk/src/main/java/cc/kune/gspace/client/viewers/DocViewerPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/viewers/DocViewerPresenter.java	2011-04-29 14:42:12 UTC (rev 1333)
+++ trunk/src/main/java/cc/kune/gspace/client/viewers/DocViewerPresenter.java	2011-05-03 08:22:21 UTC (rev 1334)
@@ -5,6 +5,7 @@
 import cc.kune.blogs.client.actions.BlogsClientActions;
 import cc.kune.blogs.shared.BlogsConstants;
 import cc.kune.common.client.actions.ui.descrip.GuiActionDescCollection;
+import cc.kune.common.client.errors.UIException;
 import cc.kune.common.client.ui.EditEvent;
 import cc.kune.common.client.ui.EditEvent.EditHandler;
 import cc.kune.common.client.ui.HasEditHandler;
@@ -32,95 +33,112 @@
 import com.gwtplatform.mvp.client.proxy.Proxy;
 import com.gwtplatform.mvp.client.proxy.RevealRootContentEvent;
 
-public class DocViewerPresenter extends
-    Presenter<DocViewerPresenter.DocViewerView, DocViewerPresenter.DocViewerProxy> implements
-    ContentViewer {
+public class DocViewerPresenter extends Presenter<DocViewerPresenter.DocViewerView, DocViewerPresenter.DocViewerProxy>
+        implements ContentViewer {
 
-  @ProxyCodeSplit
-  public interface DocViewerProxy extends Proxy<DocViewerPresenter> {
-  }
+    @ProxyCodeSplit
+    public interface DocViewerProxy extends Proxy<DocViewerPresenter> {
+    }
 
-  public interface DocViewerView extends View {
+    public interface DocViewerView extends View {
 
-    void attach();
+        void attach();
 
-    void clear();
+        void clear();
 
-    void detach();
+        void detach();
 
-    HasEditHandler getEditTitle();
+        HasEditHandler getEditTitle();
 
-    void setActions(GuiActionDescCollection actions);
+        void setActions(GuiActionDescCollection actions);
 
-    void setContent(StateContentDTO state);
+        void setContent(StateContentDTO state);
 
-    void setEditableTitle(String title);
-  }
+        void setEditableContent(StateContentDTO state);
 
-  private final ActionRegistryByType actionsRegistry;
-  private HandlerRegistration editHandler;
-  private final Provider<RenameAction> renameAction;
-  private final Session session;
+        void setEditableTitle(String title);
+    }
 
-  @Inject
-  public DocViewerPresenter(final EventBus eventBus, final DocViewerView view,
-      final DocViewerProxy proxy, final Session session, final ContentViewerSelector viewerSelector,
-      final ActionRegistryByType actionsRegistry, final DocsClientActions docsActions,
-      final BlogsClientActions blogActions, final Provider<RenameAction> renameAction) {
-    super(eventBus, view, proxy);
-    this.session = session;
-    this.actionsRegistry = actionsRegistry;
-    this.renameAction = renameAction;
-    viewerSelector.register(this, true, DocsConstants.TYPE_DOCUMENT);
-    viewerSelector.register(this, true, BlogsConstants.TYPE_POST);
-  }
+    private final ActionRegistryByType actionsRegistry;
+    private HandlerRegistration editHandler;
+    private final Provider<RenameAction> renameAction;
+    private final Session session;
 
-  @Override
-  public void attach() {
-    getView().attach();
-    if (editHandler == null) {
-      createEditHandler();
+    @Inject
+    public DocViewerPresenter(final EventBus eventBus, final DocViewerView view, final DocViewerProxy proxy,
+            final Session session, final ContentViewerSelector viewerSelector,
+            final ActionRegistryByType actionsRegistry, final DocsClientActions docsActions,
+            final BlogsClientActions blogActions, final Provider<RenameAction> renameAction) {
+        super(eventBus, view, proxy);
+        this.session = session;
+        this.actionsRegistry = actionsRegistry;
+        this.renameAction = renameAction;
+        viewerSelector.register(this, true, DocsConstants.TYPE_DOCUMENT);
+        viewerSelector.register(this, true, BlogsConstants.TYPE_POST);
     }
-  }
 
-  private void createEditHandler() {
-    editHandler = getView().getEditTitle().addEditHandler(new EditHandler() {
-      @Override
-      public void fire(final EditEvent event) {
-        renameAction.get().rename(session.getCurrentStateToken(), session.getCurrentState().getTitle(),
-            event.getText(), new RenameListener() {
-              @Override
-              public void onFail(final StateToken token, final String oldTitle) {
-                getView().setEditableTitle(oldTitle);
-              }
+    @Override
+    public void attach() {
+        getView().attach();
+        if (editHandler == null) {
+            createEditHandler();
+        }
+    }
 
-              @Override
-              public void onSuccess(final StateToken token, final String title) {
-                getView().setEditableTitle(title);
-              }
-            });
-      }
-    });
-  }
+    private void createEditHandler() {
+        editHandler = getView().getEditTitle().addEditHandler(new EditHandler() {
+            @Override
+            public void fire(final EditEvent event) {
+                renameAction.get().rename(session.getCurrentStateToken(), session.getCurrentState().getTitle(),
+                        event.getText(), new RenameListener() {
+                            @Override
+                            public void onFail(final StateToken token, final String oldTitle) {
+                                getView().setEditableTitle(oldTitle);
+                            }
 
-  @Override
-  public void detach() {
-    getView().detach();
-  }
+                            @Override
+                            public void onSuccess(final StateToken token, final String title) {
+                                getView().setEditableTitle(title);
+                            }
+                        });
+            }
+        });
+    }
 
-  @Override
-  protected void revealInParent() {
-    RevealRootContentEvent.fire(this, this);
-  }
+    @Override
+    public void detach() {
+        getView().detach();
+    }
 
-  @Override
-  public void setContent(@Nonnull final HasContent state) {
-    getView().clear();
-    final StateContentDTO stateContent = (StateContentDTO) state;
-    final AccessRights rights = stateContent.getContentRights();
-    final GuiActionDescCollection actions = actionsRegistry.getCurrentActions(stateContent.getGroup(),
-        stateContent.getTypeId(), session.isLogged(), rights, ActionGroups.VIEW);
-    getView().setActions(actions);
-    getView().setContent(stateContent);
-  }
+    @Override
+    protected void revealInParent() {
+        RevealRootContentEvent.fire(this, this);
+    }
+
+    @Override
+    public void setContent(@Nonnull final HasContent state) {
+        getView().clear();
+        final StateContentDTO stateContent = (StateContentDTO) state;
+        final AccessRights rights = stateContent.getContentRights();
+        if (session.isLogged() && rights.isEditable()) {
+            if (stateContent.isParticipant()) {
+                // is already participant, show wave editor
+                getView().setEditableContent(stateContent);
+            } else {
+                // add "participate" action
+                getView().setContent(stateContent);
+            }
+        } else {
+            if (rights.isVisible()) {
+                // Show contents
+                getView().setContent(stateContent);
+            } else {
+                throw new UIException("Unexpected status in Viewer");
+            }
+        }
+        final GuiActionDescCollection actions = actionsRegistry.getCurrentActions(stateContent.getGroup(),
+                stateContent.getTypeId(), session.isLogged(), rights, ActionGroups.VIEW);
+        getView().setActions(actions);
+        getView().setContent(stateContent);
+    }
 }
\ No newline at end of file

Modified: trunk/src/main/java/cc/kune/msgs/client/UserMessage.java
===================================================================
--- trunk/src/main/java/cc/kune/msgs/client/UserMessage.java	2011-04-29 14:42:12 UTC (rev 1333)
+++ trunk/src/main/java/cc/kune/msgs/client/UserMessage.java	2011-05-03 08:22:21 UTC (rev 1334)
@@ -26,7 +26,7 @@
 
 import cc.kune.common.client.notify.NotifyLevel;
 import cc.kune.common.client.utils.TextUtils;
-import cc.kune.msgs.client.resources.UserMessageImages;
+import cc.kune.msgs.client.resources.UserMessageImagesUtil;
 
 import com.google.gwt.core.client.GWT;
 import com.google.gwt.event.dom.client.ClickEvent;
@@ -108,22 +108,7 @@
             };
             time.schedule(fadeMills);
         }
-        switch (level) {
-        case error:
-            icon.setResource(UserMessageImages.INST.error());
-            break;
-        case important:
-            icon.setResource(UserMessageImages.INST.important());
-            break;
-        case info:
-            icon.setResource(UserMessageImages.INST.info());
-            break;
-        case veryImportant:
-            icon.setResource(UserMessageImages.INST.warning());
-            break;
-        default:
-            break;
-        }
+        icon.setResource(UserMessageImagesUtil.getIcon(level));
         final Show anim = new Show(this.getElement());
         anim.setDuration(0.5);
         anim.play();

Added: trunk/src/main/java/cc/kune/msgs/client/resources/UserMessageImagesUtil.java
===================================================================
--- trunk/src/main/java/cc/kune/msgs/client/resources/UserMessageImagesUtil.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/msgs/client/resources/UserMessageImagesUtil.java	2011-05-03 08:22:21 UTC (rev 1334)
@@ -0,0 +1,24 @@
+package cc.kune.msgs.client.resources;
+
+import cc.kune.common.client.notify.NotifyLevel;
+
+import com.google.gwt.resources.client.ImageResource;
+
+public class UserMessageImagesUtil {
+
+    public static ImageResource getIcon(final NotifyLevel level) {
+
+        switch (level) {
+        case important:
+            return UserMessageImages.INST.important();
+        case info:
+            return UserMessageImages.INST.info();
+        case veryImportant:
+            return UserMessageImages.INST.warning();
+        case error:
+        default:
+            return UserMessageImages.INST.error();
+        }
+    }
+
+}

Modified: trunk/src/main/java/cc/kune/wave/client/WebClient.java
===================================================================
--- trunk/src/main/java/cc/kune/wave/client/WebClient.java	2011-04-29 14:42:12 UTC (rev 1333)
+++ trunk/src/main/java/cc/kune/wave/client/WebClient.java	2011-05-03 08:22:21 UTC (rev 1334)
@@ -25,6 +25,7 @@
 import java.util.Date;
 import java.util.logging.Logger;
 
+import org.apache.jasper.compiler.ErrorDispatcher;
 import org.waveprotocol.box.webclient.client.ClientEvents;
 import org.waveprotocol.box.webclient.client.ClientIdGenerator;
 import org.waveprotocol.box.webclient.client.DebugMessagePanel;
@@ -64,6 +65,7 @@
 
 import cc.kune.common.client.notify.NotifyUser;
 import cc.kune.core.client.errors.DefaultException;
+import cc.kune.core.client.sitebar.ErrorsDialog;
 import cc.kune.core.client.sitebar.spaces.Space;
 import cc.kune.core.client.sitebar.spaces.SpaceConfEvent;
 import cc.kune.core.client.state.SiteTokens;
@@ -263,12 +265,12 @@
    */
   // XXX check formatting wrt GPE
   public native static String getWebSocketBaseUrl(String moduleBase) /*-{
-		return "ws" + /:\/\/[^\/]+/.exec(moduleBase)[0] + "/";
-  }-*/;
+	return "ws" + /:\/\/[^\/]+/.exec(moduleBase)[0] + "/";
+}-*/;
 
   public native static boolean useSocketIO() /*-{
-		return !!$wnd.__useSocketIO
-  }-*/;
+	return !!$wnd.__useSocketIO
+}-*/;
 
   /**
    */
@@ -345,7 +347,7 @@
     }
 
     public static void install() {
-      GWT.setUncaughtExceptionHandler(new ErrorHandler(GWT.getUncaughtExceptionHandler()));
+    GWT.setUncaughtExceptionHandler(new ErrorHandler(GWT.getUncaughtExceptionHandler()));
     }
 
     @Override
@@ -357,9 +359,11 @@
         getStackTraceAsync(e, new Accessor<SafeHtml>() {
           @Override
           public void use(SafeHtml stack) {
-              NotifyUser.error("Error in wave client", true);
+              NotifyUser.error("Oops! Something has gone wrong. Please contact the site admins with <em>more details</em>", true);
           //  error.addDetail(stack, null);
-            REMOTE_LOG.severe(stack.asString().replace("<br>", "\n"));
+            String message = stack.asString().replace("<br>", "\n");
+            REMOTE_LOG.severe(message);
+            NotifyUser.logError(message);
           }
         });
       }

Modified: trunk/src/main/java/cc/kune/wave/server/KuneWaveManager.java
===================================================================
--- trunk/src/main/java/cc/kune/wave/server/KuneWaveManager.java	2011-04-29 14:42:12 UTC (rev 1333)
+++ trunk/src/main/java/cc/kune/wave/server/KuneWaveManager.java	2011-05-03 08:22:21 UTC (rev 1334)
@@ -7,12 +7,16 @@
 
 public interface KuneWaveManager {
 
-  WaveRef createWave(String message, ParticipantId participants);
+    void addParticipant(WaveRef waveName, String author, String userWhoAdd, String newParticipant);
 
-  WaveRef createWave(String title, String message, ParticipantId... participantsArray);
+    WaveRef createWave(String message, ParticipantId participants);
 
-  Wavelet fetchWavelet(WaveRef waveRef, String author);
+    WaveRef createWave(String title, String message, ParticipantId... participantsArray);
 
-  void setTitle(WaveRef waveName, String title, String author);
+    Wavelet fetchWavelet(WaveRef waveRef, String author);
 
+    boolean isParticipant(Wavelet wavelet, String user);
+
+    void setTitle(WaveRef waveName, String title, String author);
+
 }

Modified: trunk/src/main/java/cc/kune/wave/server/KuneWaveManagerDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/wave/server/KuneWaveManagerDefault.java	2011-04-29 14:42:12 UTC (rev 1333)
+++ trunk/src/main/java/cc/kune/wave/server/KuneWaveManagerDefault.java	2011-05-03 08:22:21 UTC (rev 1334)
@@ -40,166 +40,210 @@
 import com.google.wave.api.impl.WaveletData;
 
 public class KuneWaveManagerDefault implements KuneWaveManager {
-  public static final Log LOG = LogFactory.getLog(KuneWaveManagerDefault.class);
+    public static final Log LOG = LogFactory.getLog(KuneWaveManagerDefault.class);
 
-  private static final String NO_TITLE = "";
+    private static final String NO_TITLE = "";
 
-  private final ConversationUtil conversationUtil;
-  private final EventDataConverterManager converterManager;
-  private final String domain;
-  private final OperationServiceRegistry operationRegistry;
-  private final ParticipantUtils participantUtils;
-  private final WaveletProvider waveletProvider;
+    private final ConversationUtil conversationUtil;
+    private final EventDataConverterManager converterManager;
+    private final String domain;
+    private final OperationServiceRegistry operationRegistry;
+    private final ParticipantUtils participantUtils;
+    private final WaveletProvider waveletProvider;
 
-  @Inject
-  public KuneWaveManagerDefault(final EventDataConverterManager converterManager,
-      @Named("DataApiRegistry") final OperationServiceRegistry operationRegistry,
-      final WaveletProvider waveletProvider, final ConversationUtil conversationUtil,
-      final ParticipantUtils participantUtils,
-      @Named(CoreSettings.WAVE_SERVER_DOMAIN) final String domain) {
-    this.converterManager = converterManager;
-    this.waveletProvider = waveletProvider;
-    this.conversationUtil = conversationUtil;
-    this.operationRegistry = operationRegistry;
-    this.participantUtils = participantUtils;
-    this.domain = domain;
-  }
+    @Inject
+    public KuneWaveManagerDefault(final EventDataConverterManager converterManager,
+            @Named("DataApiRegistry") final OperationServiceRegistry operationRegistry,
+            final WaveletProvider waveletProvider, final ConversationUtil conversationUtil,
+            final ParticipantUtils participantUtils, @Named(CoreSettings.WAVE_SERVER_DOMAIN) final String domain) {
+        this.converterManager = converterManager;
+        this.waveletProvider = waveletProvider;
+        this.conversationUtil = conversationUtil;
+        this.operationRegistry = operationRegistry;
+        this.participantUtils = participantUtils;
+        this.domain = domain;
+    }
 
-  @Override
-  public WaveRef createWave(final String message, final ParticipantId participant) {
-    return createWave(NO_TITLE, message, participant);
-  }
+    @Override
+    public void addParticipant(final WaveRef waveName, final String author, final String userWhoAdds,
+            final String participant) {
+        final Wavelet wavelet = fetchWavelet(waveName, author);
+        final String whoAdd = wavelet.getParticipants().contains(participantUtils.of(userWhoAdds)) ? userWhoAdds
+                : author;
+        final OperationQueue opQueue = new OperationQueue();
+        opQueue.addParticipantToWavelet(wavelet, participantUtils.of(participant).toString());
+        final OperationContextImpl context = new OperationContextImpl(waveletProvider,
+                converterManager.getEventDataConverter(ProtocolVersion.DEFAULT), conversationUtil);
+        final OperationRequest request = opQueue.getPendingOperations().get(0);
+        OperationUtil.executeOperation(request, operationRegistry, context, participantUtils.of(whoAdd));
+        final String reqId = request.getId();
+        final JsonRpcResponse response = context.getResponse(reqId);
+        if (response != null && response.isError()) {
+            onFailure(context.getResponse(reqId).getErrorMessage());
+        }
+        OperationUtil.submitDeltas(context, waveletProvider, new SubmitRequestListener() {
+            @Override
+            public void onFailure(final String arg0) {
+                KuneWaveManagerDefault.this.onFailure("Wave add participant failed, onFailure: " + arg0);
+            }
 
-  @Override
-  public WaveRef createWave(@Nonnull final String title, final String message,
-      @Nonnull final ParticipantId... participantsArray) {
-    String newWaveId = null;
-    String newWaveletId = null;
-    final Set<String> participants = new HashSet<String>();
-    for (final ParticipantId participant : participantsArray) {
-      participants.add(participant.toString());
+            @Override
+            public void onSuccess(final int arg0, final HashedVersion arg1, final long arg2) {
+                LOG.info("Wave addParticipant success: " + arg1);
+            }
+        });
     }
-    final ParticipantId user = participantsArray[0];
-    final OperationQueue opQueue = new OperationQueue();
-    final Wavelet newWavelet = opQueue.createWavelet(domain, participants);
-    opQueue.setTitleOfWavelet(newWavelet, title);
-    final Blip rootBlip = newWavelet.getRootBlip();
-    rootBlip.append(new com.google.wave.api.Markup(message).getText());
-    final OperationContextImpl context = new OperationContextImpl(waveletProvider,
-        converterManager.getEventDataConverter(ProtocolVersion.DEFAULT), conversationUtil);
-    for (final OperationRequest req : opQueue.getPendingOperations()) {
-      OperationUtil.executeOperation(req, operationRegistry, context, user);
-      final String reqId = req.getId();
-      final JsonRpcResponse response = context.getResponse(reqId);
-      if (response != null) {
-        if (response.isError()) {
-          onFailure(context.getResponse(reqId).getErrorMessage());
-        } else {
-          final Object responseWaveId = response.getData().get(ParamsProperty.WAVE_ID);
-          final Object responseWaveletId = response.getData().get(ParamsProperty.WAVELET_ID);
-          if (responseWaveId != null && responseWaveletId != null) {
-            // This is serialized use
-            // ApiIdSerializer.instance().deserialiseWaveId (see
-            // WaveService)
-            newWaveId = (String) responseWaveId;
-            newWaveletId = (String) responseWaveletId;
-          }
+
+    @Override
+    public WaveRef createWave(final String message, final ParticipantId participant) {
+        return createWave(NO_TITLE, message, participant);
+    }
+
+    @Override
+    public WaveRef createWave(@Nonnull final String title, final String message,
+            @Nonnull final ParticipantId... participantsArray) {
+        String newWaveId = null;
+        String newWaveletId = null;
+        final Set<String> participants = new HashSet<String>();
+        for (final ParticipantId participant : participantsArray) {
+            participants.add(participant.toString());
         }
-      }
+        final ParticipantId user = participantsArray[0];
+        final OperationQueue opQueue = new OperationQueue();
+        final Wavelet newWavelet = opQueue.createWavelet(domain, participants);
+        opQueue.setTitleOfWavelet(newWavelet, title);
+        final Blip rootBlip = newWavelet.getRootBlip();
+        rootBlip.append(new com.google.wave.api.Markup(message).getText());
+        final OperationContextImpl context = new OperationContextImpl(waveletProvider,
+                converterManager.getEventDataConverter(ProtocolVersion.DEFAULT), conversationUtil);
+        for (final OperationRequest req : opQueue.getPendingOperations()) {
+            OperationUtil.executeOperation(req, operationRegistry, context, user);
+            final String reqId = req.getId();
+            final JsonRpcResponse response = context.getResponse(reqId);
+            if (response != null) {
+                if (response.isError()) {
+                    onFailure(context.getResponse(reqId).getErrorMessage());
+                } else {
+                    final Object responseWaveId = response.getData().get(ParamsProperty.WAVE_ID);
+                    final Object responseWaveletId = response.getData().get(ParamsProperty.WAVELET_ID);
+                    if (responseWaveId != null && responseWaveletId != null) {
+                        // This is serialized use
+                        // ApiIdSerializer.instance().deserialiseWaveId (see
+                        // WaveService)
+                        newWaveId = (String) responseWaveId;
+                        newWaveletId = (String) responseWaveletId;
+                    }
+                }
+            }
+        }
+        OperationUtil.submitDeltas(context, waveletProvider, new SubmitRequestListener() {
+            @Override
+            public void onFailure(final String arg0) {
+                KuneWaveManagerDefault.this.onFailure("Wave creation failed, onFailure: " + arg0);
+            }
+
+            @Override
+            public void onSuccess(final int arg0, final HashedVersion arg1, final long arg2) {
+                LOG.info("Wave creation success: " + arg1);
+            }
+        });
+        LOG.info("WaveId: " + newWaveId + " waveletId: " + newWaveletId);
+        WaveRef wavename;
+        try {
+            wavename = WaveRef.of(ApiIdSerializer.instance().deserialiseWaveId(newWaveId),
+                    ApiIdSerializer.instance().deserialiseWaveletId(newWaveletId));
+        } catch (final InvalidIdException e) {
+            throw new DefaultException("Error getting wave id");
+        }
+        return wavename;
     }
-    OperationUtil.submitDeltas(context, waveletProvider, new SubmitRequestListener() {
-      @Override
-      public void onFailure(final String arg0) {
-        KuneWaveManagerDefault.this.onFailure("Wave creation failed, onFailure: " + arg0);
-      }
 
-      @Override
-      public void onSuccess(final int arg0, final HashedVersion arg1, final long arg2) {
-        LOG.info("Wave creation success: " + arg1);
-      }
-    });
-    LOG.info("WaveId: " + newWaveId + " waveletId: " + newWaveletId);
-    WaveRef wavename;
-    try {
-      wavename = WaveRef.of(ApiIdSerializer.instance().deserialiseWaveId(newWaveId),
-          ApiIdSerializer.instance().deserialiseWaveletId(newWaveletId));
-    } catch (final InvalidIdException e) {
-      throw new DefaultException("Error getting wave id");
+    public void doOperations(final WaveRef waveName, final String author, final OperationQueue opQueue,
+            final SubmitRequestListener listener) {
+        final OperationContextImpl context = new OperationContextImpl(waveletProvider,
+                converterManager.getEventDataConverter(ProtocolVersion.DEFAULT), conversationUtil);
+        for (final OperationRequest req : opQueue.getPendingOperations()) {
+            OperationUtil.executeOperation(req, operationRegistry, context, participantUtils.of(author));
+        }
+        OperationUtil.submitDeltas(context, waveletProvider, listener);
     }
-    return wavename;
-  }
 
-  @Override
-  public Wavelet fetchWavelet(final WaveRef waveName, final String author) {
-    Wavelet wavelet = null;
-    final OperationQueue opQueue = new OperationQueue();
-    opQueue.fetchWavelet(waveName.getWaveId(), waveName.getWaveletId());
-    final OperationContextImpl context = new OperationContextImpl(waveletProvider,
-        converterManager.getEventDataConverter(ProtocolVersion.DEFAULT), conversationUtil);
-    final OperationRequest request = opQueue.getPendingOperations().get(0);
-    OperationUtil.executeOperation(request, operationRegistry, context, participantUtils.of(author));
-    final String reqId = request.getId();
-    final JsonRpcResponse response = context.getResponse(reqId);
-    if (response != null && response.isError()) {
-      onFailure(context.getResponse(reqId).getErrorMessage());
-    } else {
-      // Duplicate code from WaveService
-      final WaveletData waveletData = (WaveletData) response.getData().get(ParamsProperty.WAVELET_DATA);
-      final Map<String, Blip> blips = new HashMap<String, Blip>();
-      final Map<String, BlipThread> threads = new HashMap<String, BlipThread>();
-      wavelet = Wavelet.deserialize(opQueue, blips, threads, waveletData);
+    @Override
+    public Wavelet fetchWavelet(final WaveRef waveName, final String author) {
+        Wavelet wavelet = null;
+        final OperationQueue opQueue = new OperationQueue();
+        opQueue.fetchWavelet(waveName.getWaveId(), waveName.getWaveletId());
+        final OperationContextImpl context = new OperationContextImpl(waveletProvider,
+                converterManager.getEventDataConverter(ProtocolVersion.DEFAULT), conversationUtil);
+        final OperationRequest request = opQueue.getPendingOperations().get(0);
+        OperationUtil.executeOperation(request, operationRegistry, context, participantUtils.of(author));
+        final String reqId = request.getId();
+        final JsonRpcResponse response = context.getResponse(reqId);
+        if (response != null && response.isError()) {
+            onFailure(context.getResponse(reqId).getErrorMessage());
+        } else {
+            // Duplicate code from WaveService
+            final WaveletData waveletData = (WaveletData) response.getData().get(ParamsProperty.WAVELET_DATA);
+            final Map<String, Blip> blips = new HashMap<String, Blip>();
+            final Map<String, BlipThread> threads = new HashMap<String, BlipThread>();
+            wavelet = Wavelet.deserialize(opQueue, blips, threads, waveletData);
 
-      // Deserialize threads.
-      @SuppressWarnings("unchecked")
-      final Map<String, BlipThread> tempThreads = (Map<String, BlipThread>) response.getData().get(
-          ParamsProperty.THREADS);
-      for (final Map.Entry<String, BlipThread> entry : tempThreads.entrySet()) {
-        final BlipThread thread = entry.getValue();
-        threads.put(entry.getKey(),
-            new BlipThread(thread.getId(), thread.getLocation(), thread.getBlipIds(), blips));
-      }
+            // Deserialize threads.
+            @SuppressWarnings("unchecked")
+            final Map<String, BlipThread> tempThreads = (Map<String, BlipThread>) response.getData().get(
+                    ParamsProperty.THREADS);
+            for (final Map.Entry<String, BlipThread> entry : tempThreads.entrySet()) {
+                final BlipThread thread = entry.getValue();
+                threads.put(entry.getKey(), new BlipThread(thread.getId(), thread.getLocation(), thread.getBlipIds(),
+                        blips));
+            }
 
-      // Deserialize blips.
-      @SuppressWarnings("unchecked")
-      final Map<String, BlipData> blipDatas = (Map<String, BlipData>) response.getData().get(
-          ParamsProperty.BLIPS);
-      for (final Map.Entry<String, BlipData> entry : blipDatas.entrySet()) {
-        blips.put(entry.getKey(), Blip.deserialize(opQueue, wavelet, entry.getValue()));
-      }
+            // Deserialize blips.
+            @SuppressWarnings("unchecked")
+            final Map<String, BlipData> blipDatas = (Map<String, BlipData>) response.getData().get(ParamsProperty.BLIPS);
+            for (final Map.Entry<String, BlipData> entry : blipDatas.entrySet()) {
+                blips.put(entry.getKey(), Blip.deserialize(opQueue, wavelet, entry.getValue()));
+            }
+        }
+        return wavelet;
     }
-    return wavelet;
-  }
 
-  private void onFailure(final String message) {
-    final String errorMsg = TextUtils.notEmpty(message) ? message : "Wave operation failed";
-    LOG.error(errorMsg);
-    throw new DefaultException(errorMsg);
-  }
+    @Override
+    public boolean isParticipant(final Wavelet wavelet, final String user) {
+        return wavelet.getParticipants().contains(participantUtils.of(user));
+    }
 
-  @Override
-  public void setTitle(final WaveRef waveName, final String title, final String author) {
-    final Wavelet wavelet = fetchWavelet(waveName, author);
-    final OperationQueue opQueue = new OperationQueue();
-    opQueue.setTitleOfWavelet(wavelet, title);
-    final OperationContextImpl context = new OperationContextImpl(waveletProvider,
-        converterManager.getEventDataConverter(ProtocolVersion.DEFAULT), conversationUtil);
-    final OperationRequest request = opQueue.getPendingOperations().get(0);
-    OperationUtil.executeOperation(request, operationRegistry, context, participantUtils.of(author));
-    final String reqId = request.getId();
-    final JsonRpcResponse response = context.getResponse(reqId);
-    if (response != null && response.isError()) {
-      onFailure(context.getResponse(reqId).getErrorMessage());
+    private void onFailure(final String message) {
+        final String errorMsg = TextUtils.notEmpty(message) ? message : "Wave operation failed";
+        LOG.error(errorMsg);
+        throw new DefaultException(errorMsg);
     }
-    OperationUtil.submitDeltas(context, waveletProvider, new SubmitRequestListener() {
-      @Override
-      public void onFailure(final String arg0) {
-        KuneWaveManagerDefault.this.onFailure("Wave set title failed, onFailure: " + arg0);
-      }
 
-      @Override
-      public void onSuccess(final int arg0, final HashedVersion arg1, final long arg2) {
-        LOG.info("Wave set title success: " + arg1);
-      }
-    });
-  }
+    @Override
+    public void setTitle(final WaveRef waveName, final String title, final String author) {
+        final Wavelet wavelet = fetchWavelet(waveName, author);
+        final OperationQueue opQueue = new OperationQueue();
+        opQueue.setTitleOfWavelet(wavelet, title);
+        final OperationContextImpl context = new OperationContextImpl(waveletProvider,
+                converterManager.getEventDataConverter(ProtocolVersion.DEFAULT), conversationUtil);
+        final OperationRequest request = opQueue.getPendingOperations().get(0);
+        OperationUtil.executeOperation(request, operationRegistry, context, participantUtils.of(author));
+        final String reqId = request.getId();
+        final JsonRpcResponse response = context.getResponse(reqId);
+        if (response != null && response.isError()) {
+            onFailure(context.getResponse(reqId).getErrorMessage());
+        }
+        OperationUtil.submitDeltas(context, waveletProvider, new SubmitRequestListener() {
+            @Override
+            public void onFailure(final String arg0) {
+                KuneWaveManagerDefault.this.onFailure("Wave set title failed, onFailure: " + arg0);
+            }
+
+            @Override
+            public void onSuccess(final int arg0, final HashedVersion arg1, final long arg2) {
+                LOG.info("Wave set title success: " + arg1);
+            }
+        });
+    }
+
 }

Modified: trunk/src/test/java/cc/kune/wave/server/KuneWaveManagerDefaultTest.java
===================================================================
--- trunk/src/test/java/cc/kune/wave/server/KuneWaveManagerDefaultTest.java	2011-04-29 14:42:12 UTC (rev 1333)
+++ trunk/src/test/java/cc/kune/wave/server/KuneWaveManagerDefaultTest.java	2011-05-03 08:22:21 UTC (rev 1334)
@@ -19,53 +19,75 @@
 
 public class KuneWaveManagerDefaultTest extends IntegrationTest {
 
-  private static final String MESSAGE = "testing";
-  private static final String TITLE = "title";
-  private static final String TITLENEW = "titleNew";
-  @Inject
-  KuneWaveManagerDefault manager;
-  @Inject
-  ParticipantUtils participantUtils;
+    private static final String MESSAGE = "testing";
+    private static final String NEW_PARTICIPANT = "newparti";
+    private static final String TITLE = "title";
+    private static final String TITLENEW = "titleNew";
+    @Inject
+    KuneWaveManagerDefault manager;
+    @Inject
+    ParticipantUtils participantUtils;
 
-  @Before
-  public void before() {
-    new IntegrationTestHelper(this);
+    private void addParticipant(final String whoAdds) throws IOException {
+        doLogin();
+        final WaveRef waveletName = manager.createWave(TITLE, MESSAGE, participantUtils.of(getSiteAdminShortName()));
+        assertNotNull(waveletName);
+        manager.addParticipant(waveletName, getSiteAdminShortName(), whoAdds, NEW_PARTICIPANT);
+        final Wavelet fetchWavelet = manager.fetchWavelet(waveletName, getSiteAdminShortName());
+        assertNotNull(fetchWavelet);
+        assertEquals(2, fetchWavelet.getParticipants().size());
+        manager.isParticipant(fetchWavelet, NEW_PARTICIPANT);
+    }
 
-  }
+    @Test
+    public void authorAddParticipant() throws DefaultException, IOException {
+        final String whoAdds = getSiteAdminShortName();
+        addParticipant(whoAdds);
+    }
 
-  @Test
-  public void createWave() throws DefaultException, IOException {
-    doLogin();
-    final WaveRef waveletName = manager.createWave(MESSAGE, participantUtils.of(getSiteAdminShortName()));
-    assertNotNull(waveletName);
-    final Wavelet fetchWavelet = manager.fetchWavelet(waveletName, getSiteAdminShortName());
-    assertNotNull(fetchWavelet);
-    assertTrue(fetchWavelet.getRootBlip().getContent().contains(MESSAGE));
-  }
+    @Before
+    public void before() {
+        new IntegrationTestHelper(this);
 
-  @Test
-  public void createWaveWithTitle() throws DefaultException, IOException {
-    doLogin();
-    final WaveRef waveletName = manager.createWave(TITLE, MESSAGE,
-        participantUtils.of(getSiteAdminShortName()));
-    assertNotNull(waveletName);
-    final Wavelet fetchWavelet = manager.fetchWavelet(waveletName, getSiteAdminShortName());
-    assertNotNull(fetchWavelet);
-    assertTrue(fetchWavelet.getRootBlip().getContent().contains(MESSAGE));
-    assertEquals(TITLE, fetchWavelet.getTitle());
-  }
+    }
 
-  @Test
-  public void setTitle() throws DefaultException, IOException {
-    doLogin();
-    final WaveRef waveletName = manager.createWave(TITLE, MESSAGE,
-        participantUtils.of(getSiteAdminShortName()));
-    assertNotNull(waveletName);
-    manager.setTitle(waveletName, TITLENEW, getSiteAdminShortName());
-    final Wavelet fetchWavelet = manager.fetchWavelet(waveletName, getSiteAdminShortName());
-    assertNotNull(fetchWavelet);
-    assertTrue(fetchWavelet.getRootBlip().getContent().contains(MESSAGE));
-    assertEquals(TITLENEW, fetchWavelet.getTitle());
-  }
+    @Test
+    public void createWave() throws DefaultException, IOException {
+        doLogin();
+        final WaveRef waveletName = manager.createWave(MESSAGE, participantUtils.of(getSiteAdminShortName()));
+        assertNotNull(waveletName);
+        final Wavelet fetchWavelet = manager.fetchWavelet(waveletName, getSiteAdminShortName());
+        assertNotNull(fetchWavelet);
+        assertTrue(fetchWavelet.getRootBlip().getContent().contains(MESSAGE));
+    }
 
+    @Test
+    public void createWaveWithTitle() throws DefaultException, IOException {
+        doLogin();
+        final WaveRef waveletName = manager.createWave(TITLE, MESSAGE, participantUtils.of(getSiteAdminShortName()));
+        assertNotNull(waveletName);
+        final Wavelet fetchWavelet = manager.fetchWavelet(waveletName, getSiteAdminShortName());
+        assertNotNull(fetchWavelet);
+        assertTrue(fetchWavelet.getRootBlip().getContent().contains(MESSAGE));
+        assertEquals(TITLE, fetchWavelet.getTitle());
+    }
+
+    @Test
+    public void otherMemberAddParticipant() throws DefaultException, IOException {
+        final String whoAdds = "otherMember";
+        addParticipant(whoAdds);
+    }
+
+    @Test
+    public void setTitle() throws DefaultException, IOException {
+        doLogin();
+        final WaveRef waveletName = manager.createWave(TITLE, MESSAGE, participantUtils.of(getSiteAdminShortName()));
+        assertNotNull(waveletName);
+        manager.setTitle(waveletName, TITLENEW, getSiteAdminShortName());
+        final Wavelet fetchWavelet = manager.fetchWavelet(waveletName, getSiteAdminShortName());
+        assertNotNull(fetchWavelet);
+        assertTrue(fetchWavelet.getRootBlip().getContent().contains(MESSAGE));
+        assertEquals(TITLENEW, fetchWavelet.getTitle());
+    }
+
 }




More information about the kune-commits mailing list