deveu
Posts: 0
Joined: Tue Apr 08, 2014 4:10 am

How to reload page with updated data

I have several few page and data is from services and bound with page component and local storage.I need to repeat those page for various users and I am using Appery.navigate('pagename',{}).
On first cycle is everything is ok
but on second cycle I am not seeing updated services data from services
if i set page reload that is always on start screen page
Appery.navigate('pagename',{reloadpage:true}).

How may i repeat those page with coming data from services and js also should be updated by new bound data

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

How to reload page with updated data

Hello,

What event are you using to invoke the service?

deveu
Posts: 0
Joined: Tue Apr 08, 2014 4:10 am

How to reload page with updated data

load event

deveu
Posts: 0
Joined: Tue Apr 08, 2014 4:10 am

How to reload page with updated data

the services are on page load
the javascript code and navigation is with button click and page show event

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

How to reload page with updated data

Please try to execute your service on page show event.

deveu
Posts: 0
Joined: Tue Apr 08, 2014 4:10 am

How to reload page with updated data

yes working nice
but now problem in

function(value, element) {
Appery("btn_logout").text(value);

//$( document ).ready(function() {
logout = Appery("btn_logout").text();
var myVar = setInterval(function(){myTimer();},1000);
var timer = parseInt(logout);
function myTimer()
{
timer = timer-1;
if(timer==0)
{
clearInterval(myVar);
timer =0;
Appery("btn_logout").text(timer);
Appery.navigateTo('ThankYou', { });
}
Appery("btn_logout").text(timer);
}
//});
}

if timer is 0 navigating to Thank you page and from thank you page to check in page

but if not timer 0 and if i click on a button from reward page going to thank you page and then check in page
and immediately moving again thank you page
that should stay on check in page

deveu
Posts: 0
Joined: Tue Apr 08, 2014 4:10 am

How to reload page with updated data

on button click i set this and solved

timer = 0;
Appery("btn_logout").text(timer);
Appery.navigateTo('ThankYou', { } );

Nisa Khalid
Posts: 0
Joined: Tue May 05, 2015 1:36 pm

How to reload page with updated data

have any code to execute? i have made condition for my button
else if($.trim(Apperyio("btn_EditParentsdet").text()) === "Save")
{
updateUserDetails.execute({});
}

i want to refresh it when successfully save

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

How to reload page with updated data

Hi Nissa,

Use following JS code to reload the page:

pre

navigateTo("pageName", {reloadPage: true, transition: 'none', allowSamePageTransition: true, changeHash: false });

/pre

Regards.

Nisa Khalid
Posts: 0
Joined: Tue May 05, 2015 1:36 pm

How to reload page with updated data

the page are reload but the data after updated not appear,it only appear the input box?

Return to “Issues”