2 Replies Latest reply: Jan 16, 2014 3:58 PM by User544872 RSS

    How to retain AM state when moving through train Pages

    User544872

      I have created set of pages that are linked through train. There are 4 pages in all. One of the pages has radio button group (several of them).

       

      Say there are 5 radio groups. User can select one of 5 options for each radio group. After making the selection, when users goes to NEXT page and navigates back to original page, the selection is not being retained. I have set the name of the group for all 5 option for each radio group (using rb.setname function). The last choice in the group is the one that shows as selected when navigated back to the original page.

       

      For example:

       

      radio button 1:   choice1       choice2        choice3         choice4          choice5

      radio button 2choice1      choice2        choice3        choice4         choice5
      radio button 3choice1      choice2        choice3        choice4         choice5
      radio button 4choice1      choice2        choice3        choice4         choice5
      radio button 5choice1      choice2        choice3        choice4         choice5

       

      If user selected choice1, choice2, choice3, choice4 and choice5 for radio button 1, 2, 3, 4 and 5 respectively, when navigating back to this page after navigating out, all 5 radio buttons are showing choice5 as selected and not what was originally selected by user. In order to get around this, i created a transient variable in the underlying VO and updated it to the choice selected. But when navigating out, the values are being lost and when i come back to this page, none of what i set as selected value is there. It appears that the AM state is not being retained. I also tried appending the "&retainAM=Y" to the URL for each page that are defined a part of train setup. When doing that, I can't even navigate to all pages. It goes to page2 and then stays there and other pages become not navigable. I am at loss as to how to go about this. I need to retain the values of what user selected so I can mark those radio boxes as selected when i navigate to my page with radio buttons. I don't want to commit to database for this because user can always cancel out and not want to save. I'd really appreciate if someone has any advice as to how I can go about this.

       

      Appreciate your help.

      Arun

        • 1. Re: How to retain AM state when moving through train Pages
          mahijosh

          Hi Arun,

           

          Can you please let me know in details about how you created Train Type Page and whether you are using the same AM for all the Pages or not?

          is these Choices were VO Based or Not?

          • 2. Re: How to retain AM state when moving through train Pages
            User544872

            Hi,

             

            To create the train pages, i created 4 different pages, each one using SAME Application module. They have different VO's (page specific)...linked them together using a standalone region (using TRAIN region and PAGENAVIGATIONBAR) that has 4 links (one for each page).

            All these choices are based on VO for these specific pages.

             

            Issue seems to be it not being able to retain what i update in VO transient attributes. Since they are all using same AM, i would have thought that AM should be retained (but it appears that it is creating new instance of these rather than retain the state). I can't find a way to retain the AM state when navigating to different page.

             

            Thanks

            Arun