1 package cayenne.tutorial.tapestry.pages; 2 3 import org.apache.tapestry.IRequestCycle; 4 import org.apache.tapestry.engine.IPageLoader; 5 import org.apache.tapestry.event.PageEvent; 6 import org.apache.tapestry.event.PageRenderListener; 7 import org.apache.tapestry.html.BasePage; 8 import org.apache.tapestry.spec.IComponentSpecification; 9 import org.objectstyle.cayenne.access.DataContext; 10 11 import cayenne.tutorial.tapestry.Visit; 12 13 19 public class ApplicationPage extends BasePage implements PageRenderListener { 20 21 public void finishLoad( 22 IRequestCycle cycle, 23 IPageLoader loader, 24 IComponentSpecification specification) { 25 26 addPageRenderListener(this); 28 super.finishLoad(cycle, loader, specification); 29 } 30 31 34 protected DataContext getVisitDataContext() { 35 Visit visit = (Visit) getPage().getVisit(); 36 return visit.getDataContext(); 37 } 38 39 45 public void pageBeginRender(PageEvent event) { 47 } 49 } 50 | Popular Tags |