Author: hfnukal
Date: 2012-03-13 08:53:37 -0400 (Tue, 13 Mar 2012)
New Revision: 8576
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIAddApplicationForm.java
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIPortletInfo.java
Log:
Bug 793635 - (JBEPP-714) WCM portlets are registered twice after import from within
ecmdemo
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIAddApplicationForm.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIAddApplicationForm.java 2012-03-13
11:42:35 UTC (rev 8575)
+++
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIAddApplicationForm.java 2012-03-13
12:53:37 UTC (rev 8576)
@@ -266,23 +266,24 @@
return;
}
- UIFormRadioBoxInput uiRadio = uiForm.getUIInput("application");
- String displayName = uiForm.getUIStringInput(FIELD_NAME).getValue();
if (uiForm.getApplications().size() == 0)
{
ctx.getUIApplication().addMessage(new
ApplicationMessage("UIAddApplicationForm.msg.appNotExists", null));
ctx.addUIComponentToUpdateByAjax(uiOrganizer);
return;
}
+ UIFormRadioBoxInput uiRadio = uiForm.getUIInput("application");
+ String displayName = uiForm.getUIStringInput(FIELD_NAME).getValue();
Application tmp =
uiForm.getApplications().get(Integer.parseInt(uiRadio.getValue()));
-
+
// check portet name is exist
- if (appRegService.getApplication(selectedCate.getName(),
tmp.getApplicationName()) != null)
+ for (Application application : appRegService.getApplications(selectedCate))
{
- WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
- UIApplication uiApp = context.getUIApplication();
- uiApp.addMessage(new
ApplicationMessage("UIAddApplicationForm.msg.PortletExist", null));
- return;
+ if (application.getContentId().equals(tmp.getContentId()))
+ {
+ ctx.getUIApplication().addMessage(new
ApplicationMessage("UIAddApplicationForm.msg.PortletExist", null));
+ return;
+ }
}
Application app = cloneApplication(tmp);
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIPortletInfo.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIPortletInfo.java 2012-03-13
11:42:35 UTC (rev 8575)
+++
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIPortletInfo.java 2012-03-13
12:53:37 UTC (rev 8576)
@@ -102,9 +102,12 @@
for (ApplicationCategory category : allCategories)
{
- if (appRegService.getApplication(category.getName(), portlet_.getName()) !=
null)
+ for (Application application : appRegService.getApplications(category))
{
- nameList.add(category.getDisplayName());
+ if (application.getContentId().equals(portlet_.getId()))
+ {
+ nameList.add(category.getDisplayName());
+ }
}
}
StringBuffer names = new StringBuffer("");
Show replies by date