// Create a table to layout the content
VerticalPanel dialogContents = new VerticalPanel();
dialogContents.setSpacing(4);
dialogBox.setWidget(dialogContents);
final Tree dynamicTree = createDynamicTree(pubInfoList);
dynamicTree.ensureDebugId("cwTree-dynamicTree");
ScrollPanel dynamicTreeWrapper = new ScrollPanel(dynamicTree);
dynamicTreeWrapper.ensureDebugId("cwTree-dynamicTree-Wrapper");
dynamicTreeWrapper.setSize("300px", "300px");
// Wrap the dynamic tree in a DecoratorPanel
DecoratorPanel dynamicDecorator = new DecoratorPanel();
dynamicDecorator.setWidget(dynamicTreeWrapper);
dialogContents.add(dynamicDecorator);
// Add a close button at the bottom of the dialog
Button nextButton = new Button("Next", new ClickHandler() {
public void onClick(ClickEvent event) {
newDataSourceID.append(dynamicTree.getSelectedItem().getText());
dashboardService.getDataSourceAllDetails(newDataSourceID.toString(), new AsyncCallback<DataSourceConfiguration>() {
public void onFailure(Throwable caught) {
// TODO Auto-generated method stub