I am trying to define a global model in one of my controllers and then trying to get its value in some XML Views but I don't know why it doesn't show up.
Controller :
sap.ui.getCore().setModel(oModelo, "miModelo");
View :
<Text id="selectiona"
class="selectiona"
text="{= ${miModelo>/miSelectiona}.length > 0 ? 'Selected:' + ${miModelo>/miSelectiona} : ''}"
/>
P.S: it works when I s set the model like this:
this.byId("selectiona").setModel(oModelo,"miModelo");
But I need to define it globally. Is there any way I can do that?