Page 1 of 1

ChangeValue event invokes bound REST service on desktop browsers but not on mobile browsers

Posted: Sat Apr 05, 2014 4:33 pm
by Ahmed Salem

Hi,

I am working on a project where the user can choose the source RSS using a select menu. It works great in the test environment on both Safari and Chrome. When testing it from Android or iOS sign browser or Appery simulation app, changing selection does not change the target RSS and as a result the previously selected RSS content kept showing.

I did the application by binding a grid containing labels to REST service that calls the RSS link dynamically based on the selected item. To update the target URL, I bound the select me nut to the request parameter 'url'. I am using the value changed event to invoke the REST service.

Here is a link to the app to show you:

http://appery.io/app/mobile-frame?src...


ChangeValue event invokes bound REST service on desktop browsers but not on mobile browsers

Posted: Sat Apr 05, 2014 5:05 pm
by Igor

Hi,

Did you install app on device and tested?


ChangeValue event invokes bound REST service on desktop browsers but not on mobile browsers

Posted: Sat Apr 05, 2014 6:06 pm
by Ahmed Salem

Yes, exactly that what happened. Neither working on the app nor on the normal mobile browser


ChangeValue event invokes bound REST service on desktop browsers but not on mobile browsers

Posted: Sat Apr 05, 2014 6:16 pm
by Igor

Lets start from adding alerts on success and on error service events, to check if your service is executing.
You can find how to add alert to service here: http://docs.appery.io/documentation/r...


ChangeValue event invokes bound REST service on desktop browsers but not on mobile browsers

Posted: Sat Apr 05, 2014 7:00 pm
by Ahmed Salem

Please check the test link I provided. It is executing perfectly even on mobile and test. The problem is only in one thing, it is not updating on mobile when changing the selected item in menu while it is working in test environment.


ChangeValue event invokes bound REST service on desktop browsers but not on mobile browsers

Posted: Sat Apr 05, 2014 7:14 pm
by Igor

I've checked your link it's working for me in the Test view. Can you add alerts and test your app on device?


ChangeValue event invokes bound REST service on desktop browsers but not on mobile browsers

Posted: Sat Apr 05, 2014 8:14 pm
by Ahmed Salem

I did the change you requested and you can check the alert now. Just to remind you that I am mapping the select component to the REST request parameter (url) then invoking it on the event "changed value".

One question: does invoking the REST service updates all mapped components automatically or shall I call some method to do so?


ChangeValue event invokes bound REST service on desktop browsers but not on mobile browsers

Posted: Mon Apr 07, 2014 10:45 am
by Maryna Brodina

Hello!
For some reason your url http://www.almasryalyoum.com/rss/rssf... causes error in our proxy service. We reported it as a bug. As a workaround try do not use Appery.io proxy, but proxy request through server code http://docs.appery.io/documentation/b...
For example:
1) Use the following server code prevar responseBody = {},
requestParams = {},
paramKeys = request.keys();
for (var key = 0; key < paramKeys&#46;length; key++) {
requestParams[paramKeys[key]] = request&#46;get(paramKeys[key]);
}
var XHRResponse = XHR&#46;send("GET", requestParams&#46;url);
response&#46;success(XHRResponse&#46;body, "text/plain");/pre2) In SourceRSS service settings specify the following url prehttps:&#47;&#47;api&#46;appery&#46;io/rest/1/code/xxxxx-xxxx-xxxxx-xxxxx/exec/preyour server code URL
3) Disable Proxy in service settings
4) In request parameters specify parameter preurl/pre5) Do mapping from selecter Select property to url parameter