1 15 package tutorial.events; 16 17 import java.text.DateFormat ; 18 import java.util.Date ; 19 20 import net.sf.tapestry.IRequestCycle; 21 import net.sf.tapestry.RequestCycleException; 22 import net.sf.tapestry.html.BasePage; 23 24 28 public class Home extends BasePage { 29 32 public void timeListener(IRequestCycle cycle) throws RequestCycleException { 33 System.err.println("TIME LISTENER METHOD CALLED"); 34 pageTime = DateFormat.getDateTimeInstance().format(new Date ()); 35 } 36 37 public String getPageTime() { 38 return pageTime; 39 } 40 41 44 public void detach() { 45 pageTime = null; 46 } 47 48 private String pageTime; 49 } 50 | Popular Tags |