Author: hoang_to
Date: 2010-04-27 03:31:20 -0400 (Tue, 27 Apr 2010)
New Revision: 2807
Removed:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/model/util/PageNavigationSynchronizer.java
Modified:
portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIGroupMembershipSelector.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageForm.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java
Log:
GTNPORTAL-1091: Clean rotten code
Deleted:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/model/util/PageNavigationSynchronizer.java
===================================================================
---
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/model/util/PageNavigationSynchronizer.java 2010-04-27
07:28:28 UTC (rev 2806)
+++
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/model/util/PageNavigationSynchronizer.java 2010-04-27
07:31:20 UTC (rev 2807)
@@ -1,90 +0,0 @@
-/*
- * Copyright (C) 2010 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.exoplatform.portal.config.model.util;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.exoplatform.portal.config.model.PageNavigation;
-import org.exoplatform.portal.config.model.PageNode;
-
-/**
- * @author <a href="mailto:hoang281283@gmail.com">Minh Hoang
TO</a>
- * @version $Id$
- *
- */
-public class PageNavigationSynchronizer
-{
-
- private PageNavigation wrappedPageNavigation;
-
- private List<PageNavigation> tobeSynchronizedNavigations;
-
- public PageNavigationSynchronizer(PageNavigation _wrappedPageNavigation)
- {
- this.wrappedPageNavigation = _wrappedPageNavigation;
- this.tobeSynchronizedNavigations = new ArrayList<PageNavigation>();
- }
-
- public void start(List<PageNavigation> _synchronizedNavigations)
- {
- this.tobeSynchronizedNavigations = _synchronizedNavigations;
- }
-
- public void stopSynchronizing(List<PageNavigation> notSynchronizedAnymoreNavs)
- {
-
- }
-
- public void stop()
- {
-
- }
-
- /**
- * Add a page node to the <code>wrappedPageNavigation</code> as well as
synchronize this action to all navigations in list of
- * tobeSynchronizedNavigations
- *
- */
- public void addPageNode(PageNode pageNode, String parentUri)
- {
- PageNavigationUtil.addPageNode(wrappedPageNavigation, pageNode, parentUri);
- for(PageNavigation synchronizedNav : tobeSynchronizedNavigations)
- {
- PageNavigationUtil.addPageNode(synchronizedNav, pageNode, parentUri);
- }
- }
-
-
- public void removePageNode(PageNode pageNode, String parentUri)
- {
- PageNavigationUtil.removePageNode(wrappedPageNavigation, pageNode, parentUri);
- for(PageNavigation synchronizedNav : tobeSynchronizedNavigations)
- {
- PageNavigationUtil.removePageNode(synchronizedNav, pageNode, parentUri);
- }
- }
-
- public void movePageNode(PageNode pageNode, String parentUri, boolean moveUp)
- {
-
- }
-
-
-}
Modified:
portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIGroupMembershipSelector.java
===================================================================
---
portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIGroupMembershipSelector.java 2010-04-27
07:28:28 UTC (rev 2806)
+++
portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIGroupMembershipSelector.java 2010-04-27
07:31:20 UTC (rev 2807)
@@ -208,23 +208,12 @@
WebuiRequestContext pcontext = event.getRequestContext();
UIPopupWindow uiPopup = uiSelector.getParent();
- //TODO: Tung.Pham modified
- //-----------------------------------
- //UIForm uiForm = event.getSource().getAncestorOfType(UIForm.class);//TODO:
Remove duplicated call to event.getSource()
UIForm uiForm = uiSelector.getAncestorOfType(UIForm.class);
- //-----------------------------------
- //TODO: by Minh Hoang TO, retrieve the UIPermissionSelector and update this
component
- //UIPermissionSelector
pSelector=uiPopup.getAncestorOfType(UIPermissionSelector.class);
- //if(pSelector!=null){
- // event.getRequestContext().addUIComponentToUpdateByAjax(pSelector);
- //}
-
if (uiSelector.getCurrentGroup() == null)
{
UIApplication uiApp = pcontext.getUIApplication();
uiApp.addMessage(new
ApplicationMessage("UIGroupMembershipSelector.msg.selectGroup", null));
- //
pcontext.addUIComponentToUpdateByAjax(uiApp.getUIPopupMessages());
uiPopup.setShow(true);
return;
}
@@ -233,12 +222,6 @@
uiPermission.broadcast(event, event.getExecutionPhase());
uiPopup.setShow(false);
- // UIForm uiForm = event.getSource().getAncestorOfType(UIForm.class) ;
- // if(uiForm != null) {
- // event.getRequestContext().addUIComponentToUpdateByAjax(uiForm.getParent());
- // }else{
- // event.getRequestContext().addUIComponentToUpdateByAjax(uiPopup);
- // }
}
}
@@ -257,14 +240,6 @@
uiPopup.setShow(true);
event.getRequestContext().addUIComponentToUpdateByAjax(uiPopup);//TODO: Update
relevant tab panes
- /*
- UIForm uiForm = event.getSource().getAncestorOfType(UIForm.class) ;
- if(uiForm != null) {
- event.getRequestContext().addUIComponentToUpdateByAjax(uiForm.getParent());
- }else{
- event.getRequestContext().addUIComponentToUpdateByAjax(uiPopup);
- }
- */
}
}
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageForm.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageForm.java 2010-04-27
07:28:28 UTC (rev 2806)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageForm.java 2010-04-27
07:31:20 UTC (rev 2807)
@@ -129,14 +129,6 @@
addUIFormInput(uiSettingSet);
setSelectedTab(uiSettingSet.getId());
-// WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
-// Param param = initParams.getParam("PageTemplate");
-// List<SelectItemCategory> itemCategories =
(List<SelectItemCategory>)param.getMapGroovyObject(context);
-
-// UIFormInputItemSelector uiTemplate = new
UIFormInputItemSelector("Template", "template");
-// uiTemplate.setItemCategories(itemCategories);
-// addUIFormInput(uiTemplate);
-
uiPermissionSetting = createUIComponent(UIFormInputSet.class,
"PermissionSetting", null);
UIListPermissionSelector uiListPermissionSelector =
createUIComponent(UIListPermissionSelector.class, null, null);
uiListPermissionSelector.configure("UIListPermissionSelector",
"accessPermissions");
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java 2010-04-27
07:28:28 UTC (rev 2806)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java 2010-04-27
07:31:20 UTC (rev 2807)
@@ -610,9 +610,6 @@
}
}
- // -----------------------------Page's
- // Listeners------------------------------------------//
-
static public class ViewProperties2ActionListener extends
EventListener<UIPortalComposer>
{
public void execute(Event<UIPortalComposer> event) throws Exception