📄 struts-tiles.tld
字号:
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Id: struts-tiles.tld 481833 2006-12-03 17:32:52Z niallp $
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>tiles</short-name>
<uri>http://struts.apache.org/tags-tiles</uri>
<description>
<![CDATA[
<p>This tag library provides tiles tags.Tiles were previously called
Components. For historical reasons, names, pages, components and templates
are used indifferently to design a tile. Also, a lot of tags and attribute
names are left for backward compatibility.To know more about tags defined
in this library, check the associated documentation: tiles-doc.</p>
]]>
</description>
<tag>
<name>insert</name>
<tag-class>org.apache.struts.tiles.taglib.InsertTag</tag-class>
<body-content>JSP</body-content>
<description>
<![CDATA[
<p><strong>Insert a tiles/component/template.</strong></p>
<p>Insert a tiles/component/template with the possibility to pass
parameters (called attribute).
A tile can be seen as a procedure that can take parameters or attributes.
<code><tiles:insert></code> allows to define these attributes
and pass them to the inserted jsp page, called template.
Attributes are defined using nested tag <code><tiles:put></code> or
<code><tiles:putList></code>.
</p>
<p>You must specify one of this tag attribute :</p>
<ul>
<li><code>template</code>, for inserting a tiles/component/template
page,</li>
<li><code>component</code>, for inserting a tiles/component/template
page, (same as template)</li>
<li><code>page</code> for inserting a JSP page, (same as template)</li>
<li><code>definition</code>, for inserting a definition from
definitions factory</li>
<li><code>attribute</code>, surrounding tiles's attribute name whose
value is used.<br/>If attribute is associated to 'direct' flag
(see put), and flag is true, write attribute value (no insertion).</li>
<li><code>name</code>, to let 'insert' determine the type of entities
to insert. In this later case, search is done in this order :
definitions, tiles/components/templates, pages.</li>
</ul>
<p>In fact, Page, component and template, are equivalent as a tile,
component or template are jsp page.</p>
<p><strong>Example : </strong></p>
<pre>
<code>
<tiles:insert page="/basic/myLayout.jsp" flush="true">
<tiles:put name="title" value="My first page" />
<tiles:put name="header" value="/common/header.jsp" />
<tiles:put name="footer" value="/common/footer.jsp" />
<tiles:put name="menu" value="/basic/menu.jsp" />
<tiles:put name="body" value="/basic/helloBody.jsp" />
</tiles:insert>
</code>
</pre>
]]>
</description>
<attribute>
<name>template</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description>
<![CDATA[
<p>A string representing the URI of a tile or template (a JSP page).
</p>
<p>'page', 'component' and 'template' are synonyms : they have
exactly the same behavior.</p>
]]>
</description>
</attribute>
<attribute>
<name>component</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description>
<![CDATA[
<p>Path (relative or absolute to webapps) of the component to insert.</p>
<p>'page', 'component' and 'template' are synonyms :
they have exactly the same behavior.</p>
]]>
</description>
</attribute>
<attribute>
<name>page</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description>
<![CDATA[
<p>Path (relative or absolute to webapps) of the page to insert.</p>
<p>'page', 'component' and 'template' are synonyms :
they have exactly the same behavior.</p>
]]>
</description>
</attribute>
<attribute>
<name>definition</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description>
<![CDATA[
<p>Name of the definition to insert. Definition are defined in a
centralized file. For now, only definition from factory can be inserted
with this attribute. To insert a definition defined with tag
<code><tiles:definition></code>, use beanName="".</p>
]]>
</description>
</attribute>
<attribute>
<name>attribute</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<description>
<![CDATA[
<p>Name of an attribute in current tile/component context. Value of
this attribute is passed to 'name' (see attribute 'name').</p>
]]>
</description>
</attribute>
<attribute>
<name>name</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description>
<![CDATA[
<p>Name of an entity to insert. Search is done in this order :
definition, attribute, [tile/component/template/page].</p>
]]>
</description>
</attribute>
<attribute>
<name>beanName</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description>
<![CDATA[
<p>Name of the bean used as value. Bean is retrieved from specified
context, if any. Otherwise, method pageContext.findAttribute is used.
If beanProperty is also specified, retrieve value from the
corresponding bean property.</p>
<p>If found bean (or property value)
is instance of one of Attribute class (Direct, Instance, ...),
insertion is done according to the class type. Otherwise, the toString
method is called on the bean, and returned String is used as name to
insert (see 'name' attribute).</p>
]]>
</description>
</attribute>
<attribute>
<name>beanProperty</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description>
<![CDATA[
<p>Bean property name. If specified, value is retrieve from this
property. Support nested/indexed properties.</p>
]]>
</description>
</attribute>
<attribute>
<name>beanScope</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<description>
<![CDATA[
<p> Scope into which bean is searched. If not specified, method
pageContext.findAttribute is used. Scope can be any JSP scope,
'component', or 'template'. In these two later cases, bean is search in
tile/component/template context.</p>
]]>
</description>
</attribute>
<attribute>
<name>flush</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<type>boolean</type>
<description>
<![CDATA[
<p>True or false. If true, current page out stream is flushed
before insertion.</p>
]]>
</description>
</attribute>
<attribute>
<name>ignore</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<type>boolean</type>
<description>
<![CDATA[
<p>If this attribute is set to true, and the attribute specified by the
name does not exist, simply return without writing anything. The
default value is false, which will cause a runtime exception to be
thrown.</p>
]]>
</description>
</attribute>
<attribute>
<name>role</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description>
<![CDATA[
<p>If the user is in the specified role, the tag is taken into account;
otherwise, the tag is ignored (skipped).</p>
]]>
</description>
</attribute>
<attribute>
<name>controllerUrl</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description>
<![CDATA[
<p>Url of a controller called immediately before page is inserted.</p>
<p>Url usually denote a Struts action. Controller (action) is used to
prepare data to be render by inserted Tile.</p>
<p>See also controlerClass. Only one of controllerUrl or
controllerClass should be used.</p>
]]>
</description>
</attribute>
<attribute>
<name>controllerClass</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description>
<![CDATA[
<p>Class type of a controller called immediately before page is inserted.</p>
<p>Controller is used to prepare data to be render by inserted Tile.</p>
<p>See also controlerUrl</p>
<p>Class must implements or extends one of the following :</p>
<ul>
<li>org.apache.struts.tiles.Controller</li>
<li>org.apache.struts.tiles.ControllerSupport</li>
<li>org.apache.struts.action.Action (wrapper org.apache.struts.action.ActionController is used)</li>
</ul>
<p>See also controllerUrl. Only one of controllerUrl or controllerClass should be used.</p>
]]>
</description>
</attribute>
</tag>
<tag>
<name>definition</name>
<tag-class>org.apache.struts.tiles.taglib.DefinitionTag</tag-class>
<body-content>JSP</body-content>
<description>
<![CDATA[
<p><strong>Create a tile /component / template definition bean.
</strong></p>
<p>Create a tile/component/template definition as a bean.
Newly created bean will be saved under specified "id", in the requested "scope".
Definition tag has same syntax as <code>insert</code></p>
]]>
</description>
<attribute>
<name>id</name>
<required>true</required>
<rtexprvalue>false</rtexprvalue>
<description>
<![CDATA[
<p>Specifies the name under which the newly created definition bean
will be saved.</p>
]]>
</description>
</attribute>
<attribute>
<name>scope</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<description>
<![CDATA[
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -