Refactoring for button enable

Signed-off-by: Jonathan Philip Knoblauch <JonathanPhilip.Knoblauch@bosch-si.com>
This commit is contained in:
Jonathan Philip Knoblauch
2016-08-04 15:57:20 +02:00
parent 6be3d72a5a
commit 11bb282699
2 changed files with 4 additions and 2 deletions

View File

@@ -138,7 +138,7 @@ public class BulkUploadHandler extends CustomComponent
public void buildLayout() {
final HorizontalLayout horizontalLayout = new HorizontalLayout();
upload = new Upload();
upload.setEnabled(true);
upload.setEnabled(false);
upload.setButtonCaption("Bulk Upload");
upload.setReceiver(this);
upload.setImmediate(true);
@@ -227,6 +227,7 @@ public class BulkUploadHandler extends CustomComponent
} catch (final RuntimeException e) {
Optional.ofNullable(UI.getCurrent()).ifPresent(error -> UI.getCurrent().getErrorHandler()
.error(new ConnectorErrorEvent(targetTableHeader, e)));
} finally {
updateBulkUpload();
doAssignments();

View File

@@ -296,8 +296,9 @@ public class TargetBulkUpdateWindowLayout extends CustomComponent {
descTextArea.clear();
targetBulkTokenTags.getTokenField().clear();
targetBulkTokenTags.populateContainer();
progressBar.setValue(0f);
progressBar.setValue(0F);
progressBar.setVisible(false);
managementUIState.getTargetTableFilters().getBulkUpload().setProgressBarCurrentValue(0F);
targetsCountLabel.setVisible(false);
}