Example #1
0
  /**
   * ct.
   *
   * @param value die IBAN.
   * @param bicInput optionale Angabe des zugehoerigen Eingabefeldes mit der BIC. Dessen Wert kann
   *     dann bei Eingabe einer IBAN automatisch mit der passenden BIC vervollstaendigt werden.
   */
  public IBANInput(String value, Input bicInput) {
    super(
        HBCIProperties.formatIban(value),
        HBCIProperties.HBCI_IBAN_MAXLENGTH + 5); // max. 5 Leerzeichen
    this.setValidChars(HBCIProperties.HBCI_IBAN_VALIDCHARS);
    this.setName("IBAN");
    this.bicInput = bicInput;

    this.addListener(
        new Listener() {
          public void handleEvent(Event event) {
            String s = (String) getValue();
            if (s == null || s.length() < 2) return;

            setValue(HBCIProperties.formatIban(s));
          }
        });
  }