Skip to Content
0

How to make a oData model accessible in all the views of an UI5 App

Nov 16, 2016 at 12:40 AM

47

avatar image

Hello All,

I have defined the oData model in the Manifest file of the Application.

I have built a Master-Detial application.

The model is available in the Master View but not in the Detail view.

this.getView().getModel() in the Detail View Controller returns undefined.

How to make the model accessible in all the views of the App?

Cheers,

Sunil

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

1 Answer

Best Answer
Jun Wu Nov 16, 2016 at 02:11 AM
1

if you define the model in manifest, you should be able to get it everywhere.

maybe timing issue.

did u try this.getOwnerComponent().getModel()

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

Yeah Jun Wu, the actual issue is with the oData service association cardinality. On correcting it the data after binding to an element is available in the view.

Appreciate your help.

0