久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    <small id='8uxTk'></small><noframes id='8uxTk'>

    1. <i id='8uxTk'><tr id='8uxTk'><dt id='8uxTk'><q id='8uxTk'><span id='8uxTk'><b id='8uxTk'><form id='8uxTk'><ins id='8uxTk'></ins><ul id='8uxTk'></ul><sub id='8uxTk'></sub></form><legend id='8uxTk'></legend><bdo id='8uxTk'><pre id='8uxTk'><center id='8uxTk'></center></pre></bdo></b><th id='8uxTk'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='8uxTk'><tfoot id='8uxTk'></tfoot><dl id='8uxTk'><fieldset id='8uxTk'></fieldset></dl></div>

      <tfoot id='8uxTk'></tfoot><legend id='8uxTk'><style id='8uxTk'><dir id='8uxTk'><q id='8uxTk'></q></dir></style></legend>
      • <bdo id='8uxTk'></bdo><ul id='8uxTk'></ul>

      如何傳遞一個Map&lt;ObjectA,List&lt;ObjectB&am

      How to pass a Maplt;ObjectA, Listlt;ObjectBgt;gt; to action in Struts 2(如何傳遞一個Maplt;ObjectA,Listlt;ObjectBgt;gt;在 Struts 2 中執(zhí)行)
        <bdo id='1OR7w'></bdo><ul id='1OR7w'></ul>

        <small id='1OR7w'></small><noframes id='1OR7w'>

            <tbody id='1OR7w'></tbody>

              <i id='1OR7w'><tr id='1OR7w'><dt id='1OR7w'><q id='1OR7w'><span id='1OR7w'><b id='1OR7w'><form id='1OR7w'><ins id='1OR7w'></ins><ul id='1OR7w'></ul><sub id='1OR7w'></sub></form><legend id='1OR7w'></legend><bdo id='1OR7w'><pre id='1OR7w'><center id='1OR7w'></center></pre></bdo></b><th id='1OR7w'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='1OR7w'><tfoot id='1OR7w'></tfoot><dl id='1OR7w'><fieldset id='1OR7w'></fieldset></dl></div>

            • <tfoot id='1OR7w'></tfoot><legend id='1OR7w'><style id='1OR7w'><dir id='1OR7w'><q id='1OR7w'></q></dir></style></legend>
              • 本文介紹了如何傳遞一個Map&lt;ObjectA,List&lt;ObjectB&gt;&gt;在 Struts 2 中執(zhí)行的處理方法,對大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                問題描述

                我有一個事件對象,里面有一個Map>ObjectA是標(biāo)簽,list<;ObjectB> 是表格行.使用以下代碼,我可以正確顯示表格,但是當(dāng)我將表單提交到 Action 類時(shí),地圖在事件中是 null.

                I have a event object, inside there is a Map<ObjectA, List<ObjectB>>, the ObjectA is the label, and the list<ObjectB> are table rows. With following code, I can display the tables correctly, but when I submit the form to Action class, the map is null inside the event.

                JSP 代碼:

                <s:iterator value="event.planMap" var="map" >
                    <h4>Plan Type: <s:property value='key' /></h4>
                    <table id="plan">
                    <s:iterator value="value" status="stat" var="detail" >
                        <tr>
                            <td><input type="text" id="name" name="event.planMap['%{#map.key}'][%{#stat.index}].name" value="<s:property value='name'/>"/></td>
                            <td><input type="text" id="text" name="event.planMap['%{#map.key}'][%{#stat.index}].text" value="<s:property value='text'/>"/></td>
                            <td><input type="text" id="contact" name="event.planMap['%{#map.key}'][%{#stat.index}].contact" value="<s:property value='contact'/>"/></td>
                        </tr>
                        </s:iterator>
                    </table>
                </s:iterator>
                

                @Andrea &Roman,所以我修改了代碼.顯示表格是正確的,但我得到了錯誤,它進(jìn)入了結(jié)果輸入.如果我刪除 planMap,則操作會成功.所以至少我知道錯誤是 planMap.修改后的代碼是:

                @Andrea & Roman, So I modified the code. displaying the table is correct, but I got error and it went to Result input. If I remove the planMap, the action goes to success. So at least I know the error are the planMap. The modified code is:

                事件定義:

                The Event definition:

                public Event {
                    private Map<Object_A, Object_B> planMap;
                    public Map<Object_A, Object_B> getPlanMap {
                           return this.planMap;
                    }
                
                    public void setPlanMap(Map<Object_A, Object_B> planMap) {
                           this.planMap = planMap;
                    }
                }
                

                Object_B 定義:

                The Object_B definition:

                public Object_B {
                    private List<Object_C> details;
                    
                    public List<Object_C> getDetials() {
                           return this.details;
                    }
                    public void setDetails(List<Object_C> details) {
                           this.details = details;
                    }
                }
                

                JSP代碼為:

                <s:iterator value="event.planMap" status="mStat"  >
                    <h4>Plan Type: <s:property value='key' /></h4>
                    <table id="plan">
                    <s:iterator value="value.details" status="stat">
                    <tr>
                        <td><input type="text" id="name" name="event.planMap['% {#mStat.index}'].details[%{#stat.index}].name" value="<s:property value='name'/>"/></td>
                        <td><input type="text" id="text" name="event.planMap['%{#mStat.index}'].details[%{#stat.index}].text" value="<s:property value='text'/>"/></td>
                        <td><input type="text" id="contact" name="event.planMap['%{#mStat.index}'].details[%{#stat.index}].contact" value="<s:property value='contact'/>"/></td>
                    </tr>
                    </s:iterator>
                </table>
                </s:iterator>
                      
                

                推薦答案

                我在以下更改后使其工作.

                I made it work after the following change.

                <s:iterator value="event.planMap" status="mStat"  >
                <h4>Plan Type: <s:property value='key' /></h4>
                <table id="plan">
                <s:iterator value="value.details" status="stat">
                <tr>
                    <td><s:textfield id="name" name="event.planMap['%{key}'].details[%{#stat.index}].name" /></td>
                    <td><s:textfield  id="text" name="event.planMap['%{key}'].details[%{#stat.index}].text" /></td>
                    <td><s:textfield id="contact" name="event.planMap['%{key}].details[%{#stat.index}].contact" /></td>
                </tr>
                </s:iterator>
                

                這篇關(guān)于如何傳遞一個Map&lt;ObjectA,List&lt;ObjectB&gt;&gt;在 Struts 2 中執(zhí)行的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

                相關(guān)文檔推薦

                quot;Char cannot be dereferencedquot; error(“Char 不能被取消引用錯誤)
                Java Switch Statement - Is quot;orquot;/quot;andquot; possible?(Java Switch 語句 - 是“或/“和可能的?)
                Java Replace Character At Specific Position Of String?(Java替換字符串特定位置的字符?)
                What is the type of a ternary expression with int and char operands?(具有 int 和 char 操作數(shù)的三元表達(dá)式的類型是什么?)
                Read a text file and store every single character occurrence(讀取文本文件并存儲出現(xiàn)的每個字符)
                Why do I need to explicitly cast char primitives on byte and short?(為什么我需要在 byte 和 short 上顯式轉(zhuǎn)換 char 原語?)

                        <bdo id='3SMkt'></bdo><ul id='3SMkt'></ul>
                          <tbody id='3SMkt'></tbody>

                        <small id='3SMkt'></small><noframes id='3SMkt'>

                        <i id='3SMkt'><tr id='3SMkt'><dt id='3SMkt'><q id='3SMkt'><span id='3SMkt'><b id='3SMkt'><form id='3SMkt'><ins id='3SMkt'></ins><ul id='3SMkt'></ul><sub id='3SMkt'></sub></form><legend id='3SMkt'></legend><bdo id='3SMkt'><pre id='3SMkt'><center id='3SMkt'></center></pre></bdo></b><th id='3SMkt'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='3SMkt'><tfoot id='3SMkt'></tfoot><dl id='3SMkt'><fieldset id='3SMkt'></fieldset></dl></div>

                        <tfoot id='3SMkt'></tfoot>
                          <legend id='3SMkt'><style id='3SMkt'><dir id='3SMkt'><q id='3SMkt'></q></dir></style></legend>

                        • 主站蜘蛛池模板: 国产精品国产亚洲精品看不卡15 | 日韩中文一区二区三区 | 成人免费影院 | 久久精品一二三影院 | 欧美一区二区三区 | 国产视频一区二区 | 人人爽日日躁夜夜躁尤物 | 国产色99精品9i | 国产精品一区二区久久 | 国产高清av免费观看 | 欧美日韩国产在线 | julia中文字幕久久一区二区 | 欧美视频 亚洲视频 | 蜜臀网站 | 一区中文字幕 | 美女视频黄的 | 日韩欧美中文字幕在线观看 | 亚洲精品中文字幕中文字幕 | 亚洲成av人影片在线观看 | 亚洲综合字幕 | 美日韩免费视频 | 日韩视频免费看 | 91精品一区 | 国产精品久久久久久中文字 | 日韩欧美手机在线 | 久久i | 欧美视频成人 | 毛片免费视频 | 久久免费香蕉视频 | 国产在线中文字幕 | 欧美成人h版在线观看 | 亚洲第一天堂无码专区 | 国产欧美精品一区二区三区 | 日韩在线视频免费观看 | 欧美一区二区三区大片 | 国产区久久 | 国产精品一卡二卡三卡 | 欧美精品成人一区二区三区四区 | 国产免费播放视频 | 午夜免费网站 | av高清毛片 |