Advertisement
Guest User

Untitled

a guest
Mar 12th, 2015
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.23 KB | None | 0 0
  1.  
  2. @ManagedBean(name = "bean")
  3. @ViewScoped
  4. public class TestBean {
  5.     String selectCopyType = "Person";
  6.     public String getSelectCopyType() {
  7.         return selectCopyType;
  8.     }
  9.  
  10.     public void setSelectCopyType(String selectCopyType) {
  11.         this.selectCopyType = selectCopyType;
  12.     }
  13.  
  14.     public String getNewCurrentOwner() {
  15.         return newCurrentOwner;
  16.     }
  17.  
  18.     public void setNewCurrentOwner(String newCurrentOwner) {
  19.         this.newCurrentOwner = newCurrentOwner;
  20.     }
  21.  
  22.     public String getPool_select() {
  23.         return pool_select;
  24.     }
  25.  
  26.     public void setPool_select(String pool_select) {
  27.         this.pool_select = pool_select;
  28.     }
  29.  
  30.     public List<String> getPools() {
  31.         return pools;
  32.     }
  33.  
  34.     public void setPools(List<String> pools) {
  35.         this.pools = pools;
  36.     }
  37.  
  38.     String newCurrentOwner;
  39.     String pool_select;
  40.     List<String> pools;
  41.  
  42.     @PostConstruct
  43.     public void init() {
  44.         pools = new ArrayList<String>();
  45.         pools.add("String 1");
  46.         pools.add("String 2");
  47.     }
  48.  
  49.     public void onSelectButton() {
  50.         System.out.println("Listener");
  51.     }
  52.  
  53.     public List<String> complete(String s) {
  54.         List<String> result = new ArrayList<String>();
  55.         for (int i = 0; i < 10; i++)
  56.             result.add(s + i);
  57.         return result;
  58.     }
  59.  
  60.     public void onSelectPool() {
  61.         newCurrentOwner = null;
  62.     }
  63. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement