Hi,
In the Component.js I trigger an OData call and bind the response to the component.
I can see the model in the view (view.getModel() - mOdata) but there is no binding context (view.getBindingContext() - undefined).
The the view bound elements are not getting the data bound:
e.g. in Icon Tab Filter:
<IconTabFilter showAll="true" count="{NumberOfItems}" text="{NumberOfItemsDescription}" key="All" />
If I do it in the controller and I bind the result in the view it works, I have both.
Controller:
this.getView().bindElement("/ScenarioSet('" + scenarioId + "')");
Component.js - init()
// Read oModel.read( "/ScenarioSet('" + scenarioId + "')", { success: function(oDataStep, oResponse) { // Set the Scenario oModel.setProperty("/ScenarioSet('" + scenarioId + "')", oDataStep); } } ); this.setModel(oModel);
How do I make it work like if it was in the controller?
Thanks!
Regards,
Serge.