Author: phuong_vu
Date: 2010-11-29 01:49:29 -0500 (Mon, 29 Nov 2010)
New Revision: 5332
Modified:
exo/portal/branches/3.1.x/webui/eXo/src/main/java/org/exoplatform/webui/organization/account/UIUserSelector.java
Log:
EXOGTN-90 Reapply because EXOGTN-143 reverted my last commit
Modified:
exo/portal/branches/3.1.x/webui/eXo/src/main/java/org/exoplatform/webui/organization/account/UIUserSelector.java
===================================================================
---
exo/portal/branches/3.1.x/webui/eXo/src/main/java/org/exoplatform/webui/organization/account/UIUserSelector.java 2010-11-29
06:30:05 UTC (rev 5331)
+++
exo/portal/branches/3.1.x/webui/eXo/src/main/java/org/exoplatform/webui/organization/account/UIUserSelector.java 2010-11-29
06:49:29 UTC (rev 5332)
@@ -412,7 +412,9 @@
uiSelectUserForm.setSelectedGroup(groupId);
OrganizationService service =
uiSelectGroupForm.getApplicationComponent(OrganizationService.class);
PageList users =
uiSelectUserForm.removeDuplicate(service.getUserHandler().findUsersByGroup(groupId));
+ users.setPageSize(10);
uiSelectUserForm.uiIterator_.setPageList(users);
+ uiSelectUserForm.setKeyword(null);
event.getRequestContext().addUIComponentToUpdateByAjax(uiSelectUserForm);
}
}
@@ -423,17 +425,23 @@
{
UIUserSelector uiSelectUserForm = event.getSource();
String groupId = uiSelectUserForm.getSelectedGroup();
- uiSelectUserForm.setSelectedGroup(groupId);
OrganizationService service =
uiSelectUserForm.getApplicationComponent(OrganizationService.class);
+
+ PageList users = PageList.EMPTY_LIST;
if (groupId != null && groupId.trim().length() != 0)
{
- PageList users =
uiSelectUserForm.removeDuplicate(service.getUserHandler().findUsersByGroup(groupId));
- uiSelectUserForm.uiIterator_.setPageList(users);
+ if (service.getGroupHandler().findGroupById(groupId) != null)
+ {
+ users =
uiSelectUserForm.removeDuplicate(service.getUserHandler().findUsersByGroup(groupId));
+ }
}
else
{
-
uiSelectUserForm.uiIterator_.setPageList(service.getUserHandler().findUsers(new
Query()));
+ users = service.getUserHandler().findUsers(new Query());
}
+ users.setPageSize(10);
+ uiSelectUserForm.uiIterator_.setPageList(users);
+ uiSelectUserForm.setKeyword(null);
event.getRequestContext().addUIComponentToUpdateByAjax(uiSelectUserForm);
}
}
Show replies by date