1 16 package org.apache.myfaces.examples.calendarexample; 17 18 import java.util.Date ; 19 import java.util.List ; 20 import java.util.ArrayList ; 21 import java.io.Serializable ; 22 23 28 public class DateHolder implements Serializable 29 { 30 private Date _date = new Date (); 31 private transient List _dates; 32 33 public Date getDate() 34 { 35 return _date; 36 } 37 38 public void setDate(Date date) 39 { 40 _date = date; 41 } 42 43 public List getDates() 44 { 45 if(_dates == null) 46 { 47 _dates = new ArrayList (); 48 49 for(int i=0; i<3; i++) 50 _dates.add(new DateHolder()); 51 } 52 53 return _dates; 54 } 55 56 public void setDates(List dates) 57 { 58 _dates = dates; 59 } 60 } 61 | Popular Tags |