Skip to content

Instantly share code, notes, and snippets.

@fabriciofx
Forked from rponte/UserBean.java
Created April 6, 2014 05:33
Show Gist options
  • Save fabriciofx/10001871 to your computer and use it in GitHub Desktop.
Save fabriciofx/10001871 to your computer and use it in GitHub Desktop.
@ManagedBean
public class UserBean {
private String name;
private List<User> users = new ArrayList<User>();
public String listAll() {
UserDao dao = new UserDao();
this.users = dao.findByName(name);
return "list";
}
public List<User> getUsers() {
return this.users;
}
// other gets and sets
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment