dataSourceTable.addColumn(nameColumn, "Name");
dataSourceTable.addColumn(jndiNameColumn, "JNDI");
dataSourceTable.addColumn(poolColumn, "Pool");
dataSourceTable.addColumn(statusColumn, "Enabled?");
vpanel.add(new ContentGroupLabel("Registered XA Datasources"));
vpanel.add(dataSourceTable);
// -----------
details = new XADataSourceDetails(presenter);
propertyEditor = new PropertyEditor(this,true);
propertyEditor.setHelpText("Properties to assign to the XADataSource implementation class.");
final SingleSelectionModel<XADataSource> selectionModel = new SingleSelectionModel<XADataSource>();
selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
@Override
public void onSelectionChange(SelectionChangeEvent event) {
XADataSource dataSource = selectionModel.getSelectedObject();
details.setSelectedRecord(dataSource);
propertyEditor.setProperties(dataSource.getName(), dataSource.getProperties());
}
});
dataSourceTable.setSelectionModel(selectionModel);
TabPanel bottomPanel = new TabPanel();
bottomPanel.setStyleName("default-tabpanel");
bottomPanel.add(details.asWidget(), "Attributes");
bottomPanel.add(propertyEditor.asWidget(), "XA Properties");
propertyEditor.setEnabled(false); // TODO: modifications of XA properties
//bottomPanel.add(new HTML("All the nitty gritty details"), "Advanced");
//bottomPanel.add(new HTML("Current pool size, connections in use, etc"), "Metrics");
bottomPanel.selectTab(0);
vpanel.add(new ContentGroupLabel("Datasource"));
vpanel.add(bottomPanel);
return layout;
}