Page 1 of 2

REST to populate select only has one item.

Posted: Sun Feb 17, 2013 4:42 pm
by Don

First, tiggzi is such an amazing tool.. well done!

I am having an issue with REST (XML webservice) and Select.
I have used REST to populate page content without issues... but I can not seem to get anything other then the first item to appear in a Select.

I believe I have it setup correctly... but am obviously missing something.
I tried placing the select inside a Grid, but then I get no results at all.

Assistance i greatly appreciated.

Image


REST to populate select only has one item.

Posted: Sun Feb 17, 2013 4:58 pm
by maxkatz

The mapping looks right.. are you able to share the service URL with us?


REST to populate select only has one item.

Posted: Sun Feb 17, 2013 5:19 pm
by Don

Hi Max,

Thanks for the quick response.

No, but I can share the XML response.
Only Abbotsford gets populated in the select list.

precode
<?xml version="1&#46;0" encoding="iso-8859-1" ?>
<OUTPUT>
<HEADER>
<PUBDATE>2&#47;17&#47;2013 12:16:27 PM<&#47;PUBDATE>
<&#47;HEADER>
<RESULTS>
<DATA>
<GATEWAYS code="YXX">Abbotsford<&#47;GATEWAYS>
<GATEWAYS code="YYC">Calgary<&#47;GATEWAYS>
<GATEWAYS code="YQQ">Comox<&#47;GATEWAYS>
<GATEWAYS code="YEG">Edmonton<&#47;GATEWAYS>
<GATEWAYS code="YHZ">Halifax<&#47;GATEWAYS>
<GATEWAYS code="YHM">Hamilton<&#47;GATEWAYS>
<GATEWAYS code="YLW">Kelowna<&#47;GATEWAYS>
<GATEWAYS code="YXU">London<&#47;GATEWAYS>
<GATEWAYS code="YQM">Moncton<&#47;GATEWAYS>
<GATEWAYS code="YUL">Montreal<&#47;GATEWAYS>
<GATEWAYS code="YOW">Ottawa<&#47;GATEWAYS>
<GATEWAYS code="YQB">Quebec City<&#47;GATEWAYS>
<GATEWAYS code="YQR">Regina<&#47;GATEWAYS>
<GATEWAYS code="YXE">Saskatoon<&#47;GATEWAYS>
<GATEWAYS code="YYT">St&#46; John's<&#47;GATEWAYS>
<GATEWAYS code="YYZ">Toronto<&#47;GATEWAYS>
<GATEWAYS code="YVR">Vancouver<&#47;GATEWAYS>
<GATEWAYS code="YYJ">Victoria<&#47;GATEWAYS>
<GATEWAYS code="YWG">Winnipeg<&#47;GATEWAYS>
<&#47;DATA>
<&#47;RESULTS>
<&#47;OUTPUT>
/code/pre


REST to populate select only has one item.

Posted: Sun Feb 17, 2013 5:24 pm
by Don

Here is my select config.
The select box is sitting within the main container (no grid, div, etc outside it).

Image


REST to populate select only has one item.

Posted: Sun Feb 17, 2013 7:52 pm
by maxkatz

Does it work if you use a grid with a label inside instead of menu?


REST to populate select only has one item.

Posted: Sun Feb 17, 2013 9:36 pm
by Don

Hi Max,

I believe I found the issue...
I tried a grid with label and that did not work either.

I changed from the webservice and removed the attributes, and now both the grid w/label and the select work:

precode
<GATEWAYS code="YXX">Abbotsford<&#47;GATEWAYS>
/code/pre

to:
precode
<GATEWAYS><CODE>YXX<&#47;CODE><NAME>Abbotsford<&#47;NAME><&#47;GATEWAYS>
/code/pre

The Automatic Create Service Response detected and added the attributes, but they do not seem to be supported.


REST to populate select only has one item.

Posted: Mon Feb 18, 2013 12:04 am
by maxkatz

Glad it's working, can you post the new XML response so we can test it?


REST to populate select only has one item.

Posted: Mon Feb 18, 2013 12:17 am
by Don

The working XML is below:

precode
<?xml version="1&#46;0" encoding="iso-8859-1" ?>
<OUTPUT>
<HEADER>
<PUBDATE>2&#47;17&#47;2013 3:47:54 PM<&#47;PUBDATE>
<&#47;HEADER>
<RESULTS>
<DATA>
<GATEWAYS><CODE>YXX<&#47;CODE><NAME>Abbotsford<&#47;NAME><&#47;GATEWAYS>
<GATEWAYS><CODE>YYC<&#47;CODE><NAME>Calgary<&#47;NAME><&#47;GATEWAYS>
<GATEWAYS><CODE>YQQ<&#47;CODE><NAME>Comox<&#47;NAME><&#47;GATEWAYS>
<GATEWAYS><CODE>YEG<&#47;CODE><NAME>Edmonton<&#47;NAME><&#47;GATEWAYS>
<GATEWAYS><CODE>YHZ<&#47;CODE><NAME>Halifax<&#47;NAME><&#47;GATEWAYS>
<GATEWAYS><CODE>YHM<&#47;CODE><NAME>Hamilton<&#47;NAME><&#47;GATEWAYS>
<GATEWAYS><CODE>YLW<&#47;CODE><NAME>Kelowna<&#47;NAME><&#47;GATEWAYS>
<GATEWAYS><CODE>YXU<&#47;CODE><NAME>London<&#47;NAME><&#47;GATEWAYS>
<GATEWAYS><CODE>YQM<&#47;CODE><NAME>Moncton<&#47;NAME><&#47;GATEWAYS>
<GATEWAYS><CODE>YUL<&#47;CODE><NAME>Montreal<&#47;NAME><&#47;GATEWAYS>
<GATEWAYS><CODE>YOW<&#47;CODE><NAME>Ottawa<&#47;NAME><&#47;GATEWAYS>
<GATEWAYS><CODE>YQB<&#47;CODE><NAME>Quebec City<&#47;NAME><&#47;GATEWAYS>
<GATEWAYS><CODE>YQR<&#47;CODE><NAME>Regina<&#47;NAME><&#47;GATEWAYS>
<GATEWAYS><CODE>YXE<&#47;CODE><NAME>Saskatoon<&#47;NAME><&#47;GATEWAYS>
<GATEWAYS><CODE>YYT<&#47;CODE><NAME>St&#46; John's<&#47;NAME><&#47;GATEWAYS>
<GATEWAYS><CODE>YYZ<&#47;CODE><NAME>Toronto<&#47;NAME><&#47;GATEWAYS>
<GATEWAYS><CODE>YVR<&#47;CODE><NAME>Vancouver<&#47;NAME><&#47;GATEWAYS>
<GATEWAYS><CODE>YYJ<&#47;CODE><NAME>Victoria<&#47;NAME><&#47;GATEWAYS>
<GATEWAYS><CODE>YWG<&#47;CODE><NAME>Winnipeg<&#47;NAME><&#47;GATEWAYS>
<&#47;DATA>
<&#47;RESULTS>
<&#47;OUTPUT>
/code/pre


REST to populate select only has one item.

Posted: Mon Feb 18, 2013 12:21 am
by maxkatz

Thanks...


REST to populate select only has one item.

Posted: Mon Feb 18, 2013 11:39 am
by Kateryna Grynko

Hello,
your first XML response will be mapped correctly after next Tiggzi release.