org.eclipse.jet.taglib
Interface ConditionalTag

All Superinterfaces:
ContainerTag, CustomTag, EmptyTag
All Known Implementing Classes:
AbstractConditionalTag

public interface ConditionalTag
extends ContainerTag

Interface to a conditional tag. A conditional custom tag:

  • requires a body (i.e., the form <myConditionalTag/> is an error).
  • includes or excludes its body content depending on the evaluation of some condition
  • Methods are called in the following order:
  • The set*() methods as defined by CustomTag.
  • doEvalCondition(TagInfo, JET2Context).
  • If doEvalCondition(TagInfo, JET2Context) returns true, then the body processing methods are called as described in ContainerTag.

  • Method Summary
     boolean doEvalCondition(TagInfo td, JET2Context context)
              Evalutate the condition that determines whether the tag's body is to be written to the tags output writer.
     
    Methods inherited from interface org.eclipse.jet.taglib.ContainerTag
    doAfterBody, doBeforeBody, setBodyContent
     
    Methods inherited from interface org.eclipse.jet.taglib.EmptyTag
    doAction
     

    Method Detail

    doEvalCondition

    boolean doEvalCondition(TagInfo td,
                            JET2Context context)
                            throws JET2TagException
    Evalutate the condition that determines whether the tag's body is to be written to the tags output writer.

    Parameters:
    td - the tag information (i.e. attribute values)
    context - the JET2 execution context
    Returns:
    true if the body should be included, false otherwise.
    Throws:
    JET2TagException - if the method cannot execute properly.

    Copyright 2006 IBM Corporation and others.
    All Rights Reserved.