⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 package-summary.html

📁 struts api,学习使用struts必备的文档
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!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:21 GMT 2006 -->
<TITLE>
Apache Struts API Documentation: Package org.apache.struts.taglib.nested
</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>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-use.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../org/apache/struts/taglib/logic/package-summary.html"><B>PREV PACKAGE</B></A>&nbsp;
&nbsp;<A HREF="../../../../../org/apache/struts/taglib/nested/bean/package-summary.html"><B>NEXT PACKAGE</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="package-summary.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>
<H2>
Package org.apache.struts.taglib.nested
</H2>
Nested tags &amp; supporting classes extend the base struts tags to
allow   them to relate to each other in a nested nature.
<P>
<B>See: </B>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="#package_description"><B>Description</B></A>
<P>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Interface Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="NestedNameSupport.html"><I>NestedNameSupport</I></A></B></TD>
<TD>This is so that managing classes can tell if a nested tag needs to have its <i>name</i> property set.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="NestedParentSupport.html"><I>NestedParentSupport</I></A></B></TD>
<TD>This interface is so managing classes of the nested tag can identify a tag as a parent tag that other tags retrieve nested properties from.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="NestedPropertySupport.html"><I>NestedPropertySupport</I></A></B></TD>
<TD>This interface is for managing classes of the nested extension, so they can know to set the tag's <i>property</i> property.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="NestedTagSupport.html"><I>NestedTagSupport</I></A></B></TD>
<TD>This is to simply allow managing classes to identify the tags to invoke common methods against them.</TD>
</TR>
</TABLE>
&nbsp;

<P>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Class Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="NestedPropertyHelper.html">NestedPropertyHelper</A></B></TD>
<TD>A simple helper class that does everything that needs to be done to get the nested tag extension to work.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="NestedPropertyTag.html">NestedPropertyTag</A></B></TD>
<TD>NestedPropertyTag.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="NestedReference.html">NestedReference</A></B></TD>
<TD>So that a nested hierarchy can penetrate a dynamic JSP include, this class will hold the details of a bean name and nested property.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="NestedRootTag.html">NestedRootTag</A></B></TD>
<TD>NestedRootTag.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="NestedWriteNestingTag.html">NestedWriteNestingTag</A></B></TD>
<TD>NestedWriteNestingTag.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="NestedWriteNestingTei.html">NestedWriteNestingTei</A></B></TD>
<TD>NestedWriteNestingTei This class will allow the nested:writeNesting tag to actually do what the doc says and make a scripting variable as an option (when "id" is supplied).</TD>
</TR>
</TABLE>
&nbsp;

<P>
<A NAME="package_description"><!-- --></A><H2>
Package org.apache.struts.taglib.nested Description
</H2>

<P>
Nested tags &amp; supporting classes extend the base struts tags to
allow   them to relate to each other in a nested nature. The fundamental
logic of   the original tags don't change, except in that all references
to beans and   bean properties will be managed in a nested context. <br>
<br>
<a name="doc.Description"></a>
<div align="Center"> [&nbsp;<a href="#doc.Intro">Introduction</a>
    &nbsp;] [&nbsp;<a href="#doc.FoundationConcepts">Foundation&nbsp;Concepts&nbsp;-&nbsp;model</a>
    &nbsp;] [&nbsp;<a href="#doc.TaggingConcepts">Foundation&nbsp;Concepts&nbsp;-&nbsp;tags</a>
    &nbsp;] [&nbsp;<a href="#doc.TagList">Nested&nbsp;Tag&nbsp;List</a>
    &nbsp;] [&nbsp;<a href="#doc.PropertyProperty">The&nbsp;"property"&nbsp;Property</a>
    &nbsp;] [&nbsp;<a href="#doc.ImplementationDetails">Implementation&nbsp;Details</a>
    &nbsp;] </div>
<hr><a name="doc.Intro"></a>
<h3>Introduction</h3>
<p>The nesting extension provides the ability to define a nested object model
  and   efficiently represent and manage that model through JSP's custom
tags.</p>
<p>It's written in a layer that extends the current Struts tags, building
  on   their logic and functionality. The layer enables the tags to be aware
  of the   tags which surround them so they can correctly provide the nesting
  property   reference to the Struts system. Struts already supported properties
  which use   "dot notation" in accessing nested objects and properties.</p>
<pre>e.g. myProperty.childProperty.finalProperty</pre>
<p>Because of this the controller servlet excellently manages this nested 
    model. These tags are about bringing such ease of management to the JSP
  view   of the architecture.</p>
<hr><a name="doc.FoundationConcepts"></a>
<h3>Foundation Concepts - model.</h3>
<p>   A bean holds a reference to another bean internally, and all access
  to that    bean is handled through the current bean. This act of having
one  bean's access    go through another bean is known as "nesting beans".
The  first bean is known    as the parent bean. The bean which it references,
 is known as a child bean.    The terms "parent" and "child" are commonly
used to describe the model's    hierarchy.   </p>
<p><b>A simple example...</b><br />
       Take an object which represents a monkey. The monkey's job is to pick
  bunches    of bananas. On each bunch picked hangs many bananas. If this
case  was    translated to bean objects, the monkey object would have a reference
  to the    bunch objects he picked, and each bunch object would hold a reference
  to the    bananas hanging in the bunch.   </p>
<p><b>To describe this...</b><br />
       The monkey object is the parent to the bunch object, and the bunch 
object  is a    child of the monkey object. The bunch object is parent to 
its child  banana    objects, and the child banana objects children of the 
bunch object.  The monkey    is higher in the hierarchy than the bananas, 
and the bananas  lower in the    hierarchy to the bunches.   </p>
<p>   One special term to remember is for the most parent class, which is
  known as    the "root" object which starts the hierarchy.   </p>
<hr><a name="doc.TaggingConcepts"></a>
<h3>Foundation Concepts - tags.</h3>
<p>   What the tags provide is an efficient way or representing the above
  models   within JSP tag markup. As a result the tags take on similar relationships
  to   each other. A tag can be the parent of another, and similarly be a
child  of a   parent tag. However the most important part to remember, is
that the    properties of parent tags define the nested property for the
child tags'    properties.   </p>
<p>   One issue which may confuse the new developer, is that even though
a tag   is a parent tag in a markup sense (the opening tag and closing tag
are either   side of another tag) does not immediately mean that the child
tag will be   relative to that tag. Why? Some tags make bad parents. In other
  words, they're   not logical steps in defining a hierarchy.   </p>
<p>   For example the relationship between the select tag and the options
  tag. The   html:options tag "must" be surrounded by a parent html:select
 tag.   </p>
<pre>eg:<br>  &lt;html:select name="myBean" property="mySelectProperty" &gt;<br>    &lt;html:options name="myBean" property="myOptionsProperty" &gt;<br>  &lt;/html:select&gt;</pre>
<p>   In the nested context, this would cause undesired results if the select
  tag   was a parent. The bean reference would become...   </p>
<pre>  mySelectProperty.myOptionsProperty</pre>
       ...which when translated, Struts would go to the value of the select 
 property    and then try to get your options list from that returned value. 
 The extended    logic tags are the same. You don't want to extend your properties 
 within the   objects the logic tags are evaluating.       
<p>   To get manage this, the tags in the nested extension are categorised
  into   parent tags and non-parent tags. Those which implement   <code>org.apache.struts.taglib.nested.NestedParentSupport</code>
     are classed   as parents, and the nested system knows they define levels
  in the nested   hierarchy. Every other tag, does not, and will be skipped
  if found to be a   "markup parent" (like our select tag) and not a "nested
  parent".   </p>
<p>   There are also the special case of starting off the hierarchy with
a "root"   tag. These tags are what the extension requires to provide them
with the bean   by which the structure will be based on.   </p>
<hr><a name="doc.TagList"></a>
<h3>Nested Tag List.</h3>
<p>   Here's a list of tags in the nested extension, grouped by parent/context 
    functionality. "root", "nested parent", "markup parent" &amp; "basic". 
   </p>
<p><b>Root Tags</b>
<table border="1">
  <tbody>
    <tr>
      <th>markup name</th>
      <th>brief description</th>
    </tr>
    <tr>
      <td>html:form</td>
      <td>For backwards compatibility, you can use the typical form tag 
to             implement your nested hierarchy.</td>
    </tr>
    <tr>
      <td>nested:form</td>
      <td>An extension of the above <code>html:form</code>, this is just
  to             provide definition in the nested tag library.</td>
    </tr>
    <tr>
      <td>nested:root</td>
      <td>When you don't want to configure a form, you can use any bean 
which             is in "scope" by specifying its name within this tag.</td>
    </tr>
  </tbody>
</table>
</p>
<br />
<p><b>Nested Parent Tags</b> (Affect the hierarchy)       
<table border="1">
  <tbody>
    <tr>
      <th>markup name</th>
      <th>brief description</th>
    </tr>
    <tr>
      <td>nested:nest</td>
      <td>This tag executes no logic, simply representing a nesting level 
              for the rest of the markup to relate to.</td>
    </tr>
    <tr>
      <td>nested:iterate</td>
      <td>Extension of <code>logic:iterate</code> you can use it to iterate 
              through a list, and have all child references nest within the
  beans             returned from this iterated collection.</td>
    </tr>
  </tbody>
</table>
</p>
<br />
<p><b>Markup Parent Tags</b> (marked-up like parent tags, but don't affect
  the hierarchy)       
<table border="1">
  <tbody>
    <tr>
      <th>markup name</th>
      <th>brief description</th>
    </tr>
    <tr>
      <td>nested:select</td>
      <td><code>html:select</code> extension. Provides the logic to render 
              a select box in Html.</td>
    </tr>
    <tr>
      <td>nested:empty</td>
      <td><code>logic:empty</code> extension.</td>
    </tr>
    <tr>
      <td>nested:notEmpty</td>
      <td><code>logic:notEmpty</code> extension.</td>
    </tr>
    <tr>
      <td>nested:equal</td>
      <td><code>logic:equal</code> extension.</td>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -