Author: mputz
Date: 2011-02-18 07:01:45 -0500 (Fri, 18 Feb 2011)
New Revision: 5915
Modified:
epp/portal/branches/EPP_5_1_Branch/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIUserInGroup.java
Log:
JBEPP-723: Patch for GTNPORTAL-1356: Show exception when delete member in page 2 of group
Modified:
epp/portal/branches/EPP_5_1_Branch/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIUserInGroup.java
===================================================================
---
epp/portal/branches/EPP_5_1_Branch/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIUserInGroup.java 2011-02-18
12:00:38 UTC (rev 5914)
+++
epp/portal/branches/EPP_5_1_Branch/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIUserInGroup.java 2011-02-18
12:01:45 UTC (rev 5915)
@@ -176,6 +176,10 @@
}
/** Reset the selected page index **/
+ if (backupPageIndex > pageIterator.getAvailablePage())
+ {
+ backupPageIndex = pageIterator.getAvailablePage();
+ }
pageIterator.setCurrentPage(backupPageIndex);
}
@@ -197,15 +201,10 @@
{
UIUserInGroup uiUserInGroup = event.getSource();
String id = event.getRequestContext().getRequestParameter(OBJECTID);
- UIPageIterator pageIterator =
uiUserInGroup.getChild(UIGridUser.class).getUIPageIterator();
- int currentPage = pageIterator.getCurrentPage();
OrganizationService service =
uiUserInGroup.getApplicationComponent(OrganizationService.class);
MembershipHandler handler = service.getMembershipHandler();
handler.removeMembership(id, true);
uiUserInGroup.refresh();
- while (currentPage > pageIterator.getAvailablePage())
- currentPage--;
- pageIterator.setCurrentPage(currentPage);
event.getRequestContext().addUIComponentToUpdateByAjax(uiUserInGroup.getChild(UIGridUser.class));
}
}