on 07-03-2015 7:30 AM
Hi,
I met a problem about setting routing the manifest.json file for SplitApp.
Following is my code.
"routing": {
"config": {
"routerClass": "sap.m.routing.Router",
"viewType": "XML",
"viewPath": "***.ui.demo.view",
"controlId": "splitApp",
"controlAggregation": ??? // how could i set this value, if the control including two aggregations. such as detailPages and masterPages.
"transition": "slide"
},
"routes": [
{
"pattern": "",
"name": "appHome",
"target": "home",
"targetAggregation" : "detailPages"
},
{
"pattern": "",
"name": "appMasterHome",
"target": "masterHome",
"targetAggregation" : "masterPages"
}
],
"targets": {
"home": {
"viewName": "Home",
"viewLevel": 1
},
"masterHome": {
"viewName": "Home",
"viewLevel": 1
}
}
}
Hope some one could help me to solve it.
Thank you very much.
at the routes:
"routes": [{
"pattern": "",
"name": "master",
"target": ["detail", "master"]
}, {
"pattern": "URL/{objectId}",
"name": "detail",
"target": ["master", "detail"]
}
]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey,
That did not work for me. Here is my router json code:
"routing": {
"config": {
"routerClass": "sap.m.routing.Router",
"viewType": "XML",
"viewPath": "sap.ui.demo.wt.view",
"controlId": "app",
"controlAggregation": "pages",
"transition": "slide",
"bypassed": {
"target": "notFound"
}
},
"routes": [{
"pattern": "",
"name": "appHome",
"target": "home"
},
{
"pattern": "sample",
"name": "appSample",
"target": "sample"
},
{
"pattern": "splitpage",
"name": "appsplitpage",
"target": "splitpage"
}],
"targets": {
"home": {
"viewName": "Home",
"viewLevel" : 1
},
"sample": {
"viewName": "Sample",
"viewLevel" : 2
},
"splitpage": {
"viewName": "Splitpage",
"viewLevel" : 3,
"controlAggregation": "detailPages"
},
"notFound": {
"viewName": "NotFound",
"transition": "show"
}
}
}
And Splitpage.view.xml is here :
<mvc:View
xmlns:mvc="sap.ui.core.mvc"
xmlns:custom="http://schemas.sap.com/sapui5/extension/sap.ui.core.CustomData/1"
controllerName="sap.ui.demo.wt.controller.Splitpage"
xmlns="sap.m">
<!-- <Page title="Welcome from Sample View" class="sapUiResponsiveContentPadding" showNavButton="true"> -->
<SplitApp id="SplitAppDemo" initialDetail="detail" initialMaster="master" orientationChange="onOrientationChange">
<detailPages>
<Page id="detail" title="Detail 1" class="sapUiStdPage">
<content>
<Label text="Detail page 1" />
<Button text="Go to Detail page2" press="onPressNavToDetail" />
</content>
</Page>
<Page id="detailDetail" title="Detail Detail" class="sapUiStdPage" showNavButton="true"
navButtonText="Back" navButtonPress="onPressDetailBack">
<content>
<VBox class="sapUiSmallMargin">
<Label text="This is Detail Page2" />
<Text text="Here you could change the Split Application mode. After the mode change, resize the browser window to see the difference in the master form behaviour." />
<RadioButtonGroup columns="1" width="500px" class="sapUiMediumMarginBottom" select="onPressModeBtn">
<buttons>
<RadioButton id="RB1-1" text="show/hide" selected="true" custom:splitAppMode="ShowHideMode" />
<RadioButton id="RB1-2" text="stretch/compress" custom:splitAppMode="StretchCompressMode" />
<RadioButton id="RB1-3" text="hide" custom:splitAppMode="HideMode" />
<RadioButton id="RB1-4" text="popover" custom:splitAppMode="PopoverMode" />
</buttons>
</RadioButtonGroup>
</VBox>
</content>
</Page>
<Page id="detail2" title="Detail 3 Page" class="sapUiStdPage" showNavButton="true"
navButtonText="Back" navButtonPress="onPressDetailBack">
<content>
<Label text="This is Detail Page3" />
<Input/>
<Label text="Label 2" />
<Input/>
<Label text="Label 3" />
<Input/>
<Label text="Label 4" />
<Input/>
<Label text="Label 5" />
<Input/>
</content>
</Page>
</detailPages>
<masterPages>
<Page id="master" title="Master 1" icon="sap-icon://action" class="sapUiStdPage">
<content>
<List>
<items>
<StandardListItem title="To Master2" type="Navigation" press="onPressGoToMaster"/>
</items>
</List>
</content>
</Page>
<Page id="master2" title="Master 2" icon="sap-icon://action" class="sapUiStdPage" showNavButton="true"
navButtonPress="onPressMasterBack">
<content>
<List itemPress="onListItemPress">
<items>
<StandardListItem title="To Detail 1" type="Active" custom:to="detail"/>
<StandardListItem title="To Detail 2" type="Active" custom:to="detailDetail"/>
<StandardListItem title="To Detail 3" type="Active" custom:to="detail2"/>
</items>
</List>
</content>
</Page>
</masterPages>
</SplitApp>
<!-- </Page> -->
</mvc:View>
I get this error message while opening splitpage.
If I comment out <Page></Page> tag, it works but thats not my actual goal.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Did you get a solution?
Thanks & regards,
Satya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The answer is in my post above your question.
You specify the default aggregation (e.g. detailPages for a SplitApp control) in the manifest. This should be the aggregation which shall contain most of the pages of your app.
Within the individual target you can then override this default setting.
"targets": {
"Links": {
"viewName": "Links",
"controlAggregation": "masterPages"
}
}
Hi Frank,
Thanks for your reply,
My confusion is
///////////////////////////////
"config": {
"routerClass": "sap.m.routing.Router",
"viewType": "XML",
"viewPath": "***.ui.demo.view",
"controlId": "splitApp",
"controlAggregation": ???
"transition": "slide"
},
////////////////////////////////
is there any specific values are available for "controlAggregation" like pages, detailPages ? If yes, can you explain what are those?
And how can I configure master page and detail page to splitapp controlId in manifest file?
Thanks,
Satya
Maybe this will answer your question?
config
This section contains the global router configuration and default values that apply for all routes and targets. [...] All parameters of the config section can be overruled in the individual route and target definitions if needed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Did you find a solution ?
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.