ClickHandler submitHandler = new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
SingleSelectionModel<JDBCDriver> selection =
(SingleSelectionModel<JDBCDriver>) table.getSelectionModel();
JDBCDriver driver = selection.getSelectedObject();
if(driver!=null) { // force selected driver
editedEntity.setDriverName(driver.getName());
editedEntity.setDriverClass(driver.getDriverClass());
editedEntity.setDataSourceClass(driver.getXaDataSourceClass());
editedEntity.setMajorVersion(driver.getMajorVersion());
editedEntity.setMinorVersion(driver.getMinorVersion());
wizard.onConfigureDriver(editedEntity);
}
else {
Window.alert("Please select a driver!");