📄 nestedpropertyhelper.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 NestedPropertyHelper
</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/NestedPropertyHelper.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">
PREV CLASS
<A HREF="../../../../../org/apache/struts/taglib/nested/NestedPropertyTag.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="NestedPropertyHelper.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.nested</FONT>
<BR>
Class NestedPropertyHelper</H2>
<PRE>
java.lang.Object
|
+--<B>org.apache.struts.taglib.nested.NestedPropertyHelper</B>
</PRE>
<HR>
<DL>
<DT>public class <B>NestedPropertyHelper</B><DT>extends java.lang.Object</DL>
<P>
<p>A simple helper class that does everything that needs to be done to get the nested tag extension to work. The tags will pass in their relative properties and this class will leverage the accessibility of the request object to calculate the nested references and manage them from a central place.</p> <p>The helper method <A HREF="../../../../../org/apache/struts/taglib/nested/NestedPropertyHelper.html#setNestedProperties(javax.servlet.http.HttpServletRequest, org.apache.struts.taglib.nested.NestedPropertySupport)"><CODE>setNestedProperties(javax.servlet.http.HttpServletRequest, org.apache.struts.taglib.nested.NestedPropertySupport)</CODE></A> takes a reference to the tag itself so all the simpler tags can have their references managed from a central location. From here, the reference to a provided name is also preserved for use.</p> <p>With all tags keeping track of themselves, we only have to seek to the next level, or parent tag, were a tag will append a dot and it's own property.</p>
<P>
<DL>
<DT><B>Since: </B><DD>Struts 1.1</DD>
<DT><B>Version: </B><DD>$Rev: 54929 $ $Date: 2004-10-16 17:38:42 +0100 (Sat, 16 Oct 2004) $</DD>
</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>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/struts/taglib/nested/NestedPropertyHelper.html#NESTED_INCLUDES_KEY">NESTED_INCLUDES_KEY</A></B></CODE>
<BR>
</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/nested/NestedPropertyHelper.html#NestedPropertyHelper()">NestedPropertyHelper</A></B>()</CODE>
<BR>
</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>private static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/struts/taglib/nested/NestedPropertyHelper.html#calculateRelativeProperty(java.lang.String, java.lang.String)">calculateRelativeProperty</A></B>(java.lang.String property, java.lang.String parent)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/struts/taglib/nested/NestedPropertyHelper.html#deleteReference(javax.servlet.http.HttpServletRequest)">deleteReference</A></B>(javax.servlet.http.HttpServletRequest request)</CODE>
<BR>
Deletes the nested reference from the request object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/struts/taglib/nested/NestedPropertyHelper.html#getAdjustedProperty(javax.servlet.http.HttpServletRequest, java.lang.String)">getAdjustedProperty</A></B>(javax.servlet.http.HttpServletRequest request, java.lang.String property)</CODE>
<BR>
Get the adjusted property.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/struts/taglib/nested/NestedPropertyHelper.html#getCurrentName(javax.servlet.http.HttpServletRequest, org.apache.struts.taglib.nested.NestedNameSupport)">getCurrentName</A></B>(javax.servlet.http.HttpServletRequest request, <A HREF="../../../../../org/apache/struts/taglib/nested/NestedNameSupport.html">NestedNameSupport</A> nested)</CODE>
<BR>
Returns the bean name from the request object that the properties are nesting against.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/struts/taglib/nested/NestedPropertyHelper.html#getCurrentProperty(javax.servlet.http.HttpServletRequest)">getCurrentProperty</A></B>(javax.servlet.http.HttpServletRequest request)</CODE>
<BR>
Returns the current nesting property from the request object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static <A HREF="../../../../../org/apache/struts/taglib/nested/NestedReference.html">NestedReference</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/struts/taglib/nested/NestedPropertyHelper.html#referenceInstance(javax.servlet.http.HttpServletRequest)">referenceInstance</A></B>(javax.servlet.http.HttpServletRequest request)</CODE>
<BR>
Pulls the current nesting reference from the request object, and if there isn't one there, then it will create one and set it.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/struts/taglib/nested/NestedPropertyHelper.html#setName(javax.servlet.http.HttpServletRequest, java.lang.String)">setName</A></B>(javax.servlet.http.HttpServletRequest request, java.lang.String name)</CODE>
<BR>
Sets the provided name into the request object for reference by the other nested tags.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/struts/taglib/nested/NestedPropertyHelper.html#setNestedProperties(javax.servlet.http.HttpServletRequest, org.apache.struts.taglib.nested.NestedPropertySupport)">setNestedProperties</A></B>(javax.servlet.http.HttpServletRequest request, <A HREF="../../../../../org/apache/struts/taglib/nested/NestedPropertySupport.html">NestedPropertySupport</A> tag)</CODE>
<BR>
Helper method that will set all the relevant nesting properties for the provided tag reference depending on the implementation.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/struts/taglib/nested/NestedPropertyHelper.html#setProperty(javax.servlet.http.HttpServletRequest, java.lang.String)">setProperty</A></B>(javax.servlet.http.HttpServletRequest request, java.lang.String property)</CODE>
<BR>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -