cancel
Showing results for 
Search instead for 
Did you mean: 

Use two models in binding path

Former Member
0 Kudos

Hi,

I was wondering if it's possible to use two models in the same binding.

I tried this:

tiles="{DB>{SETTINGS>selectedDB}/0}">

So I want to use the selected key from the SETTINGS model, to set the entityset from the DB model.

But that doesn't work... 🙂

Any ideas?

Kind regards,

Robbe

Accepted Solutions (1)

Accepted Solutions (1)

junwu
Active Contributor
Former Member
0 Kudos

thanks Jun Wu , Robbie check Jun Wu link, and ignore my solution 😛

Answers (2)

Answers (2)

karthikarjun
Active Contributor
0 Kudos

Hi Robee- I recommend you to please dont use two models for single databinding. It could be better if you could use aggreation concepts.

ex: [

{

Uname: "Robee",

Settings : [

{

DBName: "Toobee"

}

]

}

]

Former Member
0 Kudos

Hi Robbe,

I don't know whether this type of expression works or not but lets assume if this is correct than you need to check your controller code that after complete binding of the SETTINGS model than only binding of DB should be applied. On change or data received sap.ui.model.binding events on SETTINGS model binding you can bind the DB model.

Try this might be this works .

Thanks

Viplove