1 15 package org.apache.tapestry.script; 16 17 import org.apache.hivemind.Location; 18 import org.apache.tapestry.IRequestCycle; 19 20 29 30 class UniqueToken extends AbstractToken 31 { 32 public UniqueToken(Location location) 33 { 34 super(location); 35 } 36 37 public void write(StringBuffer buffer, ScriptSession session) 38 { 39 IRequestCycle cycle = session.getRequestCycle(); 40 41 Location location = getLocation(); 42 String tag = "<unique> " + location.toString(); 43 44 if (cycle.getAttribute(tag) != null) 45 return; 46 47 cycle.setAttribute(tag, Boolean.TRUE); 48 49 writeChildren(buffer, session); 50 } 51 52 } 53 | Popular Tags |