*/
@Override
public void applyState() throws InvalidStateException {
super.applyState();
DbOutputterDescriptor descriptor = model.getDescriptor();
if (descriptor == null || !(descriptor instanceof DbOutputterDescriptor)) {
descriptor = new DefaultDbOutputterDescriptor("Name");
model.setDescriptor(descriptor);
}
for (String column : descriptor.getColumns()) {
descriptor.removeColumn(column);
}
descriptor.addColumns(listSelector.getSelectedItems());
for (Object dataSet : descriptor.getDataSets()) {
descriptor.removeDataSet(dataSet);
}
descriptor.setDataSetId(((DataSetWrapper) dataSetCombo.getSelectedItem()).descriptor.getDataSetId());
descriptor.setName(nameField.getText());
descriptor.setTableName(tableName.getText());
descriptor.setAddRunID(addRunID.isSelected());
descriptor.setRunInfoTableName(runInfoTableName.getText());
try {
descriptor.setWriteCacheInterval(new Integer(writeCacheInterval.getText()).intValue());
} catch (NumberFormatException e) {
throw new org.pietschy.wizard.InvalidStateException("Invalid input for cache interval");
}
}