cancel
Showing results for 
Search instead for 
Did you mean: 

ststart not getting called within new ui5 component

Former Member
0 Kudos

Hi,

I am working on creating a UI5 component, that will be consumed Product Master Smart Template application. I am following this guide. I have mentioned the Odata service in manifest.json of UI5 component as

"dataSources": {
	"mainService": {
	"uri": "/sap/opu/odata/SAP/ZTEST_ART_HIER_SRV_01/",
	"type": "OData"
	}
}

created a default model for this data source

	"": {
		"dataSource": "mainService",
		"settings": {
			"defaultBindingMode": "TwoWay",
			"defaultCountMode": "Inline",
			"refreshAfterChange": false
		}
	}

My component.js looks something like this. As per the guide using

ReuseComponentSupport.mixInto(this, "component");

As per the guide this will product the call the ststart in which I am mainly binding my OData to fetch the data using the navigation property of the OData.

readAHHeader looks like

readAHHeader: function(oModel, oBindingContext, fnSuccess) {
	var fnError = function() {};
	oModel.read(oBindingContext.getPath() + "/to_CategoryStruc", {
			success: fnSuccess,
			error: fnError
	});
}

The XML view looks like

In my parent consuming application, I have included this component in annotation.xml, manifest.json and a component container in fragments as

<FragmentDefinition 
	xmlns="sap.ui.core"
	xmlns:m="sap.m">
	<ComponentContainer
		id="ArticleHierarchy"
		name="mdm.cmd.product.maintain.ext.ArticleHierarchy"
		
		height="100%"
		settings=""
		propagateModel="true">
	</ComponentContainer>			
</FragmentDefinition>

The call to compoent is going and fetching the XML view and metadata of service, but it does not go inside ststart which it should do by default. So I am not able to bind my OData and do a call.

Is there anything which I am missing? Or How can I fix this?

Accepted Solutions (0)

Answers (1)

Answers (1)

anam_abbas
Associate
Associate
0 Kudos

I got similar issue while trying to use reuse component via canvas from object page. Please make sure there are no unnamed models declared in the manifest.json file.