mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
AWC-489; user list did not refresh
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2329 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -141,6 +141,11 @@ public class UsersBean implements IContextListener
|
||||
*/
|
||||
public List<Node> getUsers()
|
||||
{
|
||||
if (this.users == null)
|
||||
{
|
||||
search();
|
||||
}
|
||||
|
||||
return this.users;
|
||||
}
|
||||
|
||||
@@ -282,6 +287,9 @@ public class UsersBean implements IContextListener
|
||||
|
||||
// commit the transaction
|
||||
tx.commit();
|
||||
|
||||
// re-do the search to refresh the list
|
||||
search();
|
||||
}
|
||||
catch (Throwable e)
|
||||
{
|
||||
@@ -328,9 +336,9 @@ public class UsersBean implements IContextListener
|
||||
/**
|
||||
* Event handler called when the user wishes to search for a user
|
||||
*
|
||||
* @param event The event
|
||||
* @return The outcome
|
||||
*/
|
||||
public void search(ActionEvent event)
|
||||
public String search()
|
||||
{
|
||||
this.usersRichList.setValue(null);
|
||||
|
||||
@@ -408,19 +416,25 @@ public class UsersBean implements IContextListener
|
||||
try { if (tx != null) {tx.rollback();} } catch (Exception tex) {}
|
||||
}
|
||||
}
|
||||
|
||||
// return null to stay on the same page
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Action handler to show all the users currently in the system
|
||||
*
|
||||
* @param event The event
|
||||
* @return The outcome
|
||||
*/
|
||||
public void showAll(ActionEvent event)
|
||||
public String showAll()
|
||||
{
|
||||
this.usersRichList.setValue(null);
|
||||
|
||||
this.users = Repository.getUsers(FacesContext.getCurrentInstance(),
|
||||
this.nodeService, this.searchService);
|
||||
|
||||
// return null to stay on the same page
|
||||
return null;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
@@ -434,6 +448,7 @@ public class UsersBean implements IContextListener
|
||||
if (this.usersRichList != null)
|
||||
{
|
||||
this.usersRichList.setValue(null);
|
||||
this.users = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -124,8 +124,8 @@
|
||||
|
||||
<div style="padding: 6px;" />
|
||||
<h:inputText value="#{UsersBean.searchCriteria}" size="35" maxlength="1024" />
|
||||
<h:commandButton value="Search" actionListener="#{UsersBean.search}" />
|
||||
<h:commandButton value="Show All" actionListener="#{UsersBean.showAll}" />
|
||||
<h:commandButton value="Search" action="#{UsersBean.search}" />
|
||||
<h:commandButton value="Show All" action="#{UsersBean.showAll}" />
|
||||
<div style="padding: 6px;" />
|
||||
|
||||
<a:richList id="users-list" binding="#{UsersBean.usersRichList}" viewMode="details" pageSize="10"
|
||||
|
Reference in New Issue
Block a user