JSON not reloading

Posted by meyrick on 12-Jun-2014 03:55

Hi there,

I have created a maintenance screen where the user selects an existing employee and then can update their details. Once the user saves the changes I recall the read service but it is still displaying the old data and not displaying the new data. has anyone got any ideas on how to reload the JSON file??

Thanks.

All Replies

Posted by Anil Kumar on 12-Jun-2014 04:40

Hi Meyrick,
 
After performing the update operation from Mobile emulator can you please whether the records are updated in the backend (say OE database). If Yes, can you please check for the Read request through a generic REST Client (say REST Client or Postman).
 
>> Once the user saves the changes I recall the read service but it is still displaying the old data and not displaying the new data
Can you try having ‘Load’ or ‘Page Show’ event in the designer followed by UpdateService success. Following are the set of steps (assuming the we are updating Customer details through ‘Edit_Customer’ page):
 
Pages/Screens:
‘Edit_Customer’ is the page/screen used for editing the customer details
    ‘AppDetailPage’ which is the home page of the app
Services:
            ‘Edit_ReadSvr’ is the read JSDO service name
            ‘UpdateSrv’ is the Update JSO service name
 

1.      Select Design tab in the Edit_Customer page and expand Events node

a.      Select component of Edit_Customer, Event of Page Show, Action of Invoke Service, and choose Edit_ReadSrv

b.      Click Add Event

c.       Select Component of btn_cancel, Event of Click, Action of Navigate to page, select page AppDetailPage

d.      Click Add Event

e.      Select Component of btn_Update, Event of Click, Action of Invoke service, select UpdateSrv

f.        Click Add Event

2.      Select Data tab in the Edit_Customer page and expand Events node

a.      Select Component of UpdateSrv, Event of Success, Action of Run JavaScript add following alert statement

alert("Successfully Updated Customer Record");

b.      Click Add Event

c.       Select Component of UpdateSrv, Event of Success, Action of Navigate to page, select page AppDetailPage (or same Edit_Customer page)

d.      Click Add Event

Hope this helps
 
Thanks and Regards,
Anil Kumar.
 
[collapse]
From: meyrick [mailto:bounce-meyrick@community.progress.com]
Sent: Thursday, June 12, 2014 2:25 PM
To: TU.Mobile@community.progress.com
Subject: [Technical Users - Mobile] JSON not reloading
 
Thread created by meyrick

Hi there,

I have created a maintenance screen where the user selects an existing employee and then can update their details. Once the user saves the changes I recall the read service but it is still displaying the old data and not displaying the new data. has anyone got any ideas on how to reload the JSON file??

Thanks.

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]

This thread is closed