baseDepJobs.setWidth(150);
baseDepJobs.setReadOnly(true);
baseDepJobs.addHandler(new ClickHandler() {
@Override
public void onClick(final ClickEvent event) {
final CheckableJobTree tree = new CheckableJobTree();
tree.setSelectHandler(new SelectHandler() {
@Override
public void onSelect(final SelectEvent event) {
List<GroupJobTreeModel> list = tree.getTree()
.getCheckedSelection();// .getSelectionModel().getSelectedItems();
String result = "";
for (GroupJobTreeModel m : list) {
if (m.isJob()) {
result += m.getId() + ",";
}
}
if (result.endsWith(",")) {
result = result.substring(0,
result.length() - 1);
}
baseDepJobs.setValue(result.toString(), true);
baseDepJobs.validate();
}
});
tree.show();
tree.refresh(new Callback(){
@Override
public void callback() {
tree.init(baseDepJobs.getValue());
}
});
}
}, ClickEvent.getType());
ListStore<Map<String, String>> cycleStore = new ListStore<Map<String, String>>(