Skip to Content

Select Table Row within a dialog


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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Aug 22, 2016 at 01:41 PM


    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 22, 2016 at 01:44 PM

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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.