package org.apache.struts.taglib.html;

import javax.servlet.jsp.tagext.BodyTagSupport;
import javax.servlet.jsp.JspException;

/**
 *
 * @author Nick Pellow
 * @version 1.0
 */

public abstract class BaseAttributeTag extends BodyTagSupport{

  public BaseAttributeTag () {
  }
  
  public abstract int doAfterBody() throws JspException;

  public RuntimeConfigurableTag getRuntimeConfigurableTag() throws JspException {
      RuntimeConfigurableTag runtimeConfigurable = (RuntimeConfigurableTag)findAncestorWithClass(this, RuntimeConfigurableTag.class);
      if (runtimeConfigurable == null) {
        throw new JspException("All BaseAttributeTags must be nested within a RuntimeConfigurable");
      }
 
      return runtimeConfigurable;
  }
 
}