2012年6月18日

           1         final CheckBoxMultipleChoice<String> resultlistChoice = new CheckBoxMultipleChoice<String>("resultlist", new PropertyModel<List<String>>(this, "valueList"), new PropertyModel<List<String>>(this, "list"));
           2 
           3         resultlistChoice.add(new AjaxFormComponentUpdatingBehavior("onclick") {
           4 
           5             @Override
           6             protected void onUpdate(AjaxRequestTarget target) {
           7                 // TODO Auto-generated method stub
           8             }
           9         });
          10         
          11         resultlistChoice.add(new AjaxFormChoiceComponentUpdatingBehavior() {
          12             
          13             @Override
          14             protected void onUpdate(AjaxRequestTarget target) {
          15                 // TODO Auto-generated method stub
          16                 selectedList.clear();
          17                 for (String item : resultlistChoice.getModelObject()) {
          18                     selectedList.add(item);
          19                     System.out.println(item);
          20                 }
          21                 target.add(selectedChoice);
          22             }
          23         });

          posted @ 2012-06-18 00:07 myfavorite 閱讀(335) | 評論 (0)編輯 收藏

          主站蜘蛛池模板: 眉山市| 慈溪市| 微博| 比如县| 贵港市| 鹤庆县| 利辛县| 中阳县| 耿马| 吉木萨尔县| 岫岩| 毕节市| 平利县| 黔南| 苏尼特左旗| 布拖县| 岳普湖县| 平谷区| 泰顺县| 河东区| 定西市| 民勤县| 正安县| 巢湖市| 曲周县| 留坝县| 东兰县| 黄山市| 安国市| 汝南县| 莒南县| 凤城市| 峨边| 商河县| 阿巴嘎旗| 辛集市| 抚远县| 兴安县| 宁城县| 邯郸市| 普兰店市|