org.apache.struts.taglib.template
Class PutTag

org.apache.struts.taglib.template.PutTag

public class PutTag

Tag handler for <template:put>, which puts content into request scope.

Version:
$Revision: 1.9 $ $Date: 2001/04/29 05:34:49 $
Author:
David Geary

Field Summary
private  java.lang.String content
          The content's URI (or text).
private  java.lang.String direct
          Determines whether content is included (false) or printed (true).
private  java.lang.String name
          The content's name.
private  java.lang.String role
          The role that the user must be in to store content.
 
Constructor Summary
PutTag()
           
 
Method Summary
 int doEndTag()
          Process the end tag by putting content into the enclosing insert tag.
private  java.lang.String getActualContent()
          Returns the content associated with this tag.
private  javax.servlet.jsp.tagext.TagSupport getAncestor(java.lang.String className)
          Convenience method for locating ancestor tags by class name.
 java.lang.String getContent()
          Get the content attribute.
 java.lang.String getDirect()
          Returns the direct attribute associated with this tag.
 java.lang.String getName()
          Get the name attribute.
 java.lang.String getRole()
          Get the role attribute.
private  boolean hasBody()
          Returns a boolean indicating whether this tag has a body.
 void release()
          Reset member values for reuse.
 void setContent(java.lang.String content)
          Set the content's URI (if it's to be included) or text (if it's to be printed).
 void setDirect(java.lang.String direct)
          Set direct to true, and content will be printed directly, instead of included (direct == false).
 void setName(java.lang.String name)
          Set the content name.
 void setRole(java.lang.String role)
           
 

Field Detail

name

private java.lang.String name
The content's name.

role

private java.lang.String role
The role that the user must be in to store content.

content

private java.lang.String content
The content's URI (or text).

direct

private java.lang.String direct
Determines whether content is included (false) or printed (true). Content is included (false) by default.
Constructor Detail

PutTag

public PutTag()
Method Detail

setName

public void setName(java.lang.String name)
Set the content name.

setRole

public void setRole(java.lang.String role)
Parameters:
name - The role the user must be in to store content.

setContent

public void setContent(java.lang.String content)
Set the content's URI (if it's to be included) or text (if it's to be printed).

setDirect

public void setDirect(java.lang.String direct)
Set direct to true, and content will be printed directly, instead of included (direct == false).

getName

public java.lang.String getName()
Get the name attribute.

getRole

public java.lang.String getRole()
Get the role attribute.

getContent

public java.lang.String getContent()
Get the content attribute.

getDirect

public java.lang.String getDirect()
Returns the direct attribute associated with this tag.

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Process the end tag by putting content into the enclosing insert tag.
Throws:
JspException - if this tag is not enclosed by <template:insert>.

release

public void release()
Reset member values for reuse. This method calls super.release(), which invokes TagSupport.release(), which typically does nothing.

getActualContent

private java.lang.String getActualContent()
                                   throws javax.servlet.jsp.JspException
Returns the content associated with this tag.

hasBody

private boolean hasBody()
Returns a boolean indicating whether this tag has a body.

getAncestor

private javax.servlet.jsp.tagext.TagSupport getAncestor(java.lang.String className)
                                                 throws javax.servlet.jsp.JspException
Convenience method for locating ancestor tags by class name.
Parameters:
className - The name of the ancestor class.


Copyright © 2000-2002 - Apache Software Foundation