From be87bc6674daeec3a58931775f5b0d7c9cd71709 Mon Sep 17 00:00:00 2001 From: tkellner Date: Wed, 10 Apr 2013 19:33:57 +0000 Subject: Allow error messages in tan state git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@384 174cde9d-5d70-4d2a-aa98-46368bc2aaf7 --- .../gui/composites/MobileBKUEnterTANComposite.java | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites') diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterTANComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterTANComposite.java index 8ae6aacd..953a898d 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterTANComposite.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterTANComposite.java @@ -63,13 +63,10 @@ public class MobileBKUEnterTANComposite extends StateComposite { @Override public void widgetSelected(SelectionEvent e) { - if(!MobileBKUEnterTANComposite.this.btn_ok.getEnabled()) { return; } - - - + String tan = MobileBKUEnterTANComposite.this.txt_tan.getText(); tan = tan.trim(); @@ -152,6 +149,19 @@ public class MobileBKUEnterTANComposite extends StateComposite { String.format(Messages.getString("tanEnter.tries"), tries)); //$NON-NLS-1$ } + /** + * Set an error message + * @param errorMessage the error message + */ + public void setErrorMessage(String errorMessage) { + if (errorMessage == null) + this.lblTries.setText(""); //$NON-NLS-1$ + else + this.lblTries.setText( + Messages.getString("error.Title") + ": " + errorMessage); //$NON-NLS-1$ //$NON-NLS-2$ + } + + /** * Sets the message * @@ -423,5 +433,4 @@ public class MobileBKUEnterTANComposite extends StateComposite { .getString("tanEnter.ReferenceValue")); //$NON-NLS-1$ this.lblTan.setText(Messages.getString("tanEnter.TAN")); //$NON-NLS-1$ } - } -- cgit v1.2.3