cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Screen Personas - Refresh/Re-render Issue for HtmlViewer Control

0 Kudos

Hi,

I have a custom SAPUI5 table rendered in an HTMLViewer control. In this table I have added a delete button which calls a function inside the HTMLViewer to remove the item from the SAPUI5 Table:

var path = oEvent.getSource().getBindingContext().sPath;
                    var obj = oTable.getModel().getProperty(path);
                    var path = oEvent.getSource().getBindingContext().sPath;
                    var obj = oTable.getModel().getProperty(path);
                    var oData = oModel.getData().modelData;
                    var index = 0;

                    for(var i = 0; i < oData.length; i++){
                        if(oData[i]["RV45A-MABNR"] === obj["RV45A-MABNR"]){
                                        index = i;
                        }
                    }


                    oData.splice(index,1);
                    oTable.getModel().setData({modelData: oData}) ;
                    oTable.getModel().refresh();

                    window.sessionStorage.setItem("Table", JSON.stringify(oData));

Once the item is removed from the custom SAPUI5 table, I then trigger a personas script using:

parent.sap.personas.scripting.executeScriptAsync('wnd[0]/scrptPersonas_000D3AD14B771EE996CD42E5A6BE2855', {item: obj});

to call logic in the parent screen.

When this is executed, the calling of the executeScriptAsync() triggers a re-render/refresh of the HTMLViewer control. The HTMLViewer control is restored to it's previous screen state so the deleted item remain in the custom SAPUI5 table.


I have found an answer here which suggests it could be a kernal issue?

https://archive.sap.com/discussions/thread/3949357

Regards,

William

Accepted Solutions (0)

Answers (0)