Skip to Content
0

ststart not getting called within new ui5 component

May 03, 2017 at 09:50 AM

46

avatar image
Former Member

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?

component.png (41.0 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers