📄 puttag.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Thu Mar 09 15:31:24 GMT 2006 -->
<TITLE>
Apache Struts API Documentation: Class PutTag
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/PutTag.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../org/apache/struts/taglib/tiles/PutListTag.html"><B>PREV CLASS</B></A>
<A HREF="../../../../../org/apache/struts/taglib/tiles/UseAttributeTag.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html" TARGET="_top"><B>FRAMES</B></A>
<A HREF="PutTag.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.struts.taglib.tiles</FONT>
<BR>
Class PutTag</H2>
<PRE>
java.lang.Object
|
+--javax.servlet.jsp.tagext.TagSupport
|
+--javax.servlet.jsp.tagext.BodyTagSupport
|
+--<B>org.apache.struts.taglib.tiles.PutTag</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD>javax.servlet.jsp.tagext.BodyTag, <A HREF="../../../../../org/apache/struts/taglib/tiles/ComponentConstants.html">ComponentConstants</A>, java.io.Serializable, javax.servlet.jsp.tagext.Tag</DD>
</DL>
<DL>
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../../org/apache/struts/taglib/tiles/AddTag.html">AddTag</A></DD>
</DL>
<HR>
<DL>
<DT>public class <B>PutTag</B><DT>extends javax.servlet.jsp.tagext.BodyTagSupport<DT>implements <A HREF="../../../../../org/apache/struts/taglib/tiles/ComponentConstants.html">ComponentConstants</A></DL>
<P>
Put an attribute in enclosing attribute container tag. Enclosing attribute container tag can be : <insert> or <definition>. Exception is thrown if no appropriate tag can be found. Put tag can have following atributes : <li> <ul>name : Name of the attribute</ul> <ul>value | content : value to put as attribute</ul> <ul>type : value type. Only valid if value is a String and is set by value="something" or by a bean. Possible type are : string (value is used as direct string), page | template (value is used as a page url to insert), definition (value is used as a definition name to insert)</ul> <ul>direct : Specify if value is to be used as a direct string or as a page url to insert. This is another way to specify the type. It only apply if value is set as a string, and type is not present.</ul> <ul>beanName : Name of a bean used for setting value. Only valid if value is not set. If property is specified, value come from bean's property. Otherwise, bean itself is used for value.</ul> <ul>beanProperty : Name of the property used for retrieving value.</ul> <ul>beanScope : Scope containing bean. </ul> <ul>role : Role to check when 'insert' will be called. If enclosing tag is <insert>, role is checked immediately. If enclosing tag is <definition>, role will be checked when this definition will be inserted.</ul> </li> Value can also come from tag body. Tag body is taken into account only if value is not set by one of the tag attributes. In this case Attribute type is "string", unless tag body define another type.
<P>
<DL>
<DT><B>See Also: </B><DD><A HREF="../../../../../serialized-form.html#org.apache.struts.taglib.tiles.PutTag">Serialized Form</A></DL>
<HR>
<P>
<!-- ======== INNER CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Field Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/struts/taglib/tiles/PutTag.html#attributeName">attributeName</A></B></CODE>
<BR>
Name of attribute to put in component context.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/struts/taglib/tiles/PutTag.html#beanName">beanName</A></B></CODE>
<BR>
Bean name attribute.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/struts/taglib/tiles/PutTag.html#beanProperty">beanProperty</A></B></CODE>
<BR>
Bean property attribute.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/struts/taglib/tiles/PutTag.html#beanScope">beanScope</A></B></CODE>
<BR>
Bean scope attribute.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/struts/taglib/tiles/PutTag.html#body">body</A></B></CODE>
<BR>
The body content of this tag.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/struts/taglib/tiles/PutTag.html#direct">direct</A></B></CODE>
<BR>
JSP Template compatibility.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/struts/taglib/tiles/PutTag.html#realValue">realValue</A></B></CODE>
<BR>
Cached real value computed from tag attributes.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/struts/taglib/tiles/PutTag.html#role">role</A></B></CODE>
<BR>
Role attribute.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/struts/taglib/tiles/PutTag.html#value">value</A></B></CODE>
<BR>
Associated attribute value.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/struts/taglib/tiles/PutTag.html#valueType">valueType</A></B></CODE>
<BR>
Requested type for the value.</TD>
</TR>
</TABLE>
<A NAME="fields_inherited_from_class_javax.servlet.jsp.tagext.BodyTagSupport"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>bodyContent</CODE></TD>
</TR>
</TABLE>
<A NAME="fields_inherited_from_class_javax.servlet.jsp.tagext.TagSupport"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Fields inherited from class javax.servlet.jsp.tagext.TagSupport</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>id, pageContext, parent, values</CODE></TD>
</TR>
</TABLE>
<A NAME="fields_inherited_from_class_org.apache.struts.taglib.tiles.ComponentConstants"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Fields inherited from interface org.apache.struts.taglib.tiles.<A HREF="../../../../../org/apache/struts/taglib/tiles/ComponentConstants.html">ComponentConstants</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../org/apache/struts/taglib/tiles/ComponentConstants.html#COMPONENT_CONTEXT">COMPONENT_CONTEXT</A>, <A HREF="../../../../../org/apache/struts/taglib/tiles/ComponentConstants.html#COMPONENT_SCOPE">COMPONENT_SCOPE</A>, <A HREF="../../../../../org/apache/struts/taglib/tiles/ComponentConstants.html#EXCEPTION_KEY">EXCEPTION_KEY</A>, <A HREF="../../../../../org/apache/struts/taglib/tiles/ComponentConstants.html#LOCALE_KEY">LOCALE_KEY</A></CODE></TD>
</TR>
</TABLE>
<A NAME="fields_inherited_from_class_javax.servlet.jsp.tagext.BodyTag"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Fields inherited from interface javax.servlet.jsp.tagext.BodyTag</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>EVAL_BODY_TAG</CODE></TD>
</TR>
</TABLE>
<A NAME="fields_inherited_from_class_javax.servlet.jsp.tagext.Tag"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Fields inherited from interface javax.servlet.jsp.tagext.Tag</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE</CODE></TD>
</TR>
</TABLE>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../org/apache/struts/taglib/tiles/PutTag.html#PutTag()">PutTag</A></B>()</CODE>
<BR>
Default constructor.</TD>
</TR>
</TABLE>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/struts/taglib/tiles/PutTag.html#callParent()">callParent</A></B>()</CODE>
<BR>
Find parent tag which must implement AttributeContainer.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/struts/taglib/tiles/PutTag.html#computeRealValue()">computeRealValue</A></B>()</CODE>
<BR>
Compute real value according to tag attributes.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/struts/taglib/tiles/PutTag.html#doAfterBody()">doAfterBody</A></B>()</CODE>
<BR>
Save the body content of this tag (if any)</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/struts/taglib/tiles/PutTag.html#doEndTag()">doEndTag</A></B>()</CODE>
<BR>
Do end tag.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/struts/taglib/tiles/PutTag.html#doStartTag()">doStartTag</A></B>()</CODE>
<BR>
Do start tag.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected <A HREF="../../../../../org/apache/struts/taglib/tiles/PutTagParent.html">PutTagParent</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/struts/taglib/tiles/PutTag.html#findEnclosingPutTagParent()">findEnclosingPutTagParent</A></B>()</CODE>
<BR>
Find parent tag which must implement AttributeContainer.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/struts/taglib/tiles/PutTag.html#getBeanName()">getBeanName</A></B>()</CODE>
<BR>
Get bean name.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/struts/taglib/tiles/PutTag.html#getBeanProperty()">getBeanProperty</A></B>()</CODE>
<BR>
Get bean property.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/struts/taglib/tiles/PutTag.html#getBeanScope()">getBeanScope</A></B>()</CODE>
<BR>
Get bean scope.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/struts/taglib/tiles/PutTag.html#getContent()">getContent</A></B>()</CODE>
<BR>
Get content.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/struts/taglib/tiles/PutTag.html#getName()">getName</A></B>()</CODE>
<BR>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -