1 15 package org.apache.tapestry.wml; 16 17 import org.apache.hivemind.HiveMind; 18 import org.apache.tapestry.AbstractComponent; 19 import org.apache.tapestry.IMarkupWriter; 20 import org.apache.tapestry.IRequestCycle; 21 22 29 30 public abstract class Setvar extends AbstractComponent 31 { 32 35 36 protected void renderComponent(IMarkupWriter writer, IRequestCycle cycle) 37 { 38 if (cycle.isRewinding()) 39 return; 40 41 writer.beginEmpty("setvar"); 42 43 writer.attribute("name", getName()); 44 45 renderInformalParameters(writer, cycle); 46 47 String value = getValue(); 48 49 if (HiveMind.isNonBlank(value)) 50 writer.attribute("value", value); 51 else 52 writer.attribute("value", ""); 53 54 writer.closeTag(); 55 } 56 57 public abstract String getName(); 58 59 public abstract String getValue(); 60 } | Popular Tags |