Using the SAP Web IDE I have created a new application from a Master/Detail template. The application works with the views that where created initially. Now i am trying to add another view called "FileDetail" to load into the detail window. I have added the view to the routes:
routing: {
config: {
routerClass: FileUtility.MyRouter,
viewType: "XML",
viewPath: "FileUtility.view",
targetAggregation: "detailPages",
clearTarget: false
},
routes: [
{
pattern: "",
name: "main",
view: "Master",
targetAggregation: "masterPages",
targetControl: "idAppControl",
subroutes: [
{
pattern: "{file}",
name: "fileDetail",
view: "FileDetail"
},
{
pattern: "{entity}/:tab:",
name: "detail",
view: "Detail",
subroutes: [
]
}
]
},
{
name: "catchallMaster",
view: "Master",
targetAggregation: "masterPages",
targetControl: "idAppControl",
subroutes: [
{
pattern: ":all*:",
name: "catchallDetail",
view: "NotFound",
transition: "show"
}
]
}
]
}
} ( I know this is not right but im just trying to force it to load the page ) When I the function
onFileSelect: function(oEvent) {
this.getRouter().navTo("fileDetail", {
from : "detail",
file: oEvent.getSource().getBindingContext().getPath().slice(1)
}, true);
},
is called I get an error in the JS console
Uncaught Error: failed to load 'view/FileDetail.controller.js' from resources/view/FileDetail.controller.js: 404 - Resource could not be found!
The only files i added where the FileDetail.controller.js and the FileDetail.view.xml and they where added with the new view wizard
Thanks for your help!