Ahmed Salem
Posts: 0
Joined: Fri Apr 04, 2014 12:47 am

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

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...

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

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

Hi,

Did you install app on device and tested?

Ahmed Salem
Posts: 0
Joined: Fri Apr 04, 2014 12:47 am

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

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

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

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

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...

Ahmed Salem
Posts: 0
Joined: Fri Apr 04, 2014 12:47 am

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

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.

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

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

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

Ahmed Salem
Posts: 0
Joined: Fri Apr 04, 2014 12:47 am

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

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?

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

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

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

Return to “Issues”