1 15 package org.apache.tapestry.callback; 16 17 import org.apache.hivemind.util.Defense; 18 import org.apache.tapestry.IPage; 19 import org.apache.tapestry.IRequestCycle; 20 21 79 80 public class PageCallback implements ICallback 81 { 82 85 86 private static final long serialVersionUID = -3286806776105690068L; 87 88 private String _pageName; 89 90 public PageCallback(String pageName) 91 { 92 Defense.notNull(pageName, "pageName"); 93 _pageName = pageName; 94 } 95 96 public PageCallback(IPage page) 97 { 98 Defense.notNull(page, "page"); 99 100 _pageName = page.getPageName(); 101 } 102 103 public String toString() 104 { 105 return "PageCallback[" + _pageName + "]"; 106 } 107 108 112 113 public void performCallback(IRequestCycle cycle) 114 { 115 Defense.notNull(cycle, "cycle"); 116 117 cycle.activate(_pageName); 118 } 119 } | Popular Tags |