フォルダー "view" からビューを読み込もうとすると、"resource view/View1.view.xml could not load from resources/view/View1.view.xml" というエラーが表示されます。WebIDE のフォルダ構成は下図のようになっています。
index.html
<!DOCTYPE HTML>
<html>
<head>
<script id="sap-ui-bootstrap"
src="resources/sap-ui-core.js"
data-sap-ui-libs="sap.m"
data-sap-ui-theme="sap_bluecrystal" >
</script>
<script>
sap.ui.localResources("webapp");
var app = new sap.m.App("idApp");
var view1 = sap.ui.view({id:"idView1",
viewName:"view.View1",type:sap.ui.core.mvc.ViewType.XML});
</script>
</head>
<body class="sapUiBody" role="application">
<div id="content" ></div>
</body>
</html>
View1.xml
<mvc:View
xmlns="sap.m"
xmlns:mvc="sap.ui.core.mvc">
<Text id="idbtn" text="Text from" />
</mvc:View>
View1.コントローラー
sap.ui.define([
"sap/ui/core/mvc/Controller"
], function(Controller) {
"use strict";
return Controller.extend("View1");
});
neo-app.json
{
"routes": [
{
"path": "/webapp/resources",
"target": {
"type": "service",
"name": "sapui5",
"entryPath": "/resources"
},
"description": "SAPUI5 Resources"
}
]
}
いくつかの方法を試しましたが、View1.xml を指す方法が見つかりませんでした
前もってありがとう、スリニ。