Is it possible to know which row a textfield is in from within its textchan

I have a table. Each row has some TextFields. Each TextField has a textChangeListener.

Is it possible to know, in the textChangeListener, which row the textfield being edited is in?

I’ve tried using the table.getvalue - but it returns null.


On the top of my head I can only come up with a bit of a hack. In component generator method when you create TextField call setData(Object) for it and put the itemId there. Then when you get text change event you can call ((TextField)getSource()).getData() to get the itemId again.


That’s what I ended up doing.