Author: truong.le
Date: 2010-01-25 21:30:24 -0500 (Mon, 25 Jan 2010)
New Revision: 1445
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIGroupForm.java
Log:
GTNPORTAL-437: show message wrong when delete group in special case
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIGroupForm.java
===================================================================
---
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIGroupForm.java 2010-01-25
11:12:49 UTC (rev 1444)
+++
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIGroupForm.java 2010-01-26
02:30:24 UTC (rev 1445)
@@ -108,25 +108,24 @@
if (currentGroupId != null)
{
Group currentGroup =
service.getGroupHandler().findGroupById(currentGroupId);
- uiGroupForm.invokeSetBindingBean(currentGroup);
- if (currentGroup.getLabel() == null ||
currentGroup.getLabel().trim().length() == 0)
- {
- currentGroup.setLabel(currentGroup.getGroupName());
- }
- Group updateGroup =
service.getGroupHandler().findGroupById(currentGroup.getGroupName());
- if (updateGroup == null)
+ if (currentGroup == null)
{
- Object[] args = {"GroupName", currentGroup.getGroupName()};
+ Object[] args = {uiGroupForm.getUIStringInput(GROUP_NAME).getValue()};
UIApplication uiApp = event.getRequestContext().getUIApplication();
uiApp.addMessage(new
ApplicationMessage("UIGroupForm.msg.group-not-exist", args));
- String parentId = currentGroup.getParentId();
- uiGroupExplorer.changeGroup(parentId);
+ uiGroupExplorer.changeGroup(null);
uiGroupDetail.getChild(UIGroupForm.class).setGroup(null);
uiGroupDetail.setRenderedChild(UIGroupInfo.class);
return;
}
+ uiGroupForm.invokeSetBindingBean(currentGroup);
+ if (currentGroup.getLabel() == null ||
currentGroup.getLabel().trim().length() == 0)
+ {
+ currentGroup.setLabel(currentGroup.getGroupName());
+ }
+
service.getGroupHandler().saveGroup(currentGroup, false);
uiGroupForm.reset();
uiGroupForm.setGroup(null);
@@ -157,7 +156,7 @@
Group newGroup = groupHandler.findGroupById(groupName);
if (newGroup != null)
{
- Object[] args = {"GroupName", groupName};
+ Object[] args = {groupName};
UIApplication uiApp = event.getRequestContext().getUIApplication();
uiApp.addMessage(new
ApplicationMessage("UIGroupForm.msg.group-exist", args));
return;