1 16 package org.apache.myfaces.examples.forceid; 17 18 import javax.faces.component.UISelectItem; 19 import java.util.ArrayList ; 20 21 24 public class ForceIdBean { 25 26 private String valueOne, valueTwo; 27 private User users[]; 28 private ArrayList choices = new ArrayList (); 29 private String currentChoice; 30 31 public ForceIdBean(){ 32 users = new User[2]; 33 users[0] = new User("MyFaces","secrect"); 34 users[1] = new User("Tomcat","secrect"); 35 36 choices.add("foo"); 37 choices.add("bar"); 38 choices.add("buzz"); 39 } 40 41 public String getValueOne() { 42 return valueOne; 43 } 44 public void setValueOne(String valueOne) { 45 this.valueOne = valueOne; 46 } 47 public String getValueTwo() { 48 return valueTwo; 49 } 50 public void setValueTwo(String valueTwo) { 51 this.valueTwo = valueTwo; 52 } 53 public User[] getUsers() { 54 return users; 55 } 56 public void setUsers(User[] users) { 57 this.users = users; 58 } 59 60 public ArrayList getChoices() 61 { 62 return choices; 63 } 64 65 public void setCurrentChoice(String currentChoice) 66 { 67 this.currentChoice = currentChoice; 68 } 69 70 public String getCurrentChoice() 71 { 72 return currentChoice; 73 } 74 } 75 | Popular Tags |