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

OpenUI5 missing 'messagebundle_en_US.properties' file

$
0
0

I am using WAMP server for OpenUI5 development. I have tested my code in IE10, Google Chrome and Firefox. Google Chrome is giving me following error:

 

GET http://localhost/openui5-sdk-1.16.8-SNAPSHOT/resources/sap/ui/commons/messagebundle_en_US.properties 404 (Not Found)

 

Inside "resources\sap\ui\commons" when I add a new file of messagebundle_en.properties and rename it to messagebundle_en_US.properties, the error disappears. Is it a bug in OpenUI5 causing Google Chrome to behave like this?

 

demo.html

<!DOCTYPE HTML>

<html>

  <head>

  <meta http-equiv="X-UA-Compatible" content="IE=edge">

 

 

  <script src="resources/sap-ui-core.js"

  id="sap-ui-bootstrap"

  data-sap-ui-libs="sap.ui.commons"

  data-sap-ui-theme="sap_goldreflection">

  </script>

  <!-- add sap.ui.table,sap.ui.ux3 and/or other libraries to 'data-sap-ui-libs' if required -->

 

 

  <script>

  sap.ui.localResources("ui5demo");

  var view = sap.ui.view({id:"idDemoView1", viewName:"ui5demo.DemoView", type:sap.ui.core.mvc.ViewType.JS});

  view.placeAt("content");

  </script>

 

 

  </head>

  <body class="sapUiBody" role="application">

  <div id="content"></div>

  </body>

</html>

DemoView.view.js

sap.ui.jsview("ui5demo.DemoView", {

 

 

  /** Specifies the Controller belonging to this View.

  * In the case that it is not implemented, or that "null" is returned, this View does not have a Controller.

  * @memberOf ui5demo.DemoView

  */

  getControllerName : function() {

  return "ui5demo.DemoView";

  },

 

 

  /** Is initially called once after the Controller has been instantiated. It is the place where the UI is constructed.

  * Since the Controller is given to this method, its event handlers can be attached right away.

  * @memberOf ui5demo.DemoView

  */

  createContent : function(oController) {

  //Create a panel instance

  var oPanel = new sap.ui.commons.Panel({width: "400px"});

 

 

  //Set the title of the panel

  oPanel.setText("Contact Data");

 

 

  //Create a matrix layout with 2 columns

  var oMatrix = new sap.ui.commons.layout.MatrixLayout({

  layoutFixed: true,

  width: '100%',

  columns: 2

  });

  oMatrix.setWidths('100px', '200px');

 

 

  //Create a simple form within the layout

  var oLabel = new sap.ui.commons.Label({text: 'Name'});

  var oInput = new sap.ui.commons.TextField({value: 'M.Saad', width: '100%'});

  oLabel.setLabelFor(oInput);

  oMatrix.createRow(oLabel, oInput);

 

 

  oLabel = new sap.ui.commons.Label({text: 'First Name'});

  oInput = new sap.ui.commons.TextField({value: 'Siddiqui', width: '100%'});

  oLabel.setLabelFor(oInput);

  oMatrix.createRow(oLabel, oInput);

 

  // create ProgressIndicator

  var oProgressIndicator1 = new sap.ui.commons.ProgressIndicator("ProgInd1", {

  width: "100%",

  percentValue: 33,

  displayValue: "33%"

  });

 

 

  //Add the form and ProgressIndicator to the panels content area

  oPanel.addContent(oMatrix);

  oPanel.addContent(oProgressIndicator1);

 

 

  //Add some buttons to the panel header

  oPanel.addButton(new sap.ui.commons.Button({text: 'Save'}));

  oPanel.addButton(new sap.ui.commons.Button({text: 'Cancel'}));

 

 

  //Attach the panel to the page

  oPanel.placeAt("content");

  }

 

 

});


Viewing all articles
Browse latest Browse all 6178

Trending Articles



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