I am new to Vaadin framework and I was wondering if there is a way of catching the deafult click event of an Anchor? (Vaadin14, Java only - v11)
I know i can do this:
Anchor download = new Anchor()
download.getElement().addEventListener("click", event -> doStuff())
but it does not seem to be the deafult built in click listener as i am able to add an anchor with a StreamResource. Then, clicking the Anchor starts the file download - without adding any additional listeners.
Answer to any of these question would solve my problem i believe:
- Is there a way of catching this anchor click event?
- Is there a way of triggerring it programatically in the code like the Button click() method?
- What kind of @DomEvent is this if it is a @DomEvent?