Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

getView().getModel() getting undefined

Hi All, I am trying to bind the elements with my json Object. Firstly i have created an Array of Object and set this object in this.getView() using: newArray.push({'startdate': '20-08-2015', 'end_date':'20-09-2015'}); var model =  new JSONModel(); model.setData(customObject);         this.getView().setModel(newArray,'project'); this.getView().bindElement('/project/0'); I am not able to bind the data object with my xml view. I think the problem is with model, when i am trying to console(this.getView().getModel()), it is giving me undefined. I am not able to find out where to set the model in the controller so that i can bind the object with xml. Regards, Harsh Jain

Former Member
Not what you were looking for? View more on this topic or Ask a question