on 05-03-2017 10:50 AM
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?
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.