Page 1 of 1

back

Posted: Thu Jan 02, 2014 4:31 pm
by iuris

I have an app with three pages
page 0: button to page1
page 1: element collapsible and un button to page 2
page 2: button to back

start APP page1.
Click collapsibleblock, click button to page 2
In page 2 click back
I note that element collapsible is not collapsed

OK!! BUT

start APP page 0:
click button to page 1
Click collapsibleblock, click button to page 2
In page 2 click back
I note that element collapsible is collapsed

Why in the latter case collapses? I need to go back and keep the changes made ​​to the previous page.


back

Posted: Thu Jan 02, 2014 5:45 pm
by Kateryna Grynko

Hi,

How do you navigate to another page? Do you use Appery.io UI or JavaScript code?

If you do not set "Use full screen refresh" then page state is saved (including collapsibleset).


back

Posted: Thu Jan 02, 2014 6:25 pm
by iuris

Hi,
App setings start page: page0:
In page0 button with event Navigate to page1 use Appery.i UI and not "Use full screen refresh"
in page1: collapsibleblock is collapsed, button with event Navigate to page2 use Appery.i UI and not "Use full screen refresh"
In page 2 mobileheader with button back and other button, in mobilecontainer, with event Run JavaScript: history.back();

With the two buttons I get the same result.

click button on page 1
Click collapsibleblock, click button on page 2
In page 2 click back or button
I note that element collapsible is collapsed

thanks


back

Posted: Thu Jan 02, 2014 8:26 pm
by Kateryna Grynko

Hi,

This seems to be a bug. Try the following workaround.

Save a value of collapsible block before navigating to another page:prevar val = Appery("mobilecollapsblock_10").hasClass("ui-collapsible-collapsed");
localStorage.setItem("val",val);/preWhen page opened, open/close:prevar action = (localStorage.getItem("val")=="true") ? "collapse":"expand";
Appery("mobilecollapsblock_10").trigger(action);/pre


back

Posted: Thu Jan 02, 2014 9:07 pm
by iuris

The proposed solution is a bit tricky to apply because I have 15 collapsible elements and other objects that the user can modify and keep interested me to return to the page.
I have found that activated the "Render all pages in HTML (jQuery Mobile multiple page template)", and seems to work well and achieve my goal.

Have any problems activating this option?


back

Posted: Fri Jan 03, 2014 6:34 am
by Illya Stepanov

Hi,

[quote:]I have found that activated the "Render all pages in HTML (jQuery Mobile multiple page template)", and seems to work well and achieve my goal.[/quote]
You are right and this solution is correct for your approach.

If you don't use the transition "Use full screen refresh" -- the front page is not reloaded every time (it's always remains in the document), so condition of the page persists (selected checkboxes / radiobuttons, entered input, etc - everything is kept), and all other pages are loaded and unloaded from document as needed - so their status is not saved.