Hi, Please try by calling listModules.setReuseItems(true);
Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Wed, Apr 20, 2016 at 5:23 PM, alexandre ricciardi < [email protected]> wrote: > Hello, > > > I want to update a dropdown list with ajax calls triggered by checkboxes. > I have a ListView of AjaxCheckBoxes but only the first AjaxCheckBox is > callbacked. > It appears that all ajax calls are triggered by the first check box. > Changing the following checkboxes have not effect. > > DropDownChoice<String> ddc = new DropDownChoice<String>("ddcName", > listProps); > ddc.setOutputMarkupId(true); > add(ddc); > > final IModel<ValueMap> thisModel = getModel(); > ListView<LauncherModule> listModules = new > ListView<LauncherModule>("list.module.beans", > PluginsConfigHelper.getModules()) { > private static final long serialVersionUID = 1L; > @Override > protected void populateItem(ListItem<Module> item) { > AjaxCheckBox box = new AjaxCheckBox("myCheckBox", Model.of(Boolean.TRUE) { > > private static final long serialVersionUID = 1L; > > @Override > protected void onUpdate(AjaxRequestTarget target) > { target.add(ddc); } > > }; > box.setOutputMarkupId(true); > box.setOutputMarkupPlaceholderTag(true); > item.add(box); > } > }; > > Thanks for your help. > > Alexandre >
