org.apache.cocoon.taglib
Interface Tag

All Superinterfaces:
Component
All Known Subinterfaces:
BodyTag, IterationTag, LoopTag, TransformerTag, XMLConsumerTag, XMLProducerTag
All Known Implementing Classes:
ActionListenerTag, AreaTag, AttributeTag, ColumnTag, CommandButtonTag, CommandLinkTag, ConvertDateTimeTag, ConverterTag, ConvertNumberTag, DataTableTag, FacetTag, ForEachSupport, ForEachTag, FormatValidatorTag, FormTag, GraphicImageTag, HelloWorldTag, InputHiddenTag, InputSecretTag, InputTextareaTag, InputTextTag, IterationTestTag, LoadBundleTag, LocaleTag, LoopTagSupport, LowerCaseTag, MapTag, MessagesTag, MessageTag, MonthsTag, OutputFormatTag, OutputLabelTag, OutputLinkTag, OutputTextTag, OutTag, PanelGridTag, PanelGroupTag, ParameterTag, SelectBooleanCheckboxTag, SelectItemsTag, SelectItemTag, SelectManyCheckboxTag, SelectManyListboxTag, SelectManyMenuTag, SelectOneListboxTag, SelectOneMenuTag, SelectOneRadioTag, SourceTag, StringTagSupport, SubviewTag, TagSupport, TextRecordingTag, TransformerTagSupport, TrimTag, UIComponentBodyTag, UIComponentTag, UpperCaseTag, ValidateDoubleRangeTag, ValidateLengthTag, ValidateLongRangeTag, ValidateRequiredTag, ValidatorTag, ValueChangeListenerTag, VarTagSupport, VarTransformerTagSupport, VarXMLProducerTagSupport, VerbatimTag, ViewTag, XMLConsumerTagSupport, XMLProducerTagSupport

public interface Tag
extends Component

The Tag implementation works like a JSP Tag but generate SAX output instead of writing to a OutputStream. The equivalent to the JSPEngine is implemented as a Transformer.

Version:
CVS $Id: Tag.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Volker Schmitt
See Also:
TagTransformer

Field Summary
static int EVAL_BODY
          Evaluate body content Valid return value for doStartTag.
static int EVAL_PAGE
          Continue evaluating the page.
static String ROLE
           
static int SKIP_BODY
          Skip body evaluation.
 
Method Summary
 int doEndTag(String namespaceURI, String localName, String qName)
          Process the end tag for this instance.
 int doStartTag(String namespaceURI, String localName, String qName, Attributes atts)
          Process the start tag for this instance.
 Tag getParent()
          Get the parent (closest enclosing tag handler) for this tag handler.
 void setParent(Tag parent)
          Set the parent (closest enclosing tag handler) of this tag handler.
 void setup(SourceResolver resolver, Map objectModel, Parameters parameters)
          Set the SourceResolver, objectModel Map and sitemap Parameters used to process the request.
 

Field Detail

ROLE

static final String ROLE

EVAL_BODY

static final int EVAL_BODY
Evaluate body content Valid return value for doStartTag.

See Also:
Constant Field Values

SKIP_BODY

static final int SKIP_BODY
Skip body evaluation. Valid return value for doStartTag.

See Also:
Constant Field Values

EVAL_PAGE

static final int EVAL_PAGE
Continue evaluating the page. Valid return value for doEndTag.

See Also:
Constant Field Values
Method Detail

doEndTag

int doEndTag(String namespaceURI,
             String localName,
             String qName)
             throws SAXException
Process the end tag for this instance.

Returns:
EVAL_PAGE
Throws:
SAXException

doStartTag

int doStartTag(String namespaceURI,
               String localName,
               String qName,
               Attributes atts)
               throws SAXException
Process the start tag for this instance.

The doStartTag method assumes that parent have been set. It also assumes that any properties exposed as attributes have been set too. When this method is invoked, the body has not yet been evaluated.

Returns:
EVAL_BODY or SKIP_BODY.
Throws:
SAXException

getParent

Tag getParent()
Get the parent (closest enclosing tag handler) for this tag handler.

Returns:
the current parent or null if none.

setup

void setup(SourceResolver resolver,
           Map objectModel,
           Parameters parameters)
           throws SAXException,
                  IOException
Set the SourceResolver, objectModel Map and sitemap Parameters used to process the request.

Throws:
SAXException
IOException

setParent

void setParent(Tag parent)
Set the parent (closest enclosing tag handler) of this tag handler. Invoked by the implementation object prior to doStartTag().

Parameters:
parent - The parent tag or null.


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.