cancel
Showing results for 
Search instead for 
Did you mean: 

Implement Splitapp in Webide

Former Member
0 Kudos
137

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

Accepted Solutions (1)

Accepted Solutions (1)

D_Chia
Active Participant
0 Kudos

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

Former Member
0 Kudos

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

D_Chia
Active Participant
0 Kudos

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


Former Member
0 Kudos

Thanks a ton, it resolved the issue. You rock!!!

Answers (1)

Answers (1)

amarnath_kathi
Active Contributor
0 Kudos

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!

Former Member
0 Kudos

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