Quarenta
Posts: 0
Joined: Tue Apr 15, 2014 12:36 pm

TypeError: context is undefined, when mapping service response

Hello. I found the source of the problem.

When you do the mapping with a response array of data, you must first bind the array to the component that it is to repeat( ex. a mobilelistitem in my case ), and just then bind the properties of the array to the properties of the UI component.

If this order is not respected, then at runtime, when mapping, i guess that before even creating the mobilelistitem, appery.js will try to map first to the properties of the inexistent mobilelistitem, and will originate the "TypeError: context is undefined" error.

Hope that this helps others with the same problem.

Employers, please add this to the documentation or correct the order of mapping at runtime.

Thanks.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

TypeError: context is undefined, when mapping service response

Hi Quarenta!

Thank you for posting this!

I have good news. We release a new model of mapping in September, there this issue won't occur.

Return to “Issues”