1 15 package org.apache.tapestry.link; 16 17 import org.apache.tapestry.INamespace; 18 import org.apache.tapestry.IRequestCycle; 19 import org.apache.tapestry.engine.IEngineService; 20 import org.apache.tapestry.engine.ILink; 21 22 28 29 public abstract class PageLink extends AbstractLinkComponent 30 { 31 public abstract IEngineService getPageService(); 32 33 public ILink getLink(IRequestCycle cycle) 34 { 35 String parameter = null; 36 INamespace namespace = getTargetNamespace(); 37 String targetPage = getTargetPage(); 38 39 if (namespace == null) 40 parameter = targetPage; 41 else 42 parameter = namespace.constructQualifiedName(targetPage); 43 44 return getPageService().getLink(cycle, parameter); 45 } 46 47 public abstract String getTargetPage(); 48 49 50 51 public abstract INamespace getTargetNamespace(); 52 } | Popular Tags |