4 Replies Latest reply on Nov 29, 2019 1:38 PM by 3434975

    MAF AMX Page not retaining state when we open a Go Link URL

    4025521

      Hi,

      We have this customization on M43083 PO Approval MAF Application where we have added an option to open PDF attachments on a Purchase order from Media Objects.

      Everything is working fine until the point when we click the goLink to download the file URL attachment.

      File gets downloaded successfully and we can open it with native 3rd party pdf reader.

       

      Problem occurs when we come back to the MAF page where we had the goLink. MAF page freezes and nothing happens.

      It was expected to go back with __back Action Facet and Command Button we have on the page.

       

      Please let us know.

        • 1. Re: MAF AMX Page not retaining state when we open a Go Link URL
          Xavier Ribas

          Hi,

           

          you can create a separate feature where you can open the downloaded pdf and use gotoFeature function to switch between them.

           

          Thanks,

          • 2. Re: MAF AMX Page not retaining state when we open a Go Link URL
            3434975

            Hi Xavier,

            Thanks for your response.

            I followed your steps and created a new custom feature to open the downloaded pdf file.

            This new custom feature has just another amx page which has a golink to open the locally stored downloaded pdf file.

            From the main feature i used a new custom bean method to use gotofeature method and it successfully takes me to the new amx page.

            There, on the new amx page I also added a custom button to go back to the Order Feature.
            This button has another bean method which uses gotofeature method to go back to the main feature.

             

             

            But yet again it stucks on the new page and doesnt go back to the previous feature.

             

             

            Are you suggesting something like have a remote url in the new feature? I am trying that now.

             

             

            I would appreciate your comments and corrections.

            • 3. Re: MAF AMX Page not retaining state when we open a Go Link URL
              Xavier Ribas

              Hi there,

               

              how do you open the local PDF file? You say that you use a native 3rd party pdf reader , how does it works? Is it a javascript library? It works inside webview or it opens an external application? If you make the navigation between features wihtout opening the PDF, does it work?

               

              Thanks.

              • 4. Re: MAF AMX Page not retaining state when we open a Go Link URL
                3434975

                Hi,

                I have used goLink component and I have passed the local path of the cache folder where the pdf is downloaded on the android mobile device.

                PDF opens successfully on the default pdf reader of the mobile phone which is the google drive pdf reader.

                 

                Then when I hit back button, control passes over to the new amx page created on the new feature.

                 

                There I have this back command button which calls new custom bean method to go ahead and call gotofeature method with the primary order feature.