WebObjects 5.4.2

com.webobjects.jspservlet
Class WOComponentTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by javax.servlet.jsp.tagext.BodyTagSupport
          extended by com.webobjects.jspservlet.WOComponentTag
All Implemented Interfaces:
Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.Tag

public class WOComponentTag
extends javax.servlet.jsp.tagext.BodyTagSupport

This is a regular JSP taglib handler that enables the use of a WOComponent within a JSP. Please see WOtaglib_1_0.tld for the most authoritative definition of the tag library, including the description of this class. This tag handler has the following tag attributes:


This tag's body content is labelled "jsp". What this means is that its body should be parsed for additional tags. For this version, the body contains one or more WOBindingTag, and WOExtraHeaderTag.

See Also:
WOComponent, WOBindingTag, WOExtraHeaderTag, Serialized Form

Field Summary
 
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
WOComponentTag()
           
 
Method Summary
 int doEndTag()
          Standard method to end the tag.
 int doStartTag()
          Standard method to start using the tag.
 void setBinding(String key, Object value)
          Sets a key-value pair to be passed to the WOComponent for binding.
 void setBodyContentOnly(boolean bodyContentOnly)
          Sets the attribute bodyContentOnly for this tag.
 void setClassname(String className)
          Sets the attribute className for this tag.
 void setClassName(String className)
          Sets the attribute className for this tag.
 void setExtraHeader(String key, String value)
          Sets a key-value pair to be set as an extra HTTP header to either the WOComponent or the Direct Action.
 void setMergeResponseHeaders(boolean mergeResponseHeaders)
          Sets the attribute mergeResponseHeaders for this tag.
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, doInitBody, getBodyContent, getPreviousOut, release, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setPageContext, setParent
 

Constructor Detail

WOComponentTag

public WOComponentTag()
Method Detail

setBinding

public void setBinding(String key,
                       Object value)
Sets a key-value pair to be passed to the WOComponent for binding.

Parameters:
key - the key of the binding
value - the value of the binding
See Also:
WOComponent

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Standard method to start using the tag.

Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Returns:
EVAL_BODY_AGAIN, to ensure that the tag body is evaluated, as it might contain one or more bindings or extraHeaders
Throws:
javax.servlet.jsp.JspException
See Also:
WOBindingTag, WOExtraHeaderTag

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Standard method to end the tag. Invokes WOServletAdaptor.embeddedComponentResponse

Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Returns:
EVAL_PAGE, to ensure that the rest of the JSP gets evaluated
Throws:
javax.servlet.jsp.JspException

setClassName

public void setClassName(String className)
Sets the attribute className for this tag. See the class description for more details. This is called by the servlet container framework to pass in the value given the JSP.

Parameters:
className - the class name of the WOComponent or Direct Action

setClassname

public void setClassname(String className)
Sets the attribute className for this tag. See the class description for more details. This is called by the servlet container framework to pass in the value given the JSP.

Parameters:
className - the class name of the WOComponent or Direct Action

setExtraHeader

public void setExtraHeader(String key,
                           String value)
Sets a key-value pair to be set as an extra HTTP header to either the WOComponent or the Direct Action. Passing a null object will cause the appropriate existing header to be removed from the request.

Parameters:
key - the header key
value - the value of the header

setBodyContentOnly

public void setBodyContentOnly(boolean bodyContentOnly)
Sets the attribute bodyContentOnly for this tag. This is called by the servlet container framework to pass in the value given the JSP.

Parameters:
bodyContentOnly - indicates if only the WOResponse body content is required; the HTML headers will be stripped off if this is true; default is true

setMergeResponseHeaders

public void setMergeResponseHeaders(boolean mergeResponseHeaders)
Sets the attribute mergeResponseHeaders for this tag. See the class description for more details. This is called by the servlet container framework to pass in the value given the JSP.

Parameters:
mergeResponseHeaders - indicates if only the WOResponse headers should be merged with the ServletResponse's headers; default is false

Last updated June 2008

Copyright © 2000-2008 Apple Inc.