How to access cells in a dynamically generated editable table

I have the following situation:

I have a class that implements TableFieldFactory. I use a BeanItemContainer as a Data Source.
Because the fields in my table are editable I add ValueChangeListeners to them.

I am trying to get a different component in the same row from a listener of another component.

I was following this example:

accessing different component example

but was getting a cast error.

Any suggestions?