Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3184

SAPUI5 page View reload issue

$
0
0

Hi Experts,

 

          I have created an app that has a view that shows graph. The graph will be rendered in a view called CompareEmpChart this VIEW i rendered in

 

a dialog. so that i call call the same view from multiple places. that means the graph rendering in this CompareEmpChart view inside dialog is

 

dynamic. so my problem is when use this call this view from any page at  it will work properly but only for the first time. That means second time when

 

I call the same view it won't open the dialog until I reload the page. I dont know what is the issue...

 

SECOND TIME MY DIALOG IS NOT GETTING OPENED UNTIL I RELOAD THE VIEW. BUT FROM THE SAME VIEW MY DIALOG WILL OPEN MULTIPLE TIME BUT WHEN I CALL THE SAME VIEW FROM ANY OTHER VIEW IT WON'T OPEN THE DIALOG UNTIL I RELOAD

 

 

//////////////// below is my code to open the dialog

 

 

var cmpEmpChart = sap.ui.view({viewName:"myApp.uplan.view.CompareEmpChart",type:sap.ui.core.mvc.ViewType.XML});

     

 

if(typeof dialog === "undefined") {

            dialog = new sap.m.Dialog({

                 id : "idCustomDialog",

                 showHeader:false,

                 contentWidth : Math.round(window.screen.availWidth * 1) +"px" ,

                 contentHeight : Math.round(window.screen.availHeight * 1) +"px",

                 content : cmpEmpChart,

                 endButton: new sap.m.Button({

                     text: 'Close',

                     type:"Reject",

                     press: function () {

                         that.getView().getModel('emp').refresh();

                         compareEmp = { };

                         sap.ui.getCore().byId("lb2").rerender();

                         that.renderItems();

                         dialog.close();

                 }

             }),

            });

            that.getView().addDependent(dialog);

       }

       //dialog.addStyleClass('hideHeader');

       dialog.open();


Viewing all articles
Browse latest Browse all 3184

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>