anelezeravla
Posts: 0
Joined: Tue Oct 01, 2013 12:00 pm

After API request, empty grid displayed when turning from invisible to visible

Hello,
We have a REST service that returns a list of elements. Each of these elements is formed by a string and an image. That API REST is called upon load on a page. That page, therefore has a grid that contains a label and an image, so that each element returned by the API is mapped to the grid, the string is mapped to the label and the image is mapped to the image. The grid is at first invisible, and becomes visible when the REST service call is a success.

The thing is that every time, the first grid displayed is empty (with the default image). The elements of the list are correctly displayed below, each one in its grid, but the first one is always empty.

This problem disappears if the grid is always visible. If we don't do the not visible-visible change when API call is successful, then no empty grid appears.

Any hints on what the problem might be?

Thank you very much

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

After API request, empty grid displayed when turning from invisible to visible

Hi. What code do you use to change element's visibility?

anelezeravla
Posts: 0
Joined: Tue Oct 01, 2013 12:00 pm

After API request, empty grid displayed when turning from invisible to visible

It's the set property action. We have created an event that set property of the grid to visible=true when the API request is sucess.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

After API request, empty grid displayed when turning from invisible to visible

Hello! Looks like a bug. Instead set property action on service success event use pre$("[name=mobilegridName]").not("[_tmpl=true]").show();/premobilegridName - name of Grid you use for mapping.

anelezeravla
Posts: 0
Joined: Tue Oct 01, 2013 12:00 pm

After API request, empty grid displayed when turning from invisible to visible

It works perfect now.
Thank you very much, Maryna. Your answers are always of great help.

Return to “Issues”