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

📄 struts-nested.tld

📁 structs源码
💻 TLD
📖 第 1 页 / 共 5 页
字号:
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Id: struts-nested.tld 482910 2006-12-06 05:43:57Z pbenedict $

    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
    this work for additional information regarding copyright ownership.
    The ASF licenses this file to You under the Apache License, Version 2.0
    (the "License"); you may not use this file except in compliance with
    the License.  You may obtain a copy of the License at
   
         http://www.apache.org/licenses/LICENSE-2.0
   
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->
<!DOCTYPE taglib
        PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
        "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
<taglib>
    <tlib-version>1.3</tlib-version>
    <jsp-version>1.2</jsp-version>
    <short-name>nested</short-name>
    <uri>http://struts.apache.org/tags-nested</uri>
    <description>
        <![CDATA[
    <p>[Since Struts 1.1]</p>
    <p>This tag library brings a nested context to the functionality of the
    Struts custom tag library.</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.
    </p>

    <p><strong>It's all about nesting beans...</strong><br />
    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><strong>A simple example... </strong><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><strong>To describe this... </strong><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>

    <p>Nested tags are all about efficiently managing this style of hierarchy
    structure within your JSP markup.</p>

    <p>
    <strong>Important Note:</strong> Nearly all these tags extend tags from
    other libraries to bring their functionality into the nested context.
    Nesting relies on the tags working against the one bean model, and managing
    the properties so that they become relative to the properties they are
    nested within. In doing so, the tags will set the "name" attribute internally
    (where applicable), and in many cases will rely on the "property" attribute
    being set so it can be updated internally to become nested. The original tags
    on occasion provide options that don't use the "name" and "property"
    attributes. These uses will then fall outside the nested context, and will
    most likely cause error. To take advantage of these options, markup using
    the original tag for these cases. For an example see the
    <a href="options.html"><code>&lt;nested:options&gt;</code></a> tag.
    </p>
  ]]>
    </description>
    <tag>
        <name>nest</name>
        <tag-class>
            org.apache.struts.taglib.nested.NestedPropertyTag</tag-class>
        <body-content>JSP</body-content>
        <description>
            <![CDATA[
            <p><strong>
      Defines a new level of nesting for child tags to reference to
    </strong></p>
          
      <p>
      This tag provides a simple method of defining a logical nesting level in
      the nested hierarchy. It run no explicit logic, is simply a place holder.
      It also means you can remove the need for explicit setting of level
      properties in child tags.
      </p>
      <p>
      Just as the iterate tag provide a parent to other tags, this does the same
      but there is no logic for iterating or otherwise.
      </p>
      <p>
      Example...</p>
      <pre>
&lt;nested:write property="myNestedLevel.propertyOne" /&gt;
&lt;nested:write property="myNestedLevel.propertyTwo" /&gt;
&lt;nested:write property="myNestedLevel.propertyThree" /&gt;
      </pre>
      <p>Can instead become...</p>
      <pre>
&lt;nested:nest property="myNestedLevel" &gt;
  &lt;nested:write property="propertyOne" /&gt;
  &lt;nested:write property="propertyTwo" /&gt;
  &lt;nested:write property="propertyThree" /&gt;
&lt;/nested:nest &gt;
      </pre>
    ]]>
        </description>
        <attribute>
            <name>property</name>
            <required>false</required>
            <rtexprvalue>true</rtexprvalue>
            <description>
                <![CDATA[
        This specifies the property by which this tag and all child tags
        will be relative to.
      ]]>
            </description>
        </attribute>
    </tag>
    <tag>
        <name>writeNesting</name>
        <tag-class>
            org.apache.struts.taglib.nested.NestedWriteNestingTag</tag-class>
        <tei-class>
            org.apache.struts.taglib.nested.NestedWriteNestingTei</tei-class>
        <body-content>JSP</body-content>
        <description>
            <![CDATA[
            <p><strong>
      Writes or makes a scripting variable of the current nesting level.
    </strong></p>
          
      This tag provides a way of accessing the nested property reference used by
      the nested tags. Can expose a scripting variable, or simply write out the
      value.
    ]]>
        </description>
        <attribute>
            <name>property</name>
            <required>false</required>
            <rtexprvalue>true</rtexprvalue>
            <description>
                <![CDATA[
        If not supplied, will simply write out as if "./" or "this/" was supplied.
      ]]>
            </description>
        </attribute>
        <attribute>
            <name>id</name>
            <required>false</required>
            <rtexprvalue>true</rtexprvalue>
            <description>
                <![CDATA[
        If <i>id</i> is supplied, then what would have been written out into the
        response stream, will instead be made available as a String object
        defined by the variable name provided.
      ]]>
            </description>
        </attribute>
        <attribute>
            <name>filter</name>
            <required>false</required>
            <rtexprvalue>true</rtexprvalue>
            <type>boolean</type>
            <description>
                <![CDATA[
        true/false value, describing to the tag if the result if to be URLEncoded.
        Helps JavaScript along if the result is required for URL hacking.
      ]]>
            </description>
        </attribute>
    </tag>
    <tag>
        <name>root</name>
        <tag-class>org.apache.struts.taglib.nested.NestedRootTag</tag-class>
        <body-content>JSP</body-content>
        <description>
            <![CDATA[
            <p><strong>To start off a nested hierarchy without the need for a form</strong></p>
          
      <p>
        This tag is provided to allow the nested tags to find a common bean
        reference without the need for a form and its relative overhead. As
        long as the <code>name</code> attribute of this tag matches the name
        of a bean in scope of the JSP (ie: Struts tags can find it via usual
        means). For example you can load a bean for use with the
        <code>jsp:useBean</code> tag.
      </p>
      <p>
        The tag can also be used without specifying the <code>name</code>
        attribute, but this is only in the case that the current JSP is a
        dynamic include specified in another file. You will not be able to run
        the tag without a name unless this inclusion is in place. Otherwise
        the nested tags will not have the bean and property references that they
        need to provide their logic.
      </p>
      <p>
        <strong>Note</strong>: The access to a bean via the <code>name</code>
        attribute takes priority over looking for the reference from other
        parent tags. So if a name is specified, a bean will have to be there
        waiting for it. It was made this way so that you could use separate
        beans within a JSP that itself is an inclusion into another.
      </p>
    ]]>
        </description>
        <attribute>
            <name>name</name>
            <required>false</required>
            <rtexprvalue>true</rtexprvalue>
            <description>
                <![CDATA[
        The name of the bean by which all child nested tags will derive their
        bean reference from.
      ]]>
            </description>
        </attribute>
    </tag>
    <tag>
        <name>define</name>
        <tag-class>
            org.apache.struts.taglib.nested.bean.NestedDefineTag</tag-class>
        <tei-class>
            org.apache.struts.taglib.nested.bean.NestedDefineTei</tei-class>
        <body-content>empty</body-content>
        <description>
            <![CDATA[
            <p><strong>Nested Extension -
      Define a scripting variable based on the value(s) of the specified
      bean property.
    </strong></p>
          
      <p>This tag is an extension of the
      <a href="../bean/define.html"><code>&lt;bean:define&gt;</code></a>
      tag. Please consult its documentation for information on tag attributes
      and usage details.
      </p>
    ]]>
        </description>
        <attribute>
            <name>id</name>
            <required>true</required>
            <rtexprvalue>true</rtexprvalue>
            <description/>
        </attribute>
        <attribute>
            <name>name</name>
            <required>false</required>
            <rtexprvalue>true</rtexprvalue>
            <description/>
        </attribute>
        <attribute>
            <name>property</name>
            <required>false</required>
            <rtexprvalue>true</rtexprvalue>
            <description/>
        </attribute>
        <attribute>
            <name>scope</name>
            <required>false</required>
            <rtexprvalue>true</rtexprvalue>
            <description/>
        </attribute>
        <attribute>
            <name>toScope</name>
            <required>false</required>
            <rtexprvalue>true</rtexprvalue>
            <description/>
        </attribute>
        <attribute>
            <name>type</name>
            <required>false</required>
            <rtexprvalue>true</rtexprvalue>
            <description/>
        </attribute>
        <attribute>
            <name>value</name>
            <required>false</required>
            <rtexprvalue>true</rtexprvalue>
            <description/>
        </attribute>
    </tag>
    <tag>
        <name>message</name>
        <tag-class>
            org.apache.struts.taglib.nested.bean.NestedMessageTag</tag-class>
        <body-content>empty</body-content>
        <description>
            <![CDATA[
            <p><strong>Nested Extension -
    Render an internationalized message string to the response.
    </strong></p>
          
      <p>This tag is an extension of the
      <a href="../bean/message.html"><code>&lt;bean:message&gt;</code></a>
      tag. Please consult its documentation for information on tag attributes
      and usage details.
      </p>
    ]]>
        </description>
        <attribute>
            <name>arg0</name>
            <required>false</required>
            <rtexprvalue>true</rtexprvalue>
            <description/>
        </attribute>
        <attribute>
            <name>arg1</name>
            <required>false</required>
            <rtexprvalue>true</rtexprvalue>
            <description/>
        </attribute>
        <attribute>
            <name>arg2</name>
            <required>false</required>
            <rtexprvalue>true</rtexprvalue>
            <description/>
        </attribute>
        <attribute>
            <name>arg3</name>
            <required>false</required>
            <rtexprvalue>true</rtexprvalue>
            <description/>
        </attribute>
        <attribute>
            <name>arg4</name>
            <required>false</required>
            <rtexprvalue>true</rtexprvalue>
            <description/>
        </attribute>
        <attribute>
            <name>bundle</name>
            <required>false</required>
            <rtexprvalue>true</rtexprvalue>
            <description/>
        </attribute>
        <attribute>
            <name>key</name>
            <required>false</required>
            <rtexprvalue>true</rtexprvalue>
            <description/>
        </attribute>
        <attribute>
            <name>locale</name>
            <required>false</required>
            <rtexprvalue>true</rtexprvalue>
            <description/>
        </attribute>
        <attribute>
            <name>name</name>
            <required>false</required>
            <rtexprvalue>true</rtexprvalue>
            <description/>
        </attribute>
        <attribute>
            <name>property</name>
            <required>false</required>
            <rtexprvalue>true</rtexprvalue>
            <description/>
        </attribute>
        <attribute>
            <name>scope</name>
            <required>false</required>
            <rtexprvalue>true</rtexprvalue>
            <description/>
        </attribute>
    </tag>
    <tag>
        <name>size</name>
        <tag-class>
            org.apache.struts.taglib.nested.bean.NestedSizeTag</tag-class>
        <tei-class>org.apache.struts.taglib.bean.SizeTei</tei-class>
        <body-content>empty</body-content>
        <description>
            <![CDATA[
            <p><strong>Nested Extension -

⌨️ 快捷键说明

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