Author: theute
Date: 2011-12-08 05:36:22 -0500 (Thu, 08 Dec 2011)
New Revision: 8217
Modified:
epp/portal/tags/EPP_5_2_0_GA/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIUserInGroup.java
Log:
JBEPP-1432: Paging of users in group is broken (ArrayIndexOutOfBoundsException)
Modified:
epp/portal/tags/EPP_5_2_0_GA/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIUserInGroup.java
===================================================================
---
epp/portal/tags/EPP_5_2_0_GA/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIUserInGroup.java 2011-12-08
10:04:51 UTC (rev 8216)
+++
epp/portal/tags/EPP_5_2_0_GA/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIUserInGroup.java 2011-12-08
10:36:22 UTC (rev 8217)
@@ -20,6 +20,7 @@
package org.exoplatform.organization.webui.component;
import org.exoplatform.commons.utils.EmptySerializablePageList;
+import org.exoplatform.commons.utils.ListAccess;
import org.exoplatform.commons.utils.PageList;
import org.exoplatform.portal.webui.util.Util;
import org.exoplatform.services.organization.Group;
@@ -133,7 +134,9 @@
{
OrganizationService service =
getApplicationComponent(OrganizationService.class);
MembershipHandler handler = service.getMembershipHandler();
- pageList = new FindMembershipByGroupPageList(group.getId(), 10);
+ ListAccess<?> list = handler.findAllMembershipsByGroup(group);
+ pageList = new FindMembershipByGroupPageList(group.getId(),
+ list.getSize() > 10 ? list.getSize() : 10);
}
UIGridUser uiGrid = getChild(UIGridUser.class);
pageList.setPageSize(5);