01: /*
02: * $Header: /cvsroot/webman-cms/source/webman/com/teamkonzept/lib/templates/TKSetTag.java,v 1.7 2001/10/09 11:38:31 alex Exp $
03: *
04: */
05: package com.teamkonzept.lib.templates;
06:
07: import java.io.*;
08:
09: 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 name,
24: boolean hasSubTags) throws TKTemplateSyntaxException {
25: super (parent, name, hasSubTags);
26: }
27:
28: public String apply(TKTemplateData td)
29: throws TKTemplateSyntaxException {
30: String name = getName(td);
31: String 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: String name = getName(td);
39: String value = getValue(td);
40: td.setVariable(name, value);
41: }
42:
43: }//end class
|