AddValueChangeListener VS AddAttachListener

Can someone explain me the difference between addValueChangeListener and addAttachListener. Which and when is it better to use one or the other?

Depends on the component you are asking for and your use case. What do you wanna archive?

I’m using a comboBox

If you wanna do something when you add the combo box to the layout - attach is the right way

If you wanna do something when the value (selected item) of the combo box changes - value change is the right way