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 33 34 public abstract class Option extends AbstractComponent 35 { 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("option"); 48 49 String value = getValue(); 50 if (HiveMind.isNonBlank(value)) 51 writer.attribute("value", value); 52 53 renderInformalParameters(writer, cycle); 54 55 renderBody(writer, cycle); 56 57 writer.end(); 58 } 59 } 60 61 public abstract String getValue(); 62 } | Popular Tags |