Forum Stats

  • 3,853,698 Users
  • 2,264,256 Discussions
  • 7,905,434 Comments

Discussions

Question about Save Before Exit Plug-In for button with pop-up region

839839
839839 Member Posts: 3
edited May 19, 2014 10:13AM in APEX Discussions

Hi,

This Plug-In has been really useful, but i am trying to get it to work in the following scenario with no result.

On my page i have 3 buttons, Cancel, Details, Delete. The plug in works great on Cancel and Delete.

Details button(which is enabled when a row or multiple row has been selected) has a pop-up which allows me to enter some data lower in the hierarchy for a particular row. Here also i would like the plug in to work before it pops-up the data screen.

The steps i am following are - i change the job of empno - 7782 from MANAGER to CLERK. Then i click on cancel, the save before exit message is displayed.    - PERFECT

Now i check the check box for the same line (empno - 7782) and click on delete , it confirms if i want to delete and after i say yes, the save before exit message is displayed.    -PERFECT

Now leaving it checked(empno - 7782) i click on Details button, a pop-up region is displayed where i can enter some information ( it will have save and cancel button in this region). - I want the save before exit message to be displayed before this pop-up region is displayed  - HELP

I am using Apex 4.1 and i am relatively new to apex. I hope i have provided you with all the necessary information.

I have also created the scenario in

https://apex.oracle.com/pls/apex/f?p=32321:LOGIN_DESKTOP:111046025786433

user: [email protected]

password: [email protected]%

Thanks guys.

Tagged:
839839

Answers

  • dmcghan
    dmcghan Member Posts: 2,556

    Hi Stephania,

    Thanks for providing the details. Actually, in the first two cases where you say the plug-in is working, I would say it is not. The idea of the plug-in is to prevent a user from navigating away from a page WITHOUT hitting a button like Cancel or Save. Only then, say the user mistakenly clicked the refresh button in the browser, should the plug-in warn the user.

    I modified the Disable Warning Selector of the plug-in to work "correctly" with your theme by setting its value to ".uButton". Try it and let me know if you agree with its use. The idea here is to help the user if they "accidentally" move away from the page.

    Now, having said all of that, there has long been an issue with the plug-in working with tabular forms because tabular forms have similar functionality built in. I had hoped that they (the APEX team) would make the built in functionality optional, but I don't think they did. I could probably hack the default code to disable it (let me know if you need this).

    Of course you may have intended to use the plug-in in another way than it was intended. Perhaps you are trying to warning the user that their changes are about to become permanent? Could you please clarify? If that's the case, the plug-in may still be of use but it would be used a little differently.

    Regards,

    Dan

    839839
  • 839839
    839839 Member Posts: 3

    Hi Dan ,

    Thank You for your reply.

    I understand now that the plug-in has been essentially designed for - if a user “accidentally” navigates to another page. But the way it works even if a user clicks on a button “on-purpose” is the functionality my client wants. Also, Yes, the requirement is to make the data changes permanent, but first alerting the user that he will loose the changes he has made (even if he clicks the details button which pops-up a modal region) or if he navigates away.

    Cheers,

  • dmcghan
    dmcghan Member Posts: 2,556

    Hi Stephania,

    Sorry, I've been really tied up.

    Is this still something you need looked at? If so, I can take a look tonight.

    Regards,

    Dan

This discussion has been closed.