Skip to Content

Some component can't get the global data.

Apr 12, 2017 at 06:26 AM


avatar image

I've met an issue like mentioned. In a short word, the component I embedded in my view can't access the global data who has set by the component, but I have to read it from Core and set to this view. Every thing works.

I've tried to test the component in another view, it works well. I can't see the big difference between two views. Both of them are xml view and controller is just extends from sap/ui/core/mvc/Controller

Any idea? The view is embedded to another view, is that might be an issue?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Srikanth KV Apr 12, 2017 at 04:03 PM

Check this

When you use 'Component' based approach then any data attached to 'sap.ui.core' is not accesible (seems like a design approach). Possible reason for this design could be that all FIORI applications are component based and if there are multiple FIORI tiles....each tile represents a Component/application, in this case storing the model on each Component is better instead of Global(sap.ui.core) as it might lead to inconsistencies.

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Dear KV,

Thanks for your response, But in my observation, looks it's just can't access in sometimes. We have embedded many components developed by another team. Most of them are works well except this one. Even the component who we met issues in data binding in ViewB, it works well in another ViewA.

I've tried to let both ViewA and B use same control but the results are still different. May you have some guidance on how to find the difference with more details?


BTW, The "component" I mentioned in previous is a thing extends from sap.ui.core.Control instead of core.UIComponent.

Scar Ai
Apr 14, 2017 at 08:22 AM

The root cause is if the view is inside a component, it can't access the global data. Try to load those datas to the view in component.js solved it

10 |10000 characters needed characters left characters exceeded