Skip to Content
0
May 02, 2020 at 05:33 PM

target & has no controlId set and no parent so the target cannot be displayed. -

748 Views

Hello All,

Can you help to check what am i doing wrong?

Here's my route definition...

		"routing": {
			"config": {
				"routerClass": "sap.m.routing.Router",
				"viewType": "XML",
				"async": true,
				"viewPath": "test.test1.view",
				"controlAggregation": "pages",
				"clearControlAggregation": false
			},
			"routes": [{
				"name": "First",
				"pattern": "First",
				"target": ["First"]
			}, {
				"name": "Credit_Hold",
				"pattern": "Credit_Hold",
				"target": ["Credit_Hold"]
			}],
			"targets": {
				"First": {
					"viewType": "XML",
					"transition": "slide",
					"clearControlAggregation": false,
					"viewId": "First",
					"viewName": "First"
				},
				"Credit_Hold": {
					"viewType": "XML",
					"viewName": "Credit_Hold"
				}
			}
		}

First View...
=============
<mvc:View xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m" xmlns:chart="sap.suite.ui.microchart" controllerName="test.test1.controller.First" height="100%" displayBlock="true">
	<Shell id="shell">
		<Page id="page" title="{i18n>title}">
			<content>
				<VBox width="100%" height="40rem">
					<chart:InteractiveDonutChart id="donut" selectionEnabled="true" selectionChanged="action" 
						press="action" xmlns:action="http://schemas.sap.com/sapui5/extension/sap.ui.core.CustomData/1" action:wiring="\{'selectionChanged':\{'navigation':\{'routeName':'Credit_Hold'\}\}\}">
					</chart:InteractiveDonutChart>
				</VBox>
			</content>
		</Page>
	</Shell>
</mvc:View>

Credit_Hold View
===============
<mvc:View 
	controllerName="test.test1.controller.Credit_Hold"
	xmlns:core="sap.ui.core" 
	xmlns:mvc="sap.ui.core.mvc" 
	xmlns:sfb="sap.ui.comp.smartfilterbar"
	xmlns:st="sap.ui.comp.smarttable"
	xmlns="sap.m"
	height="100%">
	<Page title="Title" showNavButton="true" navButtonPress="onNavBack">
		<content>
			<sfb:SmartFilterBar id="smartFilterBar" persistencyKey="UniqueAndStablePersistencyKey"
				considerSelectionVariants="true" entitySet="zefd_credit_holds" enableBasicSearch="true" basicSearchFieldName="Customer">
				<!-- layout data used to make the table growing but the filter bar fixed -->
				<sfb:layoutData>
					<FlexItemData shrinkFactor="0"/>
				</sfb:layoutData>
			</sfb:SmartFilterBar>
	
			<st:SmartTable id="smartTable" entitySet="zefd_credit_holds" smartFilterId="smartFilterBar" tableType="Table"
				useExportToExcel="true" useVariantManagement="false" useTablePersonalisation="true" header="Line Items" showRowCount="true">
				<st:layoutData>
					<FlexItemData growFactor="1" baseSize="0%"/>
				</st:layoutData>
			</st:SmartTable>
		</content>
	</Page>
</mvc:View>