Page 2 of 2

TypeError: context is undefined, when mapping service response

Posted: Wed Aug 20, 2014 10:45 am
by Quarenta

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.


TypeError: context is undefined, when mapping service response

Posted: Wed Aug 20, 2014 11:26 am
by Kateryna Grynko

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.