<small id='m0i7T'></small><noframes id='m0i7T'>

    1. <i id='m0i7T'><tr id='m0i7T'><dt id='m0i7T'><q id='m0i7T'><span id='m0i7T'><b id='m0i7T'><form id='m0i7T'><ins id='m0i7T'></ins><ul id='m0i7T'></ul><sub id='m0i7T'></sub></form><legend id='m0i7T'></legend><bdo id='m0i7T'><pre id='m0i7T'><center id='m0i7T'></center></pre></bdo></b><th id='m0i7T'></th></span></q></dt></tr></i><div id='m0i7T'><tfoot id='m0i7T'></tfoot><dl id='m0i7T'><fieldset id='m0i7T'></fieldset></dl></div>
        <tfoot id='m0i7T'></tfoot>
      1. <legend id='m0i7T'><style id='m0i7T'><dir id='m0i7T'><q id='m0i7T'></q></dir></style></legend>

        • <bdo id='m0i7T'></bdo><ul id='m0i7T'></ul>

        如何访问 Struts 标签中的迭代器变量?

        How to access iterator variable in Struts tag?(如何访问 Struts 标签中的迭代器变量?)
          <tbody id='hu270'></tbody>
        <tfoot id='hu270'></tfoot>
        <i id='hu270'><tr id='hu270'><dt id='hu270'><q id='hu270'><span id='hu270'><b id='hu270'><form id='hu270'><ins id='hu270'></ins><ul id='hu270'></ul><sub id='hu270'></sub></form><legend id='hu270'></legend><bdo id='hu270'><pre id='hu270'><center id='hu270'></center></pre></bdo></b><th id='hu270'></th></span></q></dt></tr></i><div id='hu270'><tfoot id='hu270'></tfoot><dl id='hu270'><fieldset id='hu270'></fieldset></dl></div>
          <bdo id='hu270'></bdo><ul id='hu270'></ul>

          1. <legend id='hu270'><style id='hu270'><dir id='hu270'><q id='hu270'></q></dir></style></legend>

          2. <small id='hu270'></small><noframes id='hu270'>

                • 本文介绍了如何访问 Struts 标签中的迭代器变量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在遍历一个列表并希望访问该值以创建一个文本输入字段.不幸的是,我无法访问 <s:textfield> 标签内的循环变量

                  I'm looping over a list and want to access the value to create a text input field. Unfortunatley I'm failing to access the loop variable inside the <s:textfield> tag

                  这是我尝试过的:

                    <s:iterator var="tag" value="searchTagList">
                      <s:property value="#tag"/>
                      <s:textfield key="searchResults.#tag" name="#tag" value="#tag" />
                    </s:iterator>
                  

                  <s:property value=#tag"/> 被正确评估并显示循环变量.但是 <s:textfield> 中的 #tag 永远不会被评估.

                  The <s:property value="#tag"/> is evaluated correctly and shows the loop variable. But the #tag in the <s:textfield> is never evaluated.

                  我也尝试用 <s:property value="#tag"/> 代替 #tag 没有成功.

                  I also tried to put <s:property value="#tag"/> instead of #tag without success.

                  推荐答案

                  使用标签的key属性代替三个name,value,标签.至于你已经定义的其中两个,你可以改变

                  The tag's key attribute used instead of three ones name,value,label. As far as two of them you have already defined, you can change

                  <s:textfield label="%{getText('searchResults.'+#tag)}" name="%{#tag}" />
                  

                  该值由 name 属性检索.您应该为 name 属性中评估的名称提供一个 getter.请注意,如果您的操作扩展了 ActionSupport,则 getText() 可用.而且您必须在名称标签中强制进行名称评估.

                  The value is retrieved by the name attribute. You should provide a getter for the name evaluated in the name attribute. Note, getText() is available if your action extends ActionSupport. And you have to force name evaluation in the name tag.

                  这篇关于如何访问 Struts 标签中的迭代器变量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  How to send data to COM PORT using JAVA?(如何使用 JAVA 向 COM PORT 发送数据?)
                  How to make a report page direction to change to quot;rtlquot;?(如何使报表页面方向更改为“rtl?)
                  Use cyrillic .properties file in eclipse project(在 Eclipse 项目中使用西里尔文 .properties 文件)
                  Is there any way to detect an RTL language in Java?(有没有办法在 Java 中检测 RTL 语言?)
                  How to load resource bundle messages from DB in Java?(如何在 Java 中从 DB 加载资源包消息?)
                  How do I change the default locale settings in Java to make them consistent?(如何更改 Java 中的默认语言环境设置以使其保持一致?)
                    <bdo id='ZBsxu'></bdo><ul id='ZBsxu'></ul>

                  • <small id='ZBsxu'></small><noframes id='ZBsxu'>

                    <legend id='ZBsxu'><style id='ZBsxu'><dir id='ZBsxu'><q id='ZBsxu'></q></dir></style></legend>

                  • <i id='ZBsxu'><tr id='ZBsxu'><dt id='ZBsxu'><q id='ZBsxu'><span id='ZBsxu'><b id='ZBsxu'><form id='ZBsxu'><ins id='ZBsxu'></ins><ul id='ZBsxu'></ul><sub id='ZBsxu'></sub></form><legend id='ZBsxu'></legend><bdo id='ZBsxu'><pre id='ZBsxu'><center id='ZBsxu'></center></pre></bdo></b><th id='ZBsxu'></th></span></q></dt></tr></i><div id='ZBsxu'><tfoot id='ZBsxu'></tfoot><dl id='ZBsxu'><fieldset id='ZBsxu'></fieldset></dl></div>

                    • <tfoot id='ZBsxu'></tfoot>

                            <tbody id='ZBsxu'></tbody>