1 15 package org.apache.tapestry.contrib.palette; 16 17 import org.apache.tapestry.IMarkupWriter; 18 import org.apache.tapestry.IRender; 19 import org.apache.tapestry.IRequestCycle; 20 21 27 public class PaletteOption implements IRender 28 { 29 private String _value; 30 private String _label; 31 32 public PaletteOption(String value, String label) 33 { 34 _value = value; 35 _label = label; 36 } 37 38 public void render(IMarkupWriter writer, IRequestCycle cycle) 39 { 40 writer.begin("option"); 41 writer.attribute("value", _value); 42 writer.print(_label); 43 writer.end(); writer.println(); 45 } 46 47 public String getLabel() 48 { 49 return _label; 50 } 51 52 public String getValue() 53 { 54 return _value; 55 } 56 57 } 58 | Popular Tags |