1 15 package org.apache.tapestry.html; 16 17 import org.apache.tapestry.AbstractComponent; 18 import org.apache.tapestry.IEngine; 19 import org.apache.tapestry.IMarkupWriter; 20 import org.apache.tapestry.IRequestCycle; 21 import org.apache.tapestry.Tapestry; 22 import org.apache.tapestry.engine.IEngineService; 23 import org.apache.tapestry.engine.ILink; 24 25 31 32 public abstract class Frame extends AbstractComponent 33 { 34 protected void renderComponent(IMarkupWriter writer, IRequestCycle cycle) 35 { 36 if (cycle.isRewinding()) 37 return; 38 39 IEngine engine = cycle.getEngine(); 40 IEngineService pageService = engine.getService(Tapestry.PAGE_SERVICE); 41 ILink link = pageService.getLink(cycle, getTargetPage()); 42 43 writer.beginEmpty("frame"); 44 writer.attribute("src", link.getURL()); 45 46 renderInformalParameters(writer, cycle); 47 48 writer.closeTag(); 49 } 50 51 public abstract String getTargetPage(); 52 53 public abstract void setTargetPage(String targetPage); 54 } | Popular Tags |