1 5 14 package com.teamkonzept.web.templates; 15 16 import java.io.*; 17 18 import com.teamkonzept.lib.*; 19 import com.teamkonzept.lib.templates.*; 20 21 26 public class TKCheckTag extends TKValueTag { 27 static final int TAG_TYPE = TKTemplateSyntax.MAX_TAG_TYPE+1; 28 37 public TKCheckTag( TKTemplateSyntax parent, String def, boolean hasSubTags ) throws TKTemplateSyntaxException 38 { 39 super( parent, def, hasSubTags ); 40 } 41 42 50 public String apply( TKTemplateData td ) throws TKTemplateSyntaxException 51 { 52 return "VALUE=\""+getValue(td)+"\"" 53 +( matches( td ) ? " CHECKED" : "" ); 54 } 55 56 57 65 public void apply(TKTemplateData td, Writer writer) 66 throws TKTemplateSyntaxException, IOException 67 { 68 writer.write("VALUE=\""+getValue(td)+"\"" 69 +( matches( td ) ? " CHECKED" : "" )); 70 } 71 72 73 } 76 77 | Popular Tags |