Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2106

Error: failed to load 'sap/ui/unified/Calendar.js'

$
0
0

Hi Experts,

I am trying to create a Calendar View(sap.ui.unified.Calendar) using XML View Type and onPress Event(Controller of the Main View) of a Standard Tile.

But i am getting the error

Error: failed to load 'sap/ui/unified/Calendar.js' from resources/sap/ui/unified/Calendar.js: 404 - Not Found

Note: First Page is the Main View and the Calendar View is the Second view fired on OnPress Event,

 

Code: NewTicket.view.xml

<mvc:View

     height="100%"

     controllerName=App.NewTicket"

  xmlns:l="sap.ui.layout"

  xmlns:u="sap.ui.unified"

  xmlns:mvc="sap.ui.core.mvc"

  xmlns="sap.m"

  class="viewPadding">

  <l:VerticalLayout>

  <l:content>

  <u:Calendar

  id="calendar"

      intervalSelection="true" />

  <l:HorizontalLayout>

  <Label

  text="Selected From (yyyy-mm-dd):"

  class="labelMarginLeft" />

  <Text

  id="selectedDateFrom"

  text="No Date Selected"

  class="labelMarginLeft"/>

  </l:HorizontalLayout>

  <l:HorizontalLayout>

  <Label

  text="Selected To (yyyy-mm-dd):"

  class="labelMarginLeft" />

  <Text

  id="selectedDateTo"

  text="No Date Selected"

  class="labelMarginLeft"/>

  </l:HorizontalLayout>

  </l:content>

  </l:VerticalLayout>

</mvc:View>

 

Code: Main.controller.js

onPress : function (evt) {

   var page1 = sap.ui.view({id:"page1", viewName:"davey_mobile_app4.NewTicket",enableScrolling: false, type:sap.ui.core.mvc.ViewType.XML});

   app = sap.ui.getCore().byId("idMain1");     

      app.to("page1");

   app.add(page1);

 

  }

 

Code: Index.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.m,sap.ui.layout,sap.ui.unified"

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

  </script>

  <!-- only load the mobile lib "sap.m" and the "sap_mvi" theme -->

 

  <style type="text/css">     

  .myApp{

                     background: url(images/d3.png);

        background-size: 1080px 560px;

                     background-repeat: no-repeat;

                     background-size: 100% 100%;

                    

              }

            

              </style>

  <script>

   jQuery.sap.require("sap.ui.unified.Calendar");

  sap.ui.localResources("App");

  var app = new sap.m.App({initialPage:"idMain1"});

  var page = sap.ui.view({id:"idMain1", viewName:"App.Main", type:sap.ui.core.mvc.ViewType.XML});

  page.addStyleClass("myApp");

  page.showHeader = true;

  app.addPage(page);

  app.placeAt("content");

  </script>

</head>

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

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

  </body>

</html>


Viewing all articles
Browse latest Browse all 2106

Latest Images

Trending Articles



Latest Images

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