Claudio
Posts: 0
Joined: Thu May 31, 2012 9:29 pm

Grid is not shown if mapped with a REST Service

Hi,
I searched in the forum but I didn't find this topic.
I made a REST service which receives a xml response from the server.
I added a Grid in my screen and put two labels in the cells.
After that I mapped the response parameters to the Grid and the labels, but .... the grid is not shown at all.

I inspected the HTML with firebug and I found that the table tag has the display:none attribute:
div class="mobilegrid1_wrapper"


The html source code instead is:
div class="mobilegrid1_wrapper"
....

Another thing is that although the grid's name is "mobilegridRanking", the class is set to "mobilegrid1", is it normal?

However, if I delete the data mapping between the Service and the Grid, the Grid is shown.

Here is the mapping:
Image

And this is the server response:


Claudio
Posts: 0
Joined: Thu May 31, 2012 9:29 pm

Grid is not shown if mapped with a REST Service

Ops!
the forum cutted the xml response!
precode
<roar tick="0">
<leaderboards>
<view status="ok">
<ranking ikey="points" offest="0" num_results="100" page="1" low_is_high="false">
<entry rank="1" player_id="5932530985850467740" value="190" ikey="points">
<custom&#47;>
<&#47;entry>
<entry rank="2" player_id="10577676887039432387" value="20" ikey="points">
<custom&#47;>
<&#47;entry>
<entry rank="3" player_id="15471824761280051905" value="10" ikey="points">
<custom&#47;>
<&#47;entry>
<entry rank="4" player_id="12537295346837023459" value="10" ikey="points">
<custom&#47;>
<&#47;entry>
<&#47;ranking>
<me>
<entry rank="1" player_id="5932530985850467740" value="190" ikey="points"&#47;>
<&#47;me>
<&#47;view>
<&#47;leaderboards>
<&#47;roar>
/code/pre

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Grid is not shown if mapped with a REST Service

I'm guessing the service doesn't support cross-domain calls. Try with Tiggzi Proxy.

http://help.tiggzi.com/documentation/...

Claudio
Posts: 0
Joined: Thu May 31, 2012 9:29 pm

Grid is not shown if mapped with a REST Service

Hi Max,
thanks for your reply.

Unfortunately this is not the problem.
I already activated the proxy feature and I have the same behaviour.

In addition I checked the server response using the firebug extension, and everything seems to work well.

However this is the response from the proxy service:

POST http://project.tiggzi.com/rest/tunnel
200 OK
383ms
jquery-1.6.4.js (riga 7950)

and data are exactly the same xml I posted above.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Grid is not shown if mapped with a REST Service

Are you able to share the service URL?

Claudio
Posts: 0
Joined: Thu May 31, 2012 9:29 pm

Grid is not shown if mapped with a REST Service

Is it possible to send you the url via email?

Thanks

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Grid is not shown if mapped with a REST Service

Yes, send it to a href="mailto:support@tiggzi.com" rel="nofollow"support@tiggzi.com/a

Claudio
Posts: 0
Joined: Thu May 31, 2012 9:29 pm

Grid is not shown if mapped with a REST Service

I sent you an email, thanks

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Grid is not shown if mapped with a REST Service

I was able to map the service response to a grid and display the results (showing @rank):

Image

How are you invoking the service?

Claudio
Posts: 0
Joined: Thu May 31, 2012 9:29 pm

Grid is not shown if mapped with a REST Service

I put on the "Page Show" event a custom javascript to call a js function.
Inside that function the service is called by using the execute() method:
lbService.execute({});

Now I tried to put a button on the page and to invoke the service directly from its onClick event.
With no luck :(

By using the Firebug plugin I can see the calls to the server (I have the proxy feature on too) and all seems to work, but the grid does not appear.

Return to “Issues”