Wednesday, 11 November
2009
Wed, 11 Nov
'09
2:10 a.m.
Author: hoang_to
Date: 2009-11-11 03:10:11 -0500 (Wed, 11 Nov 2009)
New Revision: 561
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIMembershipManagement.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIMembershipTypeForm.java
Log:
GTNPORTAL-221: Unknown error when delete membership in special case
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIMembershipManagement.java
===================================================================
---
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIMembershipManagement.java 2009-11-11
07:45:34 UTC (rev 560)
+++
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIMembershipManagement.java 2009-11-11
08:10:11 UTC (rev 561)
@@ -27,11 +27,8 @@
import java.io.Writer;
/**
- * Created by The eXo Platform SARL
- * Author : chungnv
- * nguyenchung136(a)yahoo.com
- * Jun 23, 2006
- * 10:07:15 AM
+ * Created by The eXo Platform SARL Author : chungnv nguyenchung136(a)yahoo.com
+ * Jun 23, 2006 10:07:15 AM
*/
@ComponentConfig()
public class UIMembershipManagement extends UIContainer
@@ -43,7 +40,8 @@
addChild(UIMembershipTypeForm.class, null, null);
}
- public UIGroupMembershipForm getGroupMembershipForm()
+ /** Returns currently selected GroupMembershipForm under the Group tab * */
+ private UIGroupMembershipForm getGroupMembershipForm()
{
UIOrganizationPortlet uiParent = getParent();
UIGroupManagement groupManagement = uiParent.getChild(UIGroupManagement.class);
@@ -55,12 +53,20 @@
public void addOptions(MembershipType option)
{
- getGroupMembershipForm().addOptionMembershipType(option);
+ UIGroupMembershipForm membershipFormUnderGroupTab = getGroupMembershipForm();
+ if (membershipFormUnderGroupTab != null)
+ {
+ membershipFormUnderGroupTab.addOptionMembershipType(option);
+ }
}
public void deleteOptions(MembershipType option)
{
- getGroupMembershipForm().removeOptionMembershipType(option);
+ UIGroupMembershipForm membershipFormUnderGroupTab = getGroupMembershipForm();
+ if (membershipFormUnderGroupTab != null)
+ {
+ membershipFormUnderGroupTab.removeOptionMembershipType(option);
+ }
}
@SuppressWarnings("unused")
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIMembershipTypeForm.java
===================================================================
---
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIMembershipTypeForm.java 2009-11-11
07:45:34 UTC (rev 560)
+++
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIMembershipTypeForm.java 2009-11-11
08:10:11 UTC (rev 561)
@@ -101,6 +101,9 @@
return;
}
service.getMembershipTypeHandler().createMembershipType(mt, true);
+
+ // Update the list of membership under GroupManagment if any
+ uiMembershipManagement.addOptions(mt);
}
uiMembershipManagement.getChild(UIListMembershipType.class).loadData();
Show replies by date