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 34 35 public abstract class Do extends AbstractComponent 36 { 37 40 41 protected void renderComponent(IMarkupWriter writer, IRequestCycle cycle) 42 { 43 boolean render = !cycle.isRewinding(); 44 45 if (render) 46 { 47 writer.begin("do"); 48 49 writer.attribute("type", getType()); 50 51 String label = getLabel(); 52 if (HiveMind.isNonBlank(label)) 53 writer.attribute("label", label); 54 55 renderInformalParameters(writer, cycle); 56 } 57 58 renderBody(writer, cycle); 59 60 if (render) 61 writer.end(); 62 } 63 64 public abstract String getType(); 65 66 public abstract String getLabel(); 67 } | Popular Tags |