Page 1 of 1

Not able to attach javascript onto REST array directly?

Posted: Mon Jul 21, 2014 1:22 am
by geliz zhang

I know if I map an array to a list or grid it will automatically loop, but when I try to map it to a javascript code, it will always fail with an error
Uncaught TypeError: Cannot call method 'find' of undefined
Image

Feels like it's looking for a UI element but can't find it.


Not able to attach javascript onto REST array directly?

Posted: Mon Jul 21, 2014 1:59 am
by Alena Prykhodko

Hello Geliz,

Please clarify when do you get this error?


Not able to attach javascript onto REST array directly?

Posted: Mon Jul 21, 2014 7:15 pm
by geliz zhang

To duplicate this error, create a page, bind to a REST service with array in result. In the mapping page, create a javascript and drag an array to this javascript.

If I press F12 to open the javascript console, I see this error.

If I delete the mapping to this script, there is no error. If I set it again, the error will happen. Even there is only a blank line in the javascript code. The code inside the script runs ok. Looks like the error happens after the javascript execution. When the error happens, the page stops rendering for the rest data elements.


Not able to attach javascript onto REST array directly?

Posted: Tue Jul 22, 2014 12:44 am
by Yurii Orishchuk

Hi Geliz,

I've checked your usecase but can not to reproduce your issue.

Please give us your app public link and describe steps to reproduce this problem.

We will take a look.

Regards.