View Javadoc

1   package org.appfuse.webapp.action;
2   
3   import org.appfuse.dao.SearchException;
4   
5   import java.io.Serializable;
6   import java.util.List;
7   
8   public class UserList extends BasePage implements Serializable {
9       private static final long serialVersionUID = 972359310602744018L;
10  
11      private String query;
12  
13      public void setQuery(String query) {
14          this.query = query;
15      }
16  
17      public String getQuery() {
18          return query;
19      }
20  
21      public UserList() {
22          setSortColumn("username");
23      }
24  
25      public List getUsers() {
26          try {
27              return sort(userManager.search(query));
28          } catch (SearchException se) {
29              addError(se.getMessage());
30              return sort(userManager.search(query));
31          }
32      }
33  
34      public String search() {
35          return "success";
36      }
37  }