Keeping the selected value of a table when using a popup

I ran into a weird issue, I have a two tables (Table A and Table B) that display results from a DB query. You select a row in Table A which filters the results of Table B. I need to insert a row into Table B, For a few reasons, in order to add a new row to Table B I need to use a popup window appears that takes your information, inserts it into the DB and then closes.

This is where I have in issue, after the insert when the popup closes and goes back to the main screen it deselects the selected rows in Table A and B. There could be a lot of results and trying to find the previous selected items is a pain.

I tried a few ways to reselect the selected items in the table but I have not been able to. I tried custom properties, scripting, table.setSelectedRow(), etc…

Does anyone have a good way to re-select a row when the screen becomes active again?

This doesn’t sound normal. Are you sure there is no code running in your internalFrameActivated event for your window? Anyway, if you have to, you could try storing the selected values in one or more client tags before opening the window.