Page 1 of 2

Select control is empty

Posted: Thu Dec 13, 2012 6:18 pm
by yaip

I have a REST service that returns code and description. I then bind the returning results as following. Let's say the select control's name is loc. So I'm binding the code to the value and the desc to the label. Also, I'm binding the method response to the selectmenuitem. When I test it, no values are seen.


Select control is empty

Posted: Thu Dec 13, 2012 10:00 pm
by maxkatz

Please post a screen shot of the response mapping.


Select control is empty

Posted: Thu Dec 13, 2012 10:03 pm
by maxkatz

Also, look in the console if there are no JS errors...


Select control is empty

Posted: Thu Dec 13, 2012 10:15 pm
by yaip

Select control is empty

Posted: Thu Dec 13, 2012 10:34 pm
by maxkatz

And any errors in the console?


Select control is empty

Posted: Thu Dec 13, 2012 10:39 pm
by yaip

XMLHttpRequest cannot load a href="http://" rel="nofollow"http:///a... Origin http://project.tiggzi.com is not allowed by Access-Control-Allow-Origin.


Select control is empty

Posted: Thu Dec 13, 2012 10:41 pm
by yaip

When I test the REST service, it returns data, such as:

{
"GetAllLocationsMethodResult":[
{
"intlocationID":1,
"strlocationName":"--"
},
{
"intlocationID":2,
"strlocationName":"LW"
},
...


Select control is empty

Posted: Thu Dec 13, 2012 11:21 pm
by maxkatz

The service doesn't support cross-domain calls: http://docs.tiggzi.com/documentation/...


Select control is empty

Posted: Fri Dec 14, 2012 12:06 am
by yaip

I read the documentation. According to it, Cross-origin resource sharing (CORS) is the right way to do it. But how and where do I do it?


Select control is empty

Posted: Fri Dec 14, 2012 12:14 am
by maxkatz

On the service side, you need to an extra header.