[gatein-commits] gatein SVN: r2775 - portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component.
do-not-reply at jboss.org
do-not-reply at jboss.org
Mon Apr 26 07:17:54 EDT 2010
Author: kien_nguyen
Date: 2010-04-26 07:17:53 -0400 (Mon, 26 Apr 2010)
New Revision: 2775
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UISiteManagement.java
Log:
GTNPORTAL-1079 Wrong information message while managing portals
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UISiteManagement.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UISiteManagement.java 2010-04-26 11:07:42 UTC (rev 2774)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UISiteManagement.java 2010-04-26 11:17:53 UTC (rev 2775)
@@ -191,12 +191,31 @@
selectedNavigation = navigation;
}
+ public boolean isExistInPageList(String portalName) throws Exception {
+ List<PortalConfig> portals = this.getPortalConfigs();
+
+ for(PortalConfig p : portals) {
+ if(p.getName().equals(portalName))
+ return true;
+ }
+
+ return false;
+ }
+
static public class DeletePortalActionListener extends EventListener<UISiteManagement>
{
public void execute(Event<UISiteManagement> event) throws Exception
{
UISiteManagement uicomp = event.getSource();
String portalName = event.getRequestContext().getRequestParameter(OBJECTID);
+
+ //TODO nguyenanhkien2a at gmail.com (GTNPORTAL-1079)
+ //We should check portal is existing in current UI to ensure exactly request of Delete action, not be of Refresh(F5) or Malware
+ if(!uicomp.isExistInPageList(portalName))
+ {
+ return;
+ }
+
UserPortalConfigService service = event.getSource().getApplicationComponent(UserPortalConfigService.class);
String defaultPortalName = service.getDefaultPortal();
More information about the gatein-commits
mailing list