cancel
Showing results for 
Search instead for 
Did you mean: 

SplitApp Routing and Views Error in Manifest.json

dn5_abaper
Participant

Hello SAP !!!

I have developed an simple "SplitApp" the Master-Detail. After converting View(s) instance from Component.js (in creatContent method () ) to manifest.json, I am not able to set or configure the views in routing. Even I am not able to see any error also in Console.

Please give a look to the below screen shots.

Thanks in advance 🙂

<!Doctype html>
<html>
	<head>
		<title>Wow Fiori</title>
		<script src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js"
		        data-sap-ui-libs="sap.m"
		        data-sap-ui-theme="sap_bluecrystal"
		        data-sap-ui-bindingSyntax="complex"
		        data-sap-ui-resourceRoots='{ "thala":"./" }'></script>
		<script>
		    sap.ui.getCore().attachInit(function(){
	         var ComponentContainer = new sap.ui.core.ComponentContainer({
	         	name: "thala"
	         }).placeAt("content");
		    });
		</script>
	</head>
	<body class="sapUiBody" id="content">
		
	</body>
</html>
sap.ui.define(
	["sap/ui/core/UIComponent"],
	function(UIComponent) {
		"use strict";
		return UIComponent.extend("thala.Component", {
			metadata: {
				manifest: "json"
			},
			Init: function() {
				// call the init function of the parent
				UIComponent.prototype.init.apply(this, arguments);
				// create the views based on the url/hash
				this.getRouter().initialize();


			},
			// createContent: function() {
			// 	var oApp = new sap.ui.view("idAppView", {
			// 		viewName: "thala.view.App",
			// 		type: sap.ui.core.mvc.ViewType.XML
			// 	});


			// 	var oView1 = new sap.ui.view("idView1", {
			// 		viewName: "thala.view.View1",
			// 		type: sap.ui.core.mvc.ViewType.XML
			// 	});


			// 	var oView2 = new sap.ui.view("idView2", {
			// 		viewName: "thala.view.View2",
			// 		type: sap.ui.core.mvc.ViewType.XML
			// 	});


			// 	var oView3 = new sap.ui.view("idView3", {
			// 		viewName: "thala.view.View3",
			// 		type: sap.ui.core.mvc.ViewType.XML
			// 	});


			// 	var oMain = oApp.byId("idApp");
			// 	oMain.addMasterPage(oView1).addDetailPage(oView2).addDetailPage(oView3);
			// 	// oMain.addPage(oView1).addPage(oView2);


			// 	return oApp;
			// 	// return {};
			// },
			destroy: function() {


			}
		});
	});
{
	"_version": "1.7.0",
	"sap.ui": {
		"technology": "UI5",
		"deviceTypes": {
			"desktop": true,
			"tablet": true,
			"phone": true
		},
		"supportedThemes": ["sap_hcb", "sap_belize"],
		"icons": {
			"icon": "sap-icon://accept"
		}
	},
	"sap.ui5": {
		"rootView": {
			"viewName": "thala.view.App",
			"id": "idApp",
			"type": "XML"
		},
		"dependencies": {
			"minUI5Version": "1.30.0",
			"libs": {
				"sap.m": {},
				"sap.ui.layout": {}
			}
		},
		"contentDensities": {
			"compact": true,
			"cozy": true
		},
		"models": {
			"i18n": {
				"type": "sap.ui.model.resource.ResourceModel",
				"settings": {
					"bundleName": "thala.i18n.i18n"
				}
			}
		},
		"routing": {
			"config": {
				"routerClass": "sap.m.routing.Router",
				"viewPath": "thala.view",
				"viewType": "XML",
				"controlId": "idApp",
				"controlAggregation": "pages"
			},
			"routes": [{
				"pattern": "",
				"name": "masterDetail",
				"target": ["tMaster", "tDetail"]
			}],
			"targets": {
				"tMaster": {
					"viewName": "View1",
					"viewType": "XML",
					"viewLevel": 1,
					"viewId": "idView1",
					"controlAggregation": "masterPages"
				},
				"tDetail": {
					"viewName": "View2",
					"viewType": "XML",
					"viewLevel": 2,
					"viewId": "idView2",
					"controlAggregation": "detailPages"
				}
			}
		},
		"resources": {
			"css": [{
				"uri": "css/style.css"
			}]
		}
	},
	"sap.app": {
		"id": "thala",
		"type": "application",
		"i18n": "i18n/i18n.properties",
		"applicationVersion": {
			"version": "1.0.0"
		},
		"title": "{{appTitle}}",
		"description": "{{appDesc}}",
		"tags": {
			"keywords": []
		},
		"ach": "FI-AA"
	}
}
***************************(App View)******************************************
<mvc:View xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m" controllerName="thala.controller.App"
	xmlns:html="http://www.w3.org/1999/xhtml">
	<SplitApp id="idApp"></SplitApp>
</mvc:View>


**************************(Master View)*********************************

<mvc:View xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m" controllerName="thala.controller.View1"
	xmlns:html="http://www.w3.org/1999/xhtml">
	<Page title="View1">
		<headerContent>
			<Button icon="sap-icon://action" press="onShowMe"/>
		</headerContent>
		<content>
			<SearchField id="idSearch" search="onSearch"></SearchField>
			<List id="idList" updateFinished="onListUpdate" items="{/fruits}" selectionChange="onItemPress" mode="SingleSelectMaster">
				<items>
					<ObjectListItem title="{name}" intro="{type}" number="{price}" numberUnit="unit" icon="{img}"></ObjectListItem>
				</items>
			</List>
		</content>
		<footer>
			<Toolbar>
				<ToolbarSpacer/>
				<Button icon="sap-icon://filter" press="onFilter"></Button>
			</Toolbar>
		</footer>
	</Page>
</mvc:View>


***********************(Detail)***********************************************

<mvc:View xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc" xmlns:form="sap.ui.layout.form"         xmlns="sap.m" controllerName="thala.controller.View2" xmlns:html="http://www.w3.org/1999/xhtml">      <Page title="View2">
   <content>
<ObjectHeader id="idHeader" title="{name}" intro="{type}" icon="{img}" number="{price}" numberUnit="{unit}"></ObjectHeader>
	<IconTabBar>
         	<items>
	<IconTabFilter text="Additional Info" id="idAi" icon="sap-icon://tags" iconColor="Negative">
		<content>
			<form:SimpleForm editable="true" layout="ResponsiveGridLayout">
								<core:Title text="Additional Data"/>
								<Label text="Type"></Label>
								<Text text="{type}"></Text>
								<Label text="Price"></Label>
								<Text text="{price} {unit}"></Text>
			</form:SimpleForm>
	</content>
	</IconTabFilter>
	<IconTabFilter text="Suppliers" id="idSupp" icon="sap-icon://supplier" iconColor="Contrast">
            <content>
	<Table items="{/suppliers}" id="idSuppTab" select="onListPress" mode="SingleSelectMaster">
         	<items>
			<ColumnListItem type="Navigation">
				<cells>
				<Text text="{name}"/>
	<Input id="idCityDrop" value="{city}" showValueHelp="true" valueHelpRequest="onValueHelp"/>
			<Text text="{since}"/>
           <ObjectStatus text="{status}" state="{path: 'status', formatter: '.formatter.setStatus'}"></ObjectStatus>
		</cells>
	         	</ColumnListItem>
				</items>
				<columns>
				<Column>
				<header>
				<Label text="Name"></Label>
				</header>
				</Column>
				<Column>
				<header>
				<Label text="City"></Label>
				</header>
				</Column>
				<Column minScreenWidth="Tablet">
				<header>
				<Label text="Since"></Label>
				</header>
			        </Column>
		<Column popinDisplay="WithoutHeader" demandPopin="true" minScreenWidth="Tablet">
			<header>
			<Label text="Status"></Label>
	                  </header>
				</Column>
				</columns>
				</Table>
				</content>
				</IconTabFilter>
	<IconTabFilter text="Select City" id="idCity" icon="sap-icon://home" iconColor="Critical">
			<content>
			<Select items="{/city}">
				<items>
		<core:ListItem text="{cityName}" key="{cityName}"/>
				</items>
		</Select>
			<ComboBox items="{/city}">
			       <items>
		<core:ListItem text="{cityName}" key="{cityName}"/>
			      </items>
			</ComboBox>
			<MultiComboBox items="{/city}">
			      <items>
		<core:ListItem text="{cityName}" key="{cityName}"/>
			     </items>
		</MultiComboBox>
		</content>
		</IconTabFilter>
<IconTabFilter id="idAddress" text="Address" icon="sap-icon://target-group" iconColor="Critical">
		<content>
		<core:Fragment fragmentName="thala.fragment.Address" type="XML"></core:Fragment>
		<core:Fragment fragmentName="thala.fragment.Address" type="XML"></core:Fragment>
		</content>
		</IconTabFilter>
		</items>
		</IconTabBar>
		</content>
		<footer>
			<Toolbar>
				<ToolbarSpacer/>
				<Button text="Approve" type="Accept" press="onApprove"/>
				<Button text="Reject" type="Reject" press="onReject"/>
			</Toolbar>
		</footer>
	</Page>
</mvc:View>


Accepted Solutions (0)

Answers (0)