Hi Satya,
I don't have a straight forward solution.
You would have to do the following steps.
1.Install UI5 Inspector - Chrome Web Store.
You will see a new tab added to your chrome console.
2.Get the id of the table.(TableSelectDialog has a table control within it.)
You could get it through the UI5 inspector or Elements tab. I prefer UI5 inspector since its neat.
3. Get the id for the table. The id for my table within the tableselectdialog is__dialog0-table.
Also find the ids for the lnput list items you want to select.
Now you could use
sap.ui.getCore('Here place the id of the table').setSelectedItemById('Here place the id of the Input list item you want to set');
you could do setSelectedItemById multiple times for selecting multiple list items.
If I consider the previous code and your new requirement for selecting a set of items initially.
The code could look like
if(dialog doesn't exist){
create dialog
dialog=new sap.m.Dialog('iddialog',{......});
sap.ui.getCore('Here place the id of the table').setSelectedItemById('Here place the id of the Input list item 1 you want to set');
sap.ui.getCore('Here place the id of the table').setSelectedItemById('Here place the id of the Input list item 2 you want to set');
sap.ui.getCore('Here place the id of the table').setSelectedItemById('Here place the id of the Input list item 3 you want to set');
}
else{
call using the id of the dialog
dialog=sap.ui.getCore().byId('iddialog');
}
dialog.open();
######################
Please note the ids are string values.
Hope this helps.
Regards,
Naren L Naik