Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Selection Indicator column in table is not working as expected!

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

Former Member
Former Member replied

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

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question