cancel
Showing results for 
Search instead for 
Did you mean: 

Uncaught reference error: oBundle is not defined

prkash_s
Participant
0 Kudos

Hello,

I am creating a poworklist app using sap hana studio. when i try to run the url, am getting the following error.

"Uncaught Reference Error : oBundle is not defined".

This might be a basic question but am new to hana. Please guide me.

Thank you,

Prakash

Accepted Solutions (0)

Answers (2)

Answers (2)

draschke
Active Contributor
0 Kudos

I've the same problem.

I'm trying the SAP-Tutorial and get the same problem. "oBundle is not defined".

createContent : function(oController) {

var myButton = new sap.ui.commons.Button("btn");

myButton.setText(oBundle.getText("helloworld"));

myButton.attachPress(function(){$("#btn").fadeOut();});

return myButton;

}

"Uncaught Reference Error : oBundle is not defined".

Tutorial: Create a Hello-World SAP UI5 Application - SAP HANA Developer Guide for SAP HANA Studio - ...

@David: There is nothing said, that the oBundle is to initialize before. I don't think I've to do it.

Thanks for your help.

Okay, now i think there is a mistake in the tutorial.

Maybe it should be: myButton.setText("helloworld");

Message was edited by: Dirk Raschke

Former Member
0 Kudos

Hi Prakash,

The problem appears to be with your use of SAP UI5.  From the code snipet visible in your screen capture, it seems like the variable oBundle is undefined and that it is supposed to be a resource bundle.  To correct this, you need to define initialize oBundle with code similar to the following:


var oBundle = jQuery.sap.resources({

  url : "resources/message_bundle.properties",

  locale : sap.ui.getCore().getConfiguration().getLanguage()

  });

Hope this helps.

David