The @EventHandler only works with polymer events like on-click also the name should be the same.
This would mean that in the template you would have <div on-click="sessionDisconnected">on-Event</div> and on the server
To use the dispatchEvent with a CustomEvent you should register an EventListener for instance getElement().addEventListener("sessionDisconnected", disconnect -> System.out.println("Session info"));
This should then fire when running this.dispatchEvent(new CustomEvent('sessionDisconnected', {}));
The @EventHandler only works with polymer events like on-click also the name should be the same.
This would mean that in the template you would have <div on-click="sessionDisconnected">on-Event</div> and on the server
To use the dispatchEvent with a CustomEvent you should register an EventListener for instance getElement().addEventListener("sessionDisconnected", disconnect -> System.out.println("Session info"));
This should then fire when running this.dispatchEvent(new CustomEvent('sessionDisconnected', {}));
Hope this helps.
Mikael
Hi Mikael,
I’m trying to reproduce your approach.
My bulk-view.html component rise a CustomEvent like this: