Skip to Content
0
Former Member
Apr 08, 2014 at 09:15 PM

How to unSet a Model bound to core?

632 Views

Hello experts,

I am setting a model on core with sap.ui.getCore().setModel(uModel, 'userModel'); when the user logs on.

But when the user logsout I wan to destroy this model and also unSet it from core.

How to do it?

Document says:

setModel(oModel, sName?) : sap.ui.core.Core

Sets or unsets a model for the given model name.

But, if I call sap.ui.getCore().setModel('userModel'); --> this is not unsetting the model, moreover I want to destroy the model itself.

Regards,

Chidan