org.wings.template
Class LabelTagHandler

java.lang.Object
  extended by org.wings.template.LabelTagHandler
All Implemented Interfaces:
SpecialTagHandler

public class LabelTagHandler
extends Object

A TemplateTagHandler

Author:
Holger Engels

Constructor Summary
LabelTagHandler()
           
 
Method Summary
 void executeTag(ParseContext context, InputStream input)
          actually perform the action associated with this tag.
 String getContent()
           
 String getFor()
           
 long getTagLength()
          Get the length of the area in the sourcefile.
 long getTagStart()
          Get start position of the area in the sourcefile this handler processes.
 SGMLTag parseTag(ParseContext context, PositionReader input, long startPosition, SGMLTag startTag)
          Parse tag.
 int readContent(Reader r, StringBuilder content)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LabelTagHandler

public LabelTagHandler()
Method Detail

parseTag

public SGMLTag parseTag(ParseContext context,
                        PositionReader input,
                        long startPosition,
                        SGMLTag startTag)
                 throws IOException
Description copied from interface: SpecialTagHandler
Parse tag. This method is invoked if a tag with a name this class is registered for is found. It gets the ServletConfiguration of the PageParser servet and a PositionReader, placed after name of the current tag.

The parseTag() method is called before any processing is done. Its purpose is to parse the area this tag spans and probably read in parameters used at execution time.

This method returns the last tag belonging to the area handled by this handler (for server side included servlets, this would be </SERVLET>). For simple one-tag Handlers this is simply the tag passed to this method. If the Handler decides not to handle this tag, this method should return null.

Parameters:
context - the parsing context
input - the PositionReader, located after the name token of the tag
startPosition - the position where parsing of this token began
startTag - the SGMLTag found in the file.
Throws:
IOException

readContent

public int readContent(Reader r,
                       StringBuilder content)
                throws IOException
Throws:
IOException

getContent

public String getContent()

getFor

public String getFor()

executeTag

public void executeTag(ParseContext context,
                       InputStream input)
                throws Exception
actually perform the action associated with this tag.

Specified by:
executeTag in interface SpecialTagHandler
Throws:
Exception - anything can happen .. and throw an Exception which is caught in PageParser

getTagStart

public long getTagStart()
Get start position of the area in the sourcefile this handler processes.

Specified by:
getTagStart in interface SpecialTagHandler

getTagLength

public long getTagLength()
Get the length of the area in the sourcefile. The area this handler processes is skipped in the inputfile.

Specified by:
getTagLength in interface SpecialTagHandler


wingS Swings ;-)