Author: phuong_vu
Date: 2010-11-17 21:18:28 -0500 (Wed, 17 Nov 2010)
New Revision: 5142
Modified:
portal/branches/branch-GTNPORTAL-1643/webui/eXo/src/main/java/org/exoplatform/webui/organization/account/UIUserSelector.java
Log:
GTNPORTAL-1514 Kept old search result when search user with wrong path
Modified:
portal/branches/branch-GTNPORTAL-1643/webui/eXo/src/main/java/org/exoplatform/webui/organization/account/UIUserSelector.java
===================================================================
---
portal/branches/branch-GTNPORTAL-1643/webui/eXo/src/main/java/org/exoplatform/webui/organization/account/UIUserSelector.java 2010-11-17
11:56:55 UTC (rev 5141)
+++
portal/branches/branch-GTNPORTAL-1643/webui/eXo/src/main/java/org/exoplatform/webui/organization/account/UIUserSelector.java 2010-11-18
02:18:28 UTC (rev 5142)
@@ -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