Yaniv
Posts: 0
Joined: Wed Jun 12, 2013 8:38 pm

Force page refresh

Hi,
On my application I have a page that contains a list of topics, while the user select one of them I'm loading next screen and fetching the data based on the user selection (each topic has its own URL to get it's XML response).
The issue is that the page is shown with previous data till response get back from server and populating the "updated" data.
I checked the solution that gave for this in this forum but it now worked out, can you suggests? (I'm not using full refresh and all pages render in a single file).
Application is shared with you (a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a, applciation name: ShuvaIsrael).

p.s. In case required, this can be tested on mobile only since the XML response contains blank charters at the start and cause parser error on tester but working fine on device.

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

Force page refresh

Hello! Hello! Working on it, I'll update.

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

Force page refresh

As we can see from shared app you use "Render all pages in one HTML file". You can refresh fields on page Show event using JS. This action should be before service invocation.

Yaniv
Posts: 0
Joined: Wed Jun 12, 2013 8:38 pm

Force page refresh

Correct! But in this case that page will be show with previous data, data will be cleaned and than the retrieved information will be presented. Means that the user will see all above on screen.
Any other option?

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

Force page refresh

As you have checked "Render all pages in one HTML file" you can refresh fields when you leave the page. You can use Page Hide action. Note that you can't use codeAppery("componentName")/code with this event because it searches on current page. Use code$("[dsid=componentName]")/code instead

Yaniv
Posts: 0
Joined: Wed Jun 12, 2013 8:38 pm

Force page refresh

Working great, Thanks!

Alex GG
Posts: 0
Joined: Thu Nov 14, 2013 11:11 pm

Force page refresh

Hi!

I ́m tryng to refresh fields whrn leave the page. It worked fine with labels, but how to refresh image component?

I tried this:
$("[dsid=mabileimage_249]").attr('src');

and this:
$("[dsid=mabileimage_249]").attr('src',Appery.getImagePath('addfavorites.png'))

it is still showing last image when another item is click on the master page...

Regards

Return to “Issues”