Page 1 of 2

How to reload page with updated data

Posted: Sat Apr 12, 2014 6:53 am
by deveu

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


How to reload page with updated data

Posted: Sat Apr 12, 2014 7:36 am
by Igor

Hello,

What event are you using to invoke the service?


How to reload page with updated data

Posted: Sat Apr 12, 2014 7:39 am
by deveu

load event


How to reload page with updated data

Posted: Sat Apr 12, 2014 8:03 am
by deveu

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


How to reload page with updated data

Posted: Sat Apr 12, 2014 8:22 am
by Igor

Please try to execute your service on page show event.


How to reload page with updated data

Posted: Sat Apr 12, 2014 10:33 am
by deveu

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


How to reload page with updated data

Posted: Sat Apr 12, 2014 11:08 am
by deveu

on button click i set this and solved

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


How to reload page with updated data

Posted: Wed May 20, 2015 4:57 am
by Nisa Khalid

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


How to reload page with updated data

Posted: Fri May 22, 2015 12:53 am
by Yurii Orishchuk

Hi Nissa,

Use following JS code to reload the page:

pre

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

/pre

Regards.


How to reload page with updated data

Posted: Mon May 25, 2015 8:09 am
by Nisa Khalid

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