Andy Parker
Posts: 0
Joined: Wed Mar 27, 2013 10:21 am

generic service not passing data to grid component

Hi,

I have created a generic service to read strings from local storage and return these to fill a grid component that has several labels per row.

Below are screen shots that show the mappings, service parameters and the javascript implementation.

The problem I have is that there is no data shown on the grid. I suspect there is something wrong with the way my javascript is passing data as the grid is linked to the array mapping.
Can you help please?

Image Image Image

Oleg Danchenkov
Posts: 0
Joined: Tue Apr 30, 2013 5:51 pm

generic service not passing data to grid component

Hi Andy.
I don't see in your code where do you send an array to success function.

Andy Parker
Posts: 0
Joined: Wed Mar 27, 2013 10:21 am

generic service not passing data to grid component

Ah, then that might be the issue.

As there doesn't seem to be an example for passing arrays, I presumed that I just had to loop the code for each set.

So, are you saying that the settings.success should only be called once, and contain all of the array data in one go?

Andy Parker
Posts: 0
Joined: Wed Mar 27, 2013 10:21 am

generic service not passing data to grid component

thanks Oleg, code is now working perfectly.

Just as an example for anyone else struggling with this, here's the code I used for the generic service:
Image

Oleg Danchenkov
Posts: 0
Joined: Tue Apr 30, 2013 5:51 pm

generic service not passing data to grid component

Thanks for sharing.

Return to “Issues”