/** Initializes the fields of this tag handler. */
 protected void init() {
   super.init();
   ancestor = null;
   handler = null;
   event = null;
   indentLevel = -1;
   loopCounter = -1;
 }
 /**
  * Verify if the handled tag was placed in the right context. This methods throws a <CODE>
  * JspException</CODE> if
  *
  * <UL>
  *   <LI><CODE>ancestor</CODE> is <CODE>null</CODE>, but the allowed ancestors list is not empty
  *       or
  *   <LI><CODE>ancestor</CODE> is not <CODE>null</CODE>, but the allowed ancestors list is empty
  *       or
  *   <LI>the name of the given <CODE>ancestor</CODE> tag is not found in the allowed ancestors
  *       list returned by <CODE>getAllowedAncestors()</CODE> or
  *   <LI>the ancestor tag is an &lt;p:element&gt; tag with a dom variable. Such tags may not
  *       contain tags of this library because a DOM sub-tree is constructed instead of generating
  *       SAX events.
  * </UL>
  *
  * @param ancestor the tag handler of an ancestor whose name is searched in the list of allowed
  *     ancestors
  * @throws JspException to signal a tag validation error
  */
 protected void validate(CommonSupport ancestor) throws JspException {
   super.validate(ancestor);
   if (ancestor instanceof Element && ((Element) ancestor).getWantDOM())
     throw new JspException(
         "JSP Validation Error: "
             + "'"
             + getTagName()
             + "' tags "
             + "may not be placed within an 'element' tag "
             + "that processes a DOM tree. Remove either the contained tag "
             + "or the 'varDom' attribute of the parent 'element' tag.");
 }
 /** Calls <CODE>finalizeLoop()</CODE> */
 public void doFinally() {
   finalizeLoop();
   super.doFinally();
 }