Skip to Content
0

Some component can't get the global data.

Apr 12, 2017 at 06:26 AM

51

avatar image
Former Member

I've met an issue like https://archive.sap.com/discussions/thread/3665787 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
0

Check this https://answers.sap.com/questions/135860/binding-no-working-when-use-rounting.html?childToView=137168#answer-137168

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
Former Member

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?

0
Former Member

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

0
avatar image
Former Member
Apr 14, 2017 at 08:22 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded