cancel
Showing results for 
Search instead for 
Did you mean: 

Select Table Row within a dialog

justin_kemp
Participant
0 Kudos

Hi

I am using SAP UI5 commons library and have a table on my screen for inline editing.

For one of the fields I am using ValueHelp and on click of F4 I am launching a Dialog with a table inside it. The problem is If I specify the id of the table, it works fine for one go but second time onwards it gives error that a duplicate id exists for table and the dialog is not rendered.

Is there a way I can get the selected row inside table (within dialog) without the ID. Right now I pick selected row from sap.ui.getCore().byId("oTest_Table_Id") and then the selected Index and then data.

Or Is there a way when the dialog is closed I can destroy that table instance as well. So that next time when the F4 is pressed a new Dialog and Table gets rendered.

Accepted Solutions (1)

Accepted Solutions (1)

SergioG_TX
Active Contributor
0 Kudos

Justin,

i think the reason is because the dialog may be destroying and recreating the table with the same id.. are you able to accomplish this without the table id?

alternatively, i think you could achieve it by opening the dialog and read its content?

sometimes the issue w dialogs is that they need to be added as dependents of the views... and pass the controller as an argument to the dialog  so that they both have the same base.

hope one of these ideas works out

Answers (1)

Answers (1)

justin_kemp
Participant
0 Kudos

Had to use destroy to close dialog. I was using close.