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

<tfoot id='KUeQZ'></tfoot>

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

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

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

        如何从 displaytag 中的 struts2 复选框获取复选框值到操作类

        时间:2023-10-15
          <tbody id='0RTmH'></tbody>
      1. <i id='0RTmH'><tr id='0RTmH'><dt id='0RTmH'><q id='0RTmH'><span id='0RTmH'><b id='0RTmH'><form id='0RTmH'><ins id='0RTmH'></ins><ul id='0RTmH'></ul><sub id='0RTmH'></sub></form><legend id='0RTmH'></legend><bdo id='0RTmH'><pre id='0RTmH'><center id='0RTmH'></center></pre></bdo></b><th id='0RTmH'></th></span></q></dt></tr></i><div id='0RTmH'><tfoot id='0RTmH'></tfoot><dl id='0RTmH'><fieldset id='0RTmH'></fieldset></dl></div>

      2. <small id='0RTmH'></small><noframes id='0RTmH'>

        <tfoot id='0RTmH'></tfoot>
          <bdo id='0RTmH'></bdo><ul id='0RTmH'></ul>

              • <legend id='0RTmH'><style id='0RTmH'><dir id='0RTmH'><q id='0RTmH'></q></dir></style></legend>
                  本文介绍了如何从 displaytag 中的 struts2 复选框获取复选框值到操作类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在开发 struts2 应用程序,我在其中使用 displaytag 来支持分页.

                  I am working on struts2 application in which i am using displaytag for pagination support.

                  现在我想为表格中的每一行设置一个复选框,因为我正在这样做.

                  Now i want a check box for each row in the table for that i am doing this.

                  <display:table name="countryList" export="true" class="table" id="countryList" pagesize="${selectedPageSize}" decorator="org.displaytag.decorator.TotalTableDecorator" >        
                      <display:column property="id"  title="ID" paramId="id" />
                      <display:column property="name" title="Name"  sortable="true"/>
                      <display:column title="Delete All">
                          <s:checkbox  id="check" name="check" fieldValue="%{#attr.countryList.id}" theme="simple"/>
                      </display:column>
                  </display:table>  
                  
                  <s:submit action="deleteall"  value="DeleteSelected" />
                  

                  直到这里它的工作正常.现在我想删除通过复选框选中的所有国家/地区.

                  till here its work fine. now i want to delete all the countries that are checked through the check box.

                  为此,我想要检查的国家/地区的 ID.为此,我必须采用数组中的值.

                  for that i want the ids of the countries that are checked .for that i have to take the values in an array.

                  问题是我如何从 jsp 发送值,然后在动作类中获取它

                  The problem is how can i send the values from jsp and then get it at the action class

                  推荐答案

                  如果您将 String[] 添加到与您的复选框命名相同的操作中并通过访问器(getter/setter)公开它,struts 2 应该自动填充它.

                  If you add a String[] to your action named the same as your checkbox(s) and expose it via accessors (getters/setters) struts 2 should auto populate it.

                  这篇关于如何从 displaytag 中的 struts2 复选框获取复选框值到操作类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:使用 DisplayTag 库框架通过 Struts2 进行分页 下一篇:如何在 Struts 2 中验证文件上传

                  相关文章

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

                      <bdo id='SOqED'></bdo><ul id='SOqED'></ul>

                      <tfoot id='SOqED'></tfoot>