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

📄 struts-html.html

📁 struts api,学习使用struts必备的文档
💻 HTML
📖 第 1 页 / 共 5 页
字号:
                        the value "on" will be returned.
            
            [RT Expr]
          </td>
</tr>
</table>
</div>
<p>
<a href="#top">Back to top</a>
</p>
<h3 id="errors">
<strong>errors</strong> - 
                Conditionally display a set of accumulated error messages.
                </h3>
<div class="indent">
                <p>Displays a set of error messages prepared by a business
                logic component and stored as an <code>ActionErrors</code>
                object, a String, or a String array in request scope.  If
                such a bean is not found, nothing will be rendered.</p>

                <p>In order to use this tag successfully, you must have
                defined an application scope <code>MessageResources</code>
                bean under the default attribute name, with optional
                definitions of message keys specified in the following
                attributes:</p>
                <ul>
                <li>
<strong>header</strong> - Text that will be rendered
                before the error messages list.  Typically, this message text
                will end with <code>&lt;ul&gt;</code> to start the
                error messages list (default "errors.header").</li>
                <li>
<strong>footer</strong> - Text that will be rendered
                after the error messages list.  Typically, this message text
                will begin with <code>&lt;/ul&gt;</code> to end the error
                messages list (default "errors.footer").</li>
                <li>
<strong>prefix</strong> - Text that will be rendered
                before each individual error in the list (default "errors.prefix").</li>
                <li>
<strong>suffix</strong> - Text that will be rendered
                after each individual error in the list (default "errors.suffix").</li>
                </ul>
                <table class="tag-attributes">
<thead>
<tr>
<th class="attribute">Attribute Name</th>
<th>Description</th>
</tr>
</thead>
<tr class="evenRow">
<td align="center">bundle</td>
<td>
                    The servlet context attribute key for the MessageResources
                    instance to use.  If not specified, defaults to the
                    application resources configured for our action servlet.
                    
            [RT Expr]
          </td>
</tr>
<tr class="oddRow">
<td align="center">footer</td>
<td>
                  This value is an optional message resource key that will
                  be printed after the iteration of error messages has finished.
                  Defaults to "errors.footer" if not specified.
                  <p class="since">Since:  Struts 1.2.5</p>
            [RT Expr]
          </td>
</tr>
<tr class="evenRow">
<td align="center">header</td>
<td>
                  This value is an optional message resource key that will
                  be printed before the iteration of error messages begins.
                  Defaults to "errors.header" if not specified.
                  <p class="since">Since:  Struts 1.2.5</p>
            [RT Expr]
          </td>
</tr>
<tr class="oddRow">
<td align="center">locale</td>
<td>
                    The session attribute key for the Locale used to select
                    messages to be displayed.  If not specified, defaults to
                    the Struts standard value.
                    
            [RT Expr]
          </td>
</tr>
<tr class="evenRow">
<td align="center">name</td>
<td>
                  Name of the request scope bean under which our error messages
                  have been stored.  If not present, the name specified by the
                  <code>Globals.ERROR_KEY</code> constant string will be used.
                  
            [RT Expr]
          </td>
</tr>
<tr class="oddRow">
<td align="center">prefix</td>
<td>
                  This value is an optional message resource key that will
                  be printed before an error message.
                  Defaults to "errors.prefix" if not specified.
                  <p class="since">Since:  Struts 1.2.5</p>
            [RT Expr]
          </td>
</tr>
<tr class="evenRow">
<td align="center">property</td>
<td>
                  Name of the property for which error messages should be
                  displayed.  If not specified, all error messages (regardless
                  of property) are displayed.
                  
            [RT Expr]
          </td>
</tr>
<tr class="oddRow">
<td align="center">suffix</td>
<td>
                  This value is an optional message resource key that will
                  be printed after an error message.
                  Defaults to "errors.suffix" if not specified.
                  <p class="since">Since:  Struts 1.2.5</p>
            [RT Expr]
          </td>
</tr>
</table>
</div>
<p>
<a href="#top">Back to top</a>
</p>
<h3 id="file">
<strong>file</strong> - 
            Render A File Select Input Field
        </h3>
<div class="indent">
            <p>
                Renders an HTML &lt;input&gt; element of type file, defaulting to
                the specified value or the specified property of the bean
                associated with our current form. This tag is only valid when
                nested inside a form tag body.
            </p>
            <p>
                As with the corresponding HTML &lt;input&gt; element, the
                enclosing form element must specify "POST" for the <code>method</code>
                attribute, and "multipart/form-data" for the <code>enctype</code>
                attribute. For example:
            </p>
    <pre>
    &lt;html:form method="POST" enctype="multipart/form-data"&gt;
        &lt;html:file property="theFile" /&gt;
    &lt;/html:form&gt;</pre>

            <p>
            WARNING: In order to correctly recognize uploaded files, the ActionForm bean
            associated with this form must include a statement setting the corresponding
            org.apache.struts.upload.FormFile property to null in the reset() method.
            </p>
        <table class="tag-attributes">
<thead>
<tr>
<th class="attribute">Attribute Name</th>
<th>Description</th>
</tr>
</thead>
<tr class="evenRow">
<td align="center">accesskey</td>
<td>
                The keyboard character used to move focus immediately to this
                element.
            
            [RT Expr]
          </td>
</tr>
<tr class="oddRow">
<td align="center">accept</td>
<td>
                Comma-delimited set of content types that the server you submit to
                knows how to process. This list can be used by the client browser
                to limit the set of file options that is made available for selection.
                If not specified, no content type list will be sent.
            
            [RT Expr]
          </td>
</tr>
<tr class="evenRow">
<td align="center">alt</td>
<td>
                <p>The alternate text for this element.</p>
                
            [RT Expr]
          </td>
</tr>
<tr class="oddRow">
<td align="center">altKey</td>
<td>
                <p>The message resources key of the alternate text for this
                element.</p>
                
            [RT Expr]
          </td>
</tr>
<tr class="evenRow">
<td align="center">bundle</td>
<td>
                    The servlet context attributes key for the MessageResources
                    instance to use.  If not specified, defaults to the
                    application resources configured for our action servlet.
                <p class="since">Since:  Struts 1.2.5</p>
            [RT Expr]
          </td>
</tr>
<tr class="oddRow">
<td align="center">disabled</td>
<td>
          Set to <code>true</code> if this input field should be
          disabled.
          
            [RT Expr]
          </td>
</tr>
<tr class="evenRow">
<td align="center">errorKey</td>
<td>
                  <p>Name of the request scope bean under which our error messages
                  have been stored.  If not present, the name specified by the
                  <code>Globals.ERROR_KEY</code> constant string will be used.</p>

                  <p>
<strong>N.B.</strong> This is used in conjunction with the 
                  <code>errorStyle</code>, <code>errorStyleClass</code> and 
                  <code>errorStyleId</code> attributes and should be set to
                  the same value as the <code>name</code> attribute on the
                  &lt;html:errors/&gt; tag.</p> 
            <p class="since">Since:  Struts 1.2.5</p>
            [RT Expr]
          </td>
</tr>
<tr class="oddRow">
<td align="center">errorStyle</td>
<td>
                <p>CSS styles to be applied to this HTML element if
                an error exists for it.</p>

                <p>
<strong>N.B.</strong> If present, this overrides the 
                <code>style</code> attribute in the event of an error.</p>
            <p class="since">Since:  Struts 1.2.5</p>
            [RT Expr]
          </td>
</tr>
<tr class="evenRow">
<td align="center">errorStyleClass</td>
<td>
                <p>CSS stylesheet class to be applied to this HTML element if
                an error exists for it (renders a "class" attribute).</p>

                <p>
<strong>N.B.</strong> If present, this overrides the 
                <code>styleClass</code> attribute in the event of an error.</p>
            <p class="since">Since:  Struts 1.2.5</p>
            [RT Expr]
          </td>
</tr>
<tr class="oddRow">
<td align="center">errorStyleId</td>
<td>
                <p>Identifier to be assigned to this HTML element if
                an error exists for it (renders an "id" attribute).</p>

                <p>
<strong>N.B.</strong> If present, this overrides the 
                <code>styleId</code> attribute in the event of an error.</p>
            <p class="since">Since:  Struts 1.2.5</p>
            [RT Expr]
          </td>
</tr>
<tr class="evenRow">
<td align="center">indexed</td>
<td>
                Valid only inside of <code>logic:iterate</code> tag.
                If <code>true</code> then name of the html tag will be rendered as
                "id[34].propertyName". Number in brackets will be generated
                for every iteration and taken from ancestor logic:iterate tag.
            
            [RT Expr]
          </td>
</tr>
<tr class="oddRow">
<td align="center">maxlength</td>
<td>
                Maximum number of input characters to accept.  This is ignored
                by most browsers. [No limit]
            
            [RT Expr]
          </td>
</tr>
<tr class="evenRow">
<td align="center">name</td>
<td>
                The attribute name of the bean whose properties are consulted when
                rendering the current value of this input field. If not specified,
                the bean associated with the form tag we are nested within is utilized.
            
            [RT Expr]
          </td>
</tr>
<tr class="oddRow">
<td align="center">onblur</td>
<td>
                JavaScript event handler executed when this element loses input
                focus.
            
            [RT Expr]
          </td>
</tr>
<tr class="evenRow">
<td align="center">onchange</td>
<td>
                JavaScript event handler executed when this element loses input
                focus and its value has changed.
            
            [RT Expr]
          </td>
</tr>
<tr class="oddRow">
<td align="center">onclick</td>
<td>
                JavaScript event handler executed when this element receives a
                mouse click.
            
            [RT Expr]
          </td>
</tr>
<tr class="evenRow">
<td align="center">ondblclick</td>
<td>
                JavaScript event handler executed when this element receives a
                mouse double click.
            
            [RT Expr]
          </td>
</tr>
<tr class="oddRow">
<td align="center">onfocus</td>
<td>
                JavaScript event handler executed when this element receives input
                focus.
            
            [RT Expr]
          </td>
</tr>
<tr class="evenRow">
<td align="center">onkeydown</td>
<td>
                JavaScript event handler executed when this element has focus and a
                key is depressed.
            
            [RT Expr]
          </td>
</tr>
<tr class="oddRow">
<td align="center">onkeypress</td>
<td>
                JavaScript event handler executed when this element has focus and a
                key is depressed and released.
            
            [RT Expr]
          </td>
</tr>
<tr class="evenRow">
<td align="center">onkeyup</td>
<td>
                JavaScript event handler executed when this element has focus and a
                key is released.
            
            [RT Expr]
          </td>
</tr>
<tr class="oddRow">
<td align="center">onmousedown</td>
<td>
                JavaScript event handler executed when this element is under the mouse
                pointer and a mouse button is depressed.
            
            [RT Expr]
          </td>
</tr>
<tr class="evenRow">
<td align="center">onmousemove</td>
<td>
                JavaScript event handler executed when this element is under the
                mouse pointer and the pointer is moved.
            
            [RT Expr]
          </td>
</tr>
<tr class="oddRow">
<td align="center">onmouseout</td>
<td>
                JavaScript event handler executed when this element was under the
                mouse pointer but the pointer was moved outside the element.
            
            [RT Expr]
          </td>
</tr>
<tr class="evenRow">
<td align="center">onmouseover</td>
<td>
                JavaScript event handler executed when this element was not under
                the mouse pointer but the pointer is moved inside the element.
            
            [RT Expr]
          </td>
</tr>
<tr class="oddRow">
<td align="center">onmouseup</td>

⌨️ 快捷键说明

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