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         });

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-06-18
  • 2022-12-23
  • 2021-07-22
  • 2021-11-05
  • 2021-11-29
  • 2021-08-22
猜你喜欢
  • 2021-07-24
  • 2021-08-22
  • 2021-11-03
  • 2021-10-11
  • 2021-06-11
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案