Class OtpCompleteEvent

java.lang.Object
java.util.EventObject
com.vaadin.flow.component.ComponentEvent<OtpField>
com.flowingcode.vaadin.addons.otpfield.OtpCompleteEvent
All Implemented Interfaces:
Serializable

@DomEvent("otp-complete") public class OtpCompleteEvent extends ComponentEvent<OtpField>
Fired when the code entered in an OtpField is complete, that is, when its length reaches OtpField.getLength().

The event is fired regardless of the ValueChangeMode of the field, and it is fired again whenever the user edits a complete code into a different one: by replacing a character of it, by pasting another code over it, or by making it incomplete and completing it once more. Every event therefore carries a code that has not been reported before it, which is what an application verifying the code needs. It is not fired for a programmatic OtpField.setValue(String).

Since:
1.0.0
Author:
Flowing Code
See Also:
  • Constructor Details

    • OtpCompleteEvent

      public OtpCompleteEvent(OtpField source, boolean fromClient, @EventData("event.detail.value") String value)
      Creates a new complete event.
      Parameters:
      source - the field that fired the event
      fromClient - true if the event originated from the client side
      value - the complete code