Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.cactus.extension.jsp
Class JspTagLifecycle.Interceptor  view JspTagLifecycle.Interceptor download JspTagLifecycle.Interceptor.java

java.lang.Object
  extended byorg.apache.cactus.extension.jsp.JspTagLifecycle.Interceptor
Direct Known Subclasses:
JspTagLifecycle.ExpectBodyEvaluatedInterceptor, JspTagLifecycle.ExpectBodySkippedInterceptor, JspTagLifecycle.ExpectScopedVariableExposedInterceptor, JspTagLifecycle.NestedTagInterceptor, JspTagLifecycle.NestedTextInterceptor
Enclosing class:
JspTagLifecycle

public abstract static class JspTagLifecycle.Interceptor
extends java.lang.Object

Abstract class for intercepting the tag lifecycle. You can override any of the methods to insert expectations about the tag's behaviour while it is being executed.

Since:
Cactus 1.5

Constructor Summary
JspTagLifecycle.Interceptor()
           
 
Method Summary
 void evalBody(int theIteration, javax.servlet.jsp.tagext.BodyContent theBody)
          Method called when the body of the tag would be evaluated.
 void skipBody()
          Method called when the body of the tag would be skipped.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JspTagLifecycle.Interceptor

public JspTagLifecycle.Interceptor()
Method Detail

evalBody

public void evalBody(int theIteration,
                     javax.servlet.jsp.tagext.BodyContent theBody)
              throws javax.servlet.jsp.JspException,
                     java.io.IOException
Method called when the body of the tag would be evaluated. Can be used in specific test cases to perform assertions. Please note that if you're testing a BodyTag, you should not write content to the JspTestCase.out>JspTestCase.out 55 instance variable while the body is being evaluated. This is because the actual implicit object out in JSP pages gets replaced by the current nested BodyContent, whereas in JspTestCase the out variable always refers to the top level JspWriter. Instead, simply use the BodyContent parameter passed into the evalBody() 55 method or the JspWriter retrieved by a call to {javax.servlet.jsp.PageContext#getOut pageContext.getOut()}.


skipBody

public void skipBody()
Method called when the body of the tag would be skipped. Can be used in specific test cases to perform assertions.