summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src/main/java/at/asit
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterTANComposite.java19
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java4
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/ATrustHandler.java1
3 files changed, 17 insertions, 7 deletions
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();
@@ -153,6 +150,19 @@ public class MobileBKUEnterTANComposite extends StateComposite {
}
/**
+ * 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
*
* @param msg
@@ -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$
}
-
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java
index 671c670b..09dc56c2 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java
@@ -289,13 +289,13 @@ public class MobileBKUState extends State {
} else {
tan.setRefVal(mobileStatus.getRefVal());
tan.setSignatureData(mobileStatus.getSignatureDataURL());
-
+ tan.setErrorMessage(mobileStatus.getErrorMessage());
if (mobileStatus.getTanTries() < mobileStatus.getMaxTanTries()
&& mobileStatus.getTanTries() > 0) {
// show warning message x tries left!
+ // overrides error message
tan.setTries(mobileStatus.getTanTries());
-
}
tan.enableButton();
this.stateMachine.getGUIProvider().display(tan);
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/ATrustHandler.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/ATrustHandler.java
index 64f63b46..dcab0641 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/ATrustHandler.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/ATrustHandler.java
@@ -178,6 +178,7 @@ public class ATrustHandler extends MobileBKUHandler {
*/
@Override
public void handleTANResponse(String responseData) {
+ getStatus().setErrorMessage(null);
if (responseData.contains("sl:CreateXMLSignatureResponse xmlns:sl")) { //$NON-NLS-1$
// success !!