隨筆-10  評論-23  文章-32  trackbacks-0

          jsp中,static是一個對象列表:

          <s:iterator value="tacticList" status="tactic">
          <dl>
          <s:hidden name="tacticList[%{#tactic.index}].id" value="%{tacticList[#tactic.index].id}" />
          <s:textfield name="tacticList[%{#tactic.index}].name" value="%{tacticList[#tactic.index].name}"/>:
          <s:set name="list" value="#{'true':'是','false':'否'}" />
          <s:radio list="list" listKey="key" listValue="value" name="tacticList[%{#tactic.index}].value"
          value
          ="%{tacticList[#tactic.index].value}"></s:radio>
          </dl>
          </s:iterator>

          ----------------------------------

          action中,使用一個和jsp中同名的對象列表tacticList,get/set方法,接受提交的數據:

           private List<OMDefaultTactic> tacticList;

          public List<OMDefaultTactic> getTacticList() {
          return tacticList;
          }

          public void setTacticList(List<OMDefaultTactic> tacticList) {
          this.tacticList = tacticList;
          }
          posted on 2009-08-04 15:56 liuyimx 閱讀(1458) 評論(0)  編輯  收藏 所屬分類: struts2

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 新绛县| 金川县| 若尔盖县| 安庆市| 新竹市| 永平县| 两当县| 会理县| 胶州市| 嫩江县| 准格尔旗| 锡林浩特市| 宾阳县| 德兴市| 会宁县| 阳春市| 石景山区| 宜都市| 治多县| 平潭县| 方城县| 五原县| 海盐县| 汨罗市| 奉节县| 平利县| 梅河口市| 许昌县| 工布江达县| 睢宁县| 芦溪县| 泰顺县| 周口市| 永顺县| 古丈县| 昌乐县| 敦化市| 凤庆县| 襄樊市| 台北县| 麻城市|