on 07-24-2016 3:57 PM
Hi Friends,
I'm new to the world of SAPUI5. I'm trying to simulate the master-detail template using SplitApp in webide. But I'm even unable to achieve the first step - I'm unable to make the SplitApp container work. I mean the container shows a page like below -
But it's not using my Master and detail pages, I believe this is just the default structure of SplitApp.
For testing I put some content in the master and detail pages, but they are not appearing.
This is the file structure:
I'm attaching the manifest.json code in notepad.
I know it's too much to ask, but I'll be really grateful if you help me resolve this. I have found many examples of using SplitApp in google, but they all are using Javascript view in Eclipse. I need to do it in webide with XML view.
Thanks,
Sarif
since you did not provide the App.view.xml source, i cannot confirm what the id for the <SplitApp id="???"/> tag is. make sure it corresponds to the 'controlId' property value you set for the router as below:-
"routing": {
"config": {
"routerClass": "sap.m.routing.Router",
"viewType": "XML",
"viewPath": "com.md1.view",
"controlId": "idAppControl",
...
...
also check if you have initialize() the Router in 'init' method of Component.js
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi D. Cia,
Thanks for the response.
I've already maintained the same SpliApp id in App view but I didn't initialize() the Router in 'init' method of Component.js. The Init method is looks like this:
init : function () {
UIComponent.prototype.init.apply(this, arguments);
}
Do you think that could be the problem?
Thanks,
Sarif
yes, once the router instance is created by the UIComponent (after it setup the routes defined in the routing metadata) you need to call initialize() to attach the router to the hash changer
in the 'init' method of Component.js, add the following:-
this._router = this.getRouter(); // set to a Component property for use later
this._router.initialize(); // initialize the router
OR
this.getRouter().initialize(); // if you don't mind calling complete object chain repeatedly whenever u want to get the router instance
Manifest.json looks good, As Chia mentioned you need to have the App.xml code also,
Make sure the App.XML has this ID maintained.
check the below code.
<mvc:View controllerName="com.md1.app"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:mvc="sap.ui.core.mvc"
xmlns="sap.m">
<SplitApp id="idAppControl">
</SplitApp>
</mvc:View>
Hope this will solve your problem.
thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amar,
Thanks for the response. I've already maintained the same SpliApp id in App view:
<mvc:View
xmlns:core="sap.ui.core"
xmlns:mvc="sap.ui.core.mvc"
xmlns="sap.m"
controllerName="com.md1.controller.App"
xmlns:html="http://www.w3.org/1999/xhtml">
<SplitApp id = "idAppControl"/>
</mvc:View>
Also in debugger I cannot see any error message. Do you think there may be some other issue?
Thanks,
Sarif
User | Count |
---|---|
89 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.