0
votes

While creating a simple MVC app with xmlviews in OpenUI5, i have run into an error.

I load OpenUI5 as it is mentioned in their getting started guide:

<script id='sap-ui-bootstrap' type='text/javascript'
    src='https://openui5.hana.ondemand.com/resources/sap-ui-core.js'
    data-sap-ui-theme='sap_bluecrystal'
    data-sap-ui-libs='sap.m'>
</script>

Then load an xmlview:

var starterPage = sap.ui.xmlview("starterPage");

My problem is that when I include a DateTimeInput in my starterPage xmlview the loading fails with the following:

Error: found in negative cache: 'sap/m/DateTimeInput.js' from https://openui5.hana.ondemand.com/resources/sap/m/library-preload.json/sap/m/DateTimeInput.js: Error: failed to load 'sap/ui/thirdparty/mobiscroll/js/mobiscroll-core.js' from ./sap/ui/thirdparty/mobiscroll/js/mobiscroll-core.js: 0 - NS_ERROR_DOM_BAD_URI: Access to restricted URI denied

Does anybody have an idea?

Thanks!

2

2 Answers

2
votes

I think there is either something wrong with your view definition, or possibly your network permissions. I created a simple jsbin example (http://jsbin.com/kukoju/1/edit?html,console,output) that I think does essentially what you described and it seems to work fine for me. In attempting to simplify the problem I omitted the use of the XML view and simply directly instantiated the DateTimeInput in javascript. If my jsbin example works for you then I'd recommend you post more of your code so we can see what might need to be changed. If that doesn't work then I suspect you need a local system administrator to help you with the problem.

0
votes

If you run a simple Openui5 probably it has just a controller. The mentioned error happens when you tried to use a third party library and it's not implemented correctly. just check out the controller files be sure that there is no third party library included. Or The DateTimeInput what you used has a dependency and the dependency files are not found. May could be better to use this control https://openui5.hana.ondemand.com/#/api/sap.m.DateTimeField