Field Icon listener


Vaadin has icon at its fields and as much as i know these icon can be set as below .

TextField tf = new TextField(“Email”);
tf.setIcon(new ClassResource(“email.png”));

My question is how can i add a listener to the icon that is set to a vaadin field.

I searched existing listener but ı could not found an appropriate listener.


Hi Murat,

I think there isn’t any existing listener for the icons. The easiest way to add custom listeners to existing Vaadin components is to create a component extension.

More info in Book of Vaadin

Also a nice blog article