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

Uncaught TypeError: Cannot read property 'setVisible' of undefined

$
0
0

Im fairly new to SAPUI5 and when I click on button I get the error in the title what I did in Is I used the SAP web IDE to create new MVC project .

in the main view JS I put

createContent : function(oController) {

var btn = new sap.m.Button({ id:"myBtn", text : "Content Button" }); return new sap.m.Page({ title: "TitleT", content: [ btn ] }); 

}

in the Main controller JS I put the following code

onInit: function() { var that = this; window.setTimeout(function() { that.byId("myBtn").setVisible(true); }, Math.random() * 10000); }, onPress: function() { this.byId("pressMeButton").setText("I got pressed");

Viewing all articles
Browse latest Browse all 8392

Trending Articles



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