Quantcast
Channel: SCN : All Content - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 6178

Bind model into OverlayContainer

$
0
0

Hi UI5-GURU,

I need a help for this development:

 

var overlay = new sap.ui.ux3.OverlayContainer({

       openButtonVisible: false

      });

 

 

var newsdata =
       {"Data":"14102014",
       "Title":"prova1410",
       "Thumbnail":null,
       "Attachments":[],
       "LinkEsterni":[],
       "Body":"<h1>Test</h1><b>This is a test for SAPUI5</b>"
       };
      var html =  '<template>' +
             '<div data-sap-ui-type="sap.ui.core.Title"  data-text="{Title}"></div>' +
             '<div data-sap-ui-type="sap.ui.commons.Text"   data-value="{Body}"></div>' +
       +'</template>';

    
           
      var fnOpenPopup = function(oControlEvent) {
        
         var oiframecontent = new sap.ui.core.HTML({preferDOM:true,
                           content:html});
        
         
         var oModel = new sap.ui.model.json.JSONModel();
         oModel.setData(newsdata);
         oiframecontent.setModel(oModel); 
         overlay.removeAllContent();
         overlay.addContent(oiframecontent);
         overlay.setModel(oModel); 
         overlay.open();
      };

 

 

When try it, the "overlay" is open but the content is empty...

Where is the error?

How can to bind (and view)  a JSON model into a OverlayContainer object?


Viewing all articles
Browse latest Browse all 6178

Trending Articles



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