1 package org.apache.tapestry.pets; 2 3 import org.apache.tapestry.form.IPropertySelectionModel; 4 5 10 public class PlainStringPropertySelectionModel implements IPropertySelectionModel 11 { 12 private String [] options; 13 14 19 public PlainStringPropertySelectionModel(String [] options) 20 { 21 this.options = options; 22 } 23 24 public int getOptionCount() 25 { 26 return options.length; 27 } 28 29 public Object getOption(int index) 30 { 31 return options[index]; 32 } 33 34 38 public String getLabel(int index) 39 { 40 return options[index]; 41 } 42 43 47 public String getValue(int index) 48 { 49 return options[index]; 50 } 51 52 public Object translateValue(String value) 53 { 54 return value; 55 } 56 } 57 | Popular Tags |