ClickHandler submitHandler = new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
JDBCDriver driver = null;
if(selectedTab==0){
// clear state
form.clearValues();
SingleSelectionModel<JDBCDriver> selection =
(SingleSelectionModel<JDBCDriver>) table.getSelectionModel();
driver = selection.getSelectedObject();
}
else
{
FormValidation formValidation = form.validate();
if(!formValidation.hasErrors())
{
driver = form.getUpdatedEntity();
}
}
if(driver!=null) { // force selected driver
editedEntity.setDriverName(driver.getName());
editedEntity.setDriverClass(driver.getDriverClass());
editedEntity.setMajorVersion(driver.getMajorVersion());
editedEntity.setMinorVersion(driver.getMinorVersion());
wizard.onConfigureDriver(editedEntity);
}
else {
Console.warning(Console.CONSTANTS.subsys_jca_dataSource_select_driver(),