Reusable prompt to save changes component

Using jsf/adf 10.1.3.4. I've implemented a reusable prompt to save changes component as described in john's blog (http://stegemanoracle.wordpress.com/page/3/). In that blog he mentions some questionable/buggy behavior regarding the dialog framework. Specifically, there's an issue with using something other than partialSubmit="true" on the component that launches the dialog box. Using something other than partialSubmit="true" on the button/link results in not being able to navigate in the return listener of the dialog. I think I'm a victim of a similar issue and wanted to see if there were any ideas/suggestions.
I'm launching my dialog using partialSubmit = "true" on the commandButton and my navigation (in the return listener) is not working in a certain scenario. I think what is causing the navigation not to work is the fact that on my page I have an input text that fires a value change listener method, which means the autoSubmit property on that inputText is set to 'true'. If the user changes a value in that inputText (w/o tabbing out of that field) and immediately clicks the button that launches the dialog, the navigation after dialog closes doesn't happen. If I change the inputText value, then tab out (firing the autoSubmit), then click the button that launches the dialog, navigation occurs properly when the dialog closes. Am I stuck with this limitation or is there some workaround? I was also curious as to whether this type of thing has been addressed in the latest 11g version, as we're thinking about migrating our apps soon. Thanks.

Hi kcjim,
11g has capability for this behaviour out-of-the-box, so no need to use my approach there. I was never able to find a satisfactory solution in 10.1.3.x to the issues described.
John

Similar Messages

  • Prompted to save changes before closing when there's been no changes

    When opening some PDFs I am prompted with thie dialog box "Do you want to save changes to .........before closing?".
    This is not displayed for all PDFs I open, just some.
    Does anyone know if there is a way I can stop this message being displayed?
    We have version Acrobat Reader 10.1.3 running on XP SP3.
    Thanks for your help.

    I don't see the "being repaired" message, but it likely just disappears before I can see it.  Given that, Adobe Reader's behavior makes sense - the document has been repaired, so it has been changed.
    The bad files I had were downloaded a while ago from ProQuest and produced by "image2pdf.c".  It looks like they were aware of the problem, because if I download the same document now, it looks the same, but the PDF file is a different size and the problem does not occur.
    Thanks for your help.

  • ADF Faces + BC 10.1.3: prompting to save changes after any navigation

    Hello all,
    Working on an application that uses ADF Faces + Business Components. We're using the PanelPage component and using a menu tree model bean specified in faces-config.xml for the menu1, menu2, and menu3 facets of the PanelPage.
    What we'd like to be able to do is, regardless of what page the user is on, be able to check if the user is trying to navigate via the menu without having saved changes and then prompt them "do you want to save your changes" with a Dialog.
    Creating the dialog is the part I know how to do, but how could I, in a generic way:
    a). Have some code execute during the navigation. I assume this is a custom ADFPhaseListener/FacesPageLifecycle class, but not sure.
    b).Detect whether the model has uncommitted changes. I assume this is something on the Application Module, but could not figure this out.
    Has anyone done something like this before?
    Thanks for any insight into this.
    Regards,
    John

    OK, gang, here's an update:
    I wanted to try to, in a generic way, capture changes that have happened to the data without having to go through a change listener on each field. Since my pages are all based upon BC View Objects with underlying Entity Objects, I have cobbled together some code (with lots of stuff hard-coded for now) that is able to tell me whether the data has been modified or not. The way I have the code right now, it works if the page is based upon one view object that has one underlying entity. Extending this to a view object that has multiple entities should be relatively straightforward (just loop through all of the entities and look for modifed status, instead of looking at only the first one).
        System.out.println("Starting the test");
        FacesContext ctx = FacesContext.getCurrentInstance();
        Application app = ctx.getApplication();
        ValueBinding bind = app.createValueBinding("#{data.AppModuleDataControl.dataProvider}");
        AppModuleImpl svc = (AppModuleImpl) bind.getValue(ctx);
        ViewObject v = svc.findViewObject("InputSheetView1");
        ViewRowImpl vri = ((ViewRowImpl)vo.getCurrentRow());
        EntityImpl ei = vri.getEntity(0);
        int i = (int) ei.getEntityState();
        System.out.println(Entity.STATUS_NEW);
        System.out.println(Entity.STATUS_UNMODIFIED); 
        System.out.println(Entity.STATUS_MODIFIED); 
        System.out.println(Entity.STATUS_DELETED);   
        System.out.println(Entity.STATUS_DEAD); 
        System.out.println(Entity.STATUS_INITIALIZED);     
        System.out.println("The answer is");
        System.out.println(i);
        System.out.println("Finishing the test");Now, how to make this generic. How could I, from the page's backing bean:
    1). Determine the name of the data control(s) used on the page? Alternatively, how to determine the name of the application modules used by the page? I know this information is in DataBindings.cpx, but how to find it programatically?
    2). How to determine which View Objects from the AM's are used on the page? I know this is in the PageDef, but again, how to do this programatically?
    Thanks for any ideas?
    Regards,
    John

  • Preview doesn't prompt to save changes

    I have finally made the switch from Windows PC to a new iMac 21" with Mac OS X Yosemite. However I have found that any information I have entered into PDF forms on a PC is lost when Preview saves the file.
    I tend to use the excellent free Foxit PDF reader on PC but there isn't a Mac version available.
    Thanks
    Caltor

    I also have this issue on my Dell XPS 15 laptop with the Nvidia Geforce 540M and the temporary fix is turning off hardware acceleration. I do believe that this should only be a temporary fix and that the Mozilla developers should figure out a way to work around this or fix this hardware acceleration issue with the nvidia geforce 540m.

  • Prompt to Save Changes

    I am writing an application using WPF and C#. This application is using Navigation Service. I currently have a page defined which has several textboxes for the end user to fill in which will ultimately be sent to a SQL database.
    What I need to know is how to prevent the user from navigating away from the page if the information entered has not been saved. I know how to do this if were to place a button on the page which would allow the user to navigate to another page, but
    not if the user uses the navigation arrows.
    Thank you.

    The nav service raises the
    Navigating event before the request is processed. Handle this event and cancel it if you don't want navigation to continue.
    Please post further WPF questions in the WPF forums. This forum is for general C# questions unrelated to UI technologies.
    Michael Taylor
    http://blogs.msmvps.com/p3net

  • Can't save changes to forms in access 2010 db format 2007

    Access 2010 - file format Access 2007 cannot save design changes
    On a previously designed form which works, I went back to change a check box from enabled "Yes" to "No" - I am then prompted to save changes and I click "Yes" but the form will not save or close. To close the form I must select "No" to the changes and they
    are lost.  If I return to form view the changes are also lost when I close.
    I have exclusive access to the DB and per some other suggestions I have checked the box to open in exclusive and uncheck the box  "Track name AutoCorrrect Info". I have also used compact and repair, which is also done on a regular basis.
    I have found that it is beginning to occur on other forms as well for no apparent reason.
    History:
    This was originally an Access 97 database that had been upgrade, all forms, reports, etc., had been imported into a new Access 2007 database. It has been running fine for the past month and we have been making design changes with no issues up to this point.
    The database is running on MS Server 2008r2 Terminal Services

    Hi Iasun:
    I have exactly the same problem that you had and have not been able to solve it. As you say, forms can be modified but no be saved; you can´t either change it´s name or delete it. Many forms in a large application  that I developed have
    the same problem and it seems that with time more forms are becoming "damaged"
    What I have done is to open the "damaged" form in design view and copied all controls to a new Form, leaving the old form unused. This is not a real solution but it´s the only way that I have found to change the original form.
    Your comment is more than a year old, have you already found a good solution?
    My application was originally developed in Access2007 and still running under it so it is not a problem related to 2010.

  • Would you like to save changes.. no changes to save

    hi guys, I currently have a master detail relationship but i have a problem. When a query is entered in my master block it automatically queries the detail block, this is fine, however , if i then want to enter a new query, thus entering query mode in the master block I get a prompt asking me if i want to save changes, but I havent made any changes.
    I do however have an idea for the cause of the problem. I have 2 non database items on my detail block which are just there to provide additional information to the user. How they work is that when the id from the detail block is brought back I have in a post query trigger that I open a cursor and bring data back from another table and display it to the user in these NON database items. however i did not think this would cause a prompt to save changes as this inforrmation was going into a non databse item. I am simply assuming this is my problem.
    Anyone any ideas how I could resolve this?
    Thank you.

    Hi user13390506
    i do agree with Ahmed; no Tricks needed it's obvious and strait forward that's to say i supposed that u did the following ...
    1. created Lov for the FK ( id) selecting the id and desc
    2.u returned the selected id from the Query to the FK (id) in the form
    3.u can display it or set it's width to 0
    through previous steps u garanteed returning the id just once as u selected it from ur form at runtime during the insertion process.
    On Post-Query Trigger ....
    This trigger functionality is to display only the desc or the name of the item related to the FK (id) in ur current form that is already existed in a related Look-up table or whatever...
    Through this u display data that can't be displayed by ur current table but related to another table u can get it through using the id currently fetched from the db
    By using the Post-Query u may cause the same id to be stored Twice which is useless,wasting time,and effort upon u and the db itself.
    Hope i clear it as i recognize it.
    Best Regards,
    Abdetu...

  • Prompts for save chages even if it is an EXE

    Hi All
    I have a program which I made into an exe but when the program closes the front panel to exit, it will prompt to "Save changes". 
    Some items on the panel are repositioned when it is running and I do not need to save the changes.  But I dont understand why it will ask this even if the program is turned into an EXE
    Any ideas on how to stop the "save changes" prompt from comming up?

    I haven't tried this but try adding a revert vi method in your clean-up/shut down code since you don't want to save the changes anyway- tossing em out seams sensible.
    Whoops revert method won't work(not available in run-time not writable while running)
    Hmmmm....
    Jeff

  • Save changes when there are no changes

    Why is it that when I open a subvi and close it making absolutely no changes, I'm prompted to 'save changes'?

    Hi wb2nvy,
    "Why would anyone NOT want to include the subvis when the main vi is recompiled to a newer version?"
    Maybe you have linked to subVIs also used with the older LV version and so don't want to save subVIs automatically?
    As said before: no other IDE I know of automatically saves referenced files to a newer version...
    And:
    You should get asked to save subVIs before closing the mainVI. You always have the option to save them. You always are presented with reason why LV wants to save. You always have to decide between saving or not saving... You always have the mass compile option.
    It's your duty to decide when to upgrade VIs - LV will and cannot take that decision!
    Message Edited by GerdW on 06-02-2010 04:37 PM
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Prompt to save Sequential Model; Not desired.

    When Saving one of my TestStand applications, I get prompted to Save the SequentialModel.seq.  I have never saved changes to the sequence model and do not want to. 
    What do I has to be done to this application so it uses the untouched Sequence model AND not prompt to save changes to the Sequential Model?
         (1st Post to a forum) 
    Solved!
    Go to Solution.
    Attachments:
    TestStandErrorSeqModel.PNG ‏19 KB

    Hi,
    Since you never saved the sequential model my guess is that the test sequence you are having could be creating this issue.
    Try this :
    Open TestStand and open a new sequence (dont open your test sequence).Save.Do you still get the prompt to save sequential model?
    If no then problem maybe with the test sequence.
    If yes then simply repair TestStand.
    Normally this happens when one of the types (common to your test sequence and NI types) version is incremented in your test sequence.
    When you load your test sequence in TestStand it automatically detects that the types present in sequential model is of a lower version and prompts to save it.Its a feature not an issue.
    You can use this tool to resolve the type differences:
    https://decibel.ni.com/content/docs/DOC-39163
    Convert your test sequence to be compatible with the sequential model and this should resolve the issue.
    Hope this helps.
    Ravi

  • Adobe Acrobat Standard XI: Why prompted to save file when nothing changed?

    I have Adobe Acrobat Standard as the default PDF reader. I PDF printed a page from a website. Then I clicked to open the PDF. After I finished viewing the file, I closed the window. Adobe Acrobat prompts me to save: Yes, No, Cancel. Since I changed absolutly nothing, I am puzzled why Adobe Acrobat's save dialog thinks there are changes and askes me whether I want to save the changes.
    I have repeated opening and closing the PDFseveral times.
    Then, I tried opening and closing another PDF, and it just closes without prompting to save.
    Why do I get different behaviors on different PDFs? And can I control the behavior to get or not get the save prompt when there are no changes?

    I like that Adobe Acrobat will correct problems, then ask you whether to save.
    In the case of this file, I click Yes to save. Then the next time I open and close the file, it asks again, and I click Yes to save. Adobe Acrobat always does it with this file.
    With another file, Adobe Acrobat (AA) does not prompt, unless I change the file.
    I don't know which difference matters. AA created both PDFs. The problem file was a print from a webpage. The good file (that closes without prompting) was created from a scanner.
    I tried PDF printing this page (i.e. the page on which I am composing my response to your message). Then, I opened and closed the PDF, and was prompted to save.
    Seems like if AA corrected the problem, and I saved, AA should not have to correct the problem again (if that is what's happening). Also, if AA made the PDF in the first place, there should be no problems with the PDFto correct.
    You know what? I just tried printing another website and same prompting everytime I close.
    I've been using Chrome. I tried printing with Internet Explorer, and no problem of prompting when closing.
    Hmm. I just tried PDF printing from FireFox. No problem here either.
    Well, Now I suppose I just leave it for Google and Adobe to work out, if they care to.
    I just tried opening the problem file in AA and PDF printing from it. This seems to have cleaned the file. The second PDF file has no problem opening and closing.
    I've got an idea. I just went to the address bar in Chrome and typed "Chrome://plugins". That's the only way I know to get to the Chrome plugins. I saw that I have BOTH the Chrome built-in PDF Reader  AND the Adobe Create plugins enabled. I disabled the Chrome PDF Reader so ONLY the Adobe Create plugin is enabled.
    I printed this webpage again (the webpage you are reading). This time, there was no problem opening and closing the PDF, no prompts to save.
    However, now online PDFs will not display in Chrome. Instead, Chrome offers to download the PDF.
    I went back to the plugins and found Adobe Reader disabled. I enabled Adobe Reader so now I have both Adobe Reader and Adobe Create plugins enabled.
    The problem came back.
    I don't know who would fix this, Adobe or Chrome, but would be nice to "have my cake and eat it, too" meaning, not have to muck with the plugins to AA-print clean PDFs from Chrome, and then muck again with the plugins to display PDFs in Chrome.
    I tried FireFox. Displays PDFs, and AA-prints PDFs that are clean (i.e. no prompt on closing from AA).
    Well, that is enough (maybe more than enough) from me on this. I'll monitor this discussion in case anyone comments.

  • Prompt user to save change before abnormally closing the application

    Hi,
    I've some trouble prompting user to save change before abnormally closing the application (logging off, shutdownding machine...). I tried to use Runtime.getRuntime().addShutdownHook() and it doesn't seem to work. Here's part of my code. Help please!!!
    program print out "1" and stays in a "dead-lock" mode...
    private void shutdown() {
    boolean saveConfig = true;
    if (saveConfig) {
    System.out.println("1 ");
    int answer = JOptionPane.showConfirmDialog(null,
    "Configuration has been changed. Do you want to save
    configuration before exit?",
    "Save Config"
    JOptionPane.
    YES_NO_CANCEL_OPTION);
    JOptionPane.showMessageDialog(this, "Can't connect to unit. Error in Heal unit!", "Error", JOptionPane.INFORMATION_MESSAGE);
    System.out.println("2 ");
    if (answer == 0) {
    savefileButton_actionPerformed();
    jMenuFileExit_actionPerformed();
    else if (answer == 1) {
    jMenuFileExit_actionPerformed();
    else {
    return;
    else {
    int answer = JOptionPane.showConfirmDialog(itself,
    "Are you sure you want to exit? ",
    "Exit",
    JOptionPane.YES_NO_OPTION);
    if (answer == 0) {
    jMenuFileExit_actionPerformed();
    else {
    return;
    private class MyShutdownHook extends Thread {
    public void run() {
    shutdown();
    // add shutdown hook
    MyShutdownHook shutdownHook = new MyShutdownHook();
    Runtime.getRuntime().addShutdownHook(shutdownHook);

    doesn't much matter. shutdown hooks are not guaranteed to run or be able to finish.

  • Adobe Reader X (free) -- "Do you want to save changes" prompt

    Why is this prompt always coming up when I close a PDF document?
    "Do you want to Save Changes to  X   Before closing?"
    I am using the free Adobe Reader X 10.1.1.  I can't make any changes to the file since it's the free version, so why is it asking me to save changes?  Even if I just open the file and just close it right away without doing anything else the prompt comes up.

    I think pretty much any PDF created by CutePDFWriter did that (as well as others not created that way, but CutePDF seemed to do it reliably).
    To verify that I'd have to un-install 9.5.0 and re-install Reader X, which I'd rather not do (9.5.0 is better in other ways too - the integration with Chrome is nicer because the "print" and "save as" buttons always appear; they hardly ever appeared in Reader X when opening a PDF from Chrome).
    You can get CutePDFWriter here: http://www.cutepdf.com/products/cutepdf/writer.asp
    Let me know if you can't reproduce the problem (just post here) and I'll un-install/re-install, verify a file with the problem, and post it.
    For now I'm very happy with Reader 9.5.0; it's perfect.

  • Supress Prompt 'do you want to save changes to the design of form...

    Using Access 2007 SP2.
    I have an unbound main form(Master page) with a datasheet subform in an mdb.
    Close button is on the main form with the following code 
    DoCmd.Close acForm, Me.Name, acSaveNo
    I have tried with multiple scenarios but none of them got succeed(Below are those)
    set SourceObject property to "" while Unload
    SetWarnings  False in Form_load
    When I close the form I am prompted with  'do you want to save changes to the design of form...'
    Is there any way to suppress this annoying message?
    Can anyone help on this
    Thanks in advance

    When I close the form I am prompted with  'do you want to save changes to the design of form...'
    Which form is it prompting you about saving, the main form or the subform?  If you close the main form with "DoCmd.Close acForm, Me.Name, acSaveNo", I wouldn't expect you to get a prompt about saving changes to that form.  But I could
    see you getting a prompt about saving design changes to the subform.  Are you making any design changes to the subform while in form view, such as filtering, sorting, column-resizing, etc?
    Dirk Goldgar, MS Access MVP
    Access tips: www.datagnostics.com/tips.html

  • Prompting user to save changes before leaving jsp

    Folks,
    I want to be able to prompt the user to save changes on the page that he's on, before he navigates to a different one. one idea i explored is using the body onUnload event. the problem is that my page is split into multiple jsps with tiles, and the body tag is in a common tile that i can't really access.
    Any other ideas on how to do this?
    Thanks,
    Nilesh

    nthali wrote:
    well, onbeforeunload seems to be an IE specific event. we have some customers using firefox etc.It works in at least IE 5.0, FF 1.5 and Safari 1.3. Only not in Opera yet, because it very strictly follows the w3 standards. It doesn't support the onunload either though, which was also invented by Microsoft and adopted by FF and Safari, only a bit earlier than the onbeforeunload.
    And as I already said, the onunload is already too late. The browser will (already) be closed regardless of the (outcome of the) warning message.

Maybe you are looking for