cancel
Showing results for 
Search instead for 
Did you mean: 

Selection Indicator column in table is not working as expected!

naveen_inuganti2
Active Contributor
0 Kudos

Hi,

I have below code to open table in dailog box. When I open this table for the first time, I see everything as expected. But when I open same table again with same button click. I see results from second screen shot where I am not able select the records.. section indicator column is messed up. Let me know if you can help in this.

function SearchEmp(){

var oValueHelpDialog = new sap.ui.ux3.ToolPopup({

                title: "Employee Search",

                opener:  "idPernr",             // locate dialog next to this field

                closed: function (oEvent) {

                    // return selected tabled line/value

                    var oCore = sap.ui.getCore();

                    var oEmpInput = oCore.byId("idPernr");

                    var oContext = oHelpTable.getContextByIndex(oHelpTable.getSelectedIndex());

                    if (oContext) {

                          var oSel = oContext.getModel().getProperty(oContext.getPath());

                          oEmpInput.setValue(oSel["pernr"]);

                    };              

                }

});

            var oOkButton = new sap.ui.commons.Button({

                text: "OK",

                press: function () {

oValueHelpDialog.close();

                }

            });

// I have Data Binding logic (service call) here.

            oValueHelpDialog.addButton(oOkButton);

            oValueHelpDialog.addContent(oHelpTable);

            oValueHelpDialog.open();

};

Image 1: When I click on search button for the first time

Image 2: When I click on search button for the second time

Accepted Solutions (1)

Accepted Solutions (1)

naveen_inuganti2
Active Contributor
0 Kudos

This is fixed now. I had to assign instance to oValueHelpDailog in above code and check if application is calling this declaration second time.

if  (!sap.ui.getCore().byId("toolpop")){

     var oValueHelpDialog2 = new sap.ui.ux3.ToolPopup("toolpop", {

Now everything inside this IF condition will be called for the first time and issue will be fixed.

Thanks,

Naveen

Answers (0)