KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > teamkonzept > lib > templates > TKSetTag


1 /*
2  * $Header: /cvsroot/webman-cms/source/webman/com/teamkonzept/lib/templates/TKSetTag.java,v 1.7 2001/10/09 11:38:31 alex Exp $
3  *
4  */

5 package com.teamkonzept.lib.templates;
6
7 import java.io.*;
8
9 import com.teamkonzept.lib.*;
10
11 /**
12  * @author $Author: alex $
13  * @version $Revision: 1.7 $
14  */

15 public class TKSetTag extends TKValueTag {
16     public static final int TAG_TYPE = TKSetLocalTag.TAG_TYPE+1;
17
18     //*******************************************************************
19
/**
20      * Konstruktor 1
21      * Ein Syntaxbaum fuer ein Template wird erzeugt.
22      */

23     public TKSetTag( TKTemplateSyntax parent, String JavaDoc name, boolean hasSubTags ) throws TKTemplateSyntaxException
24     {
25         super( parent, name, hasSubTags );
26     }
27     
28     public String JavaDoc apply( TKTemplateData td ) throws TKTemplateSyntaxException
29     {
30         String JavaDoc name = getName( td );
31         String JavaDoc value = getValue( td );
32         td.setVariable( name, value );
33         return "";
34     }
35
36     public void apply(TKTemplateData td, Writer writer)
37         throws TKTemplateSyntaxException, IOException
38     {
39         String JavaDoc name = getName( td );
40         String JavaDoc value = getValue( td );
41         td.setVariable( name, value );
42     }
43
44 }//end class
45

46
Popular Tags