Tabs with tables problem


We have implemented a tab view where each tab has a instance of our extended Table class.

In our table we have addad a shortcutlistener that listens to ENTER-keypress. Once enter is pressed the table becomes eiter editable or non-editable.

Our problem is this: If we make on Table(1) editable and switch tab then the Table (1) in the old tab still holds controll over the ENTER event and hence we cant perform a new ENTER-keypress event in the Table (2) and make Table(2) editable.

Is there some way to bind some kind of of event to a table that says something like:

If Table.focus() is false then
relase event.ENTER

Or if there is some other way, like Table.OnFocus() you could take controll or something.

Thanks for any help!