Page 1 of 1

Items not refreshing in persistent footer

Posted: Thu Mar 26, 2015 3:32 am
by GregMc

I am trying to understand how persistent footers work and what the persistentDataId attribute is used for. Though this exposed in the properties UI for the footer there is nothing in the appery doc that describes its purpose.

I have a footer on a template page in my app that contains buttons and a text label. On page navigations between pages generated from the template I am updating the text shown in the label and hiding/showing some of the buttons. For the footer if I check for it to be fixed everything works fine on the page navigations, the text label updates that I am making programatically are displayed in the footer and the hide/show operations I am doing on the buttons take effect.

The problem comes if I check for the footer to be persistent, when I do this the text label updates fail and the button hide/show operations fail. The updates to the components in the footer are not seen after page navigation.

I really want to use a persistent footer because I am using page transitions and like the effect of the pages sliding in/out while the header & footer are persistent. How can I get the programmatic updates to the items in the footer to take effect with a persistent footer? Is there some value I need to se persistentDataId to to make his work?


Items not refreshing in persistent footer

Posted: Fri Mar 27, 2015 11:45 am
by Alena Prykhodko

Hi Greg,

I've tested both cases with Persistent checked and unchecked, I can update label text.

How exactly do you change its value?
Please provide us with step-by-step instruction to test this.


Items not refreshing in persistent footer

Posted: Fri May 01, 2015 6:17 am
by GregMc

Hi Alena, I have been away from working on my app fro several weeks but am back now and still have this issue. I am using the following statements to update the label text in the persistent footer.

Apperyio('question_count_label').text(current_question_number + " of " + challenge_length);
Apperyio('question_count_label').refresh();

I am also using the following statements to hide/show buttons in the footer:

Code: Select all

 if (current_question_number  1 && current_question_number < challenge_length) { 
     Apperyio('next_question_button').show(); 
     Apperyio('previous_question_button').show(); 
     Apperyio('finish_button').hide(); 
 } else if (current_question_number = challenge_length) { 
     Apperyio('next_question_button').hide(); 
     Apperyio('previous_question_button').show(); 
     Apperyio('finish_button').show(); 
 } 

As mentioned in my original post if the footer is only marked as fixed everything works fine. But if I check for the footer to be persistent the label text does not get updated and the buttons do not hide/show properly. I want the footer to be fixed and persistent because on page transitions I want new page content to slide in while the header and footer are fixed.

Here is how to reproduce the issue in my app which I have shared with appery support. Project name is ft_proto.

  1. In the project open template QuestionPageTemplateA and make sure that for the footer the pesistent checkbox is checked.

  2. Run the project.

  3. Expand "Business & Technology" and click "Auctions"

  4. Select "A Test Challenge"

  5. Observe the footer on this page, it displays "1 of 3" and has a next button

  6. Click Next

  7. The next question page transitions in. Observe the footer, now the text label and button are not seen

  8. If you return to the page template and unselect persistent for the footer and run through steps 2 - 7 again you will see that the label and buttons in the footer update as expected.


Items not refreshing in persistent footer

Posted: Mon May 04, 2015 6:06 am
by GregMc

Hello Alena, any thoughts on this?


Items not refreshing in persistent footer

Posted: Tue May 05, 2015 12:59 am
by Yurii Orishchuk

Hi Greg,

Unfortunatly you can not use "Apperyio(...)" function in this case...You need to use jQuery(..) instead.

Please replace following js line of code:

pre

Apperyio('question_count_label')&#46;&#46;&#46;&#46;

/pre

With this:

pre

jQuery('[name="question_count_label"]:visible')&#46;&#46;&#46;&#46;

/pre

Do the same with other elements.

Regards.


Items not refreshing in persistent footer

Posted: Thu May 07, 2015 3:53 am
by GregMc

Thank you Yuri, that worked.