Skip to Content
avatar image
Former Member

Some component can't get the global data.

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?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Apr 12, 2017 at 04:03 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

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

  • avatar image
    Former Member
    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

    Add comment
    10|10000 characters needed characters exceeded