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

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

        <bdo id='eOg40'></bdo><ul id='eOg40'></ul>
      1. <small id='eOg40'></small><noframes id='eOg40'>

        将表单的数据提交到 java Set

        Submitting form#39;s data to a java Set(将表单的数据提交到 java Set)
      2. <small id='a9DSG'></small><noframes id='a9DSG'>

                <tbody id='a9DSG'></tbody>
              <tfoot id='a9DSG'></tfoot>
                <bdo id='a9DSG'></bdo><ul id='a9DSG'></ul>

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

                • <i id='a9DSG'><tr id='a9DSG'><dt id='a9DSG'><q id='a9DSG'><span id='a9DSG'><b id='a9DSG'><form id='a9DSG'><ins id='a9DSG'></ins><ul id='a9DSG'></ul><sub id='a9DSG'></sub></form><legend id='a9DSG'></legend><bdo id='a9DSG'><pre id='a9DSG'><center id='a9DSG'></center></pre></bdo></b><th id='a9DSG'></th></span></q></dt></tr></i><div id='a9DSG'><tfoot id='a9DSG'></tfoot><dl id='a9DSG'><fieldset id='a9DSG'></fieldset></dl></div>
                  本文介绍了将表单的数据提交到 java Set的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  是否可以在Struts2的action中将表单的数据提交给java Set?

                  Is it possible to submit a form's data to a java Set in an action of Struts2?

                  动作代码:

                  class TestAction extends ActionSupport{
                  
                   private Set<Integer> mySet = new LinkedHashSet<Integer>();
                  
                   public TestAction(){
                   }
                  
                   public String test(){
                  
                    someMethod(mySet);
                  
                   }
                  
                    ... Getters/Setters ...
                  
                  }
                  

                  表格代码:

                  <form action="test.action" >
                   <input name="mySet[0]" />
                   <input name="mySet[1]" />
                   <input name="mySet[2]" />
                   <submit />
                  </form>
                  

                  推荐答案

                  Set 只是一个集合,Struts2 内部支持任何类型的集合.但是对于这种类型的集合,您不能在 OGNL 表达式中使用索引.试试

                  The Set is just a collection, and Struts2 has support for any type of collections internally. But for this type of collection you can't use indexes in your OGNL expressions. Try

                  <form action="test.action" >
                   <input name="mySet" />
                   <input name="mySet" />
                   <input name="mySet" />
                   <s:submit />
                  </form>
                  

                  这篇关于将表单的数据提交到 java Set的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  Java Bytecode Manipulation Library Suggestions(Java 字节码操作库建议)
                  Java CLI UI-design: frameworks or libraries?(Java CLI UI 设计:框架还是库?)
                  About the use of Beans.xml configuration file in Spring Framework application(关于Spring Framework应用中Beans.xml配置文件的使用)
                  What is the difference between Spring, Struts, Hibernate, JavaServer Faces, Tapestry?(Spring、Struts、Hibernate、JavaServer Faces、Tapestry 有什么区别?)
                  Are there any android application framework like spring?(有没有像spring这样的android应用程序框架?)
                  Java Swing based game framework. Any advice?(基于 Java Swing 的游戏框架.有什么建议吗?)

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

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

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

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