Confirmation dialog box in JSf

Hi,
I have a Save (type 'Submit') button which onClick should give me a confirmation dialog box with Ok and Cancel.
Ok would go ahead with the process and cancel would take me back to where the page was before the save button was clicked.
Any help is really appreciated.
Thanks.

Hello,
I hope you can invoke a javascript function when the user clicks on "Save" button (onClick event for save button). Specify window.confirm(....) inside your javascript function which will give you confirmation window. I am not well enough how you want to handle navigation in your page.

Similar Messages

  • Submiting JSF form on clicking ok of Confirm dialog box

    Hi,
    We are using JSF 1.2 and Seam 2 in our project.
    We have set of requirements
    1)To throw a confirmation dialog box when user tries to navigate away from page with out saving the data changes. It includes browser closure, back button and refresh as well along with other application navigation links.
    2) upon clicking ok we need to save the current JSF form and redirect to where user is intended to navigate.
    Please let me know the best ways of implementing the above requirements.

    For the first point, I totally agree with Raymond and you can use the javascript function like this:
    <script>
    window.onbeforeunload =
    function(){
    if((window.event.clientX<0) || (window.event.clientY<0)){
    //create new confirm window here
    //I guess you can check on opening a new JSF page itself as a pop up.
    //in that page with normal form and submit buttons, I guess you can call JSF action methods.
    </script>

  • Displaying Multiple Sentences in Confirmation Dialog Box

    Hi Experts,
    Can anybody please tell me how to display three or multiple separate sentences in a Confirmation
    Dialog box. I am able to diaplay two sentences in a single line but the dialog box is getting stretched a
    lot. So i want to diaply them in separate sentences onr below the other.
    Thanks a lot.

    Hi shrini...
                   you want to number of line display in one dialog box ..
                  you have to declare one Strinh like thiss as below..
    have to create one event method as OK...which is visible in eventhandler code as
    findInEventHandlers("OK");
    create one method in component aas showBox....
    public void showBox( )
        //@@begin showBox()
         String   dialogText="welocme to""\n""India""\n".........................
          IWDEventHandlerInfo info=wdControllerAPI.getControllerInfo().findInEventHandlers("OK");
         IWDConfirmationDialog win=wdComponentAPI.getWindowManager().createConfirmationWindow(dialogText,info,"OKK");
      win.open();();
    thanks
    jati

  • File download element in confirmation dialog box

    Hi,
    Can I use File Download elements in Confirmation Dialog Box?Please raply me as early as possible.
    Regards
    Aniruddha

    Hi
    You can not use  File-Upload UI element inside confirmation dialog ,because there is no provision to add any UI ,except Button.
    Please avoid  my previous reply .
    Best Regards
    Satish Kumar
    Edited by: satish jhariya on Mar 3, 2009 11:29 AM

  • Multiple Confirmation dialog boxes event handling

    Hi all,
    I had a scenario, where i need to display two confirmation dialog boxes based on timers.
    At the first timers timeout confirmation dialog box poped up and user haven't done anything.
    second confirmation dialog popup appears after second timer timeout.
    But, my problem is closing or destroying the first dialog box, when handling the second dialog event or before second dialog popup on screen.
    Can anyone suggest the best approach to handle dialog destroy functionality.
    regards,
    Venkat

    hi!
    also refer to this link if you are going for dialog windows
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/903fed0d-7be4-2a10-cd96-9136707374e1
    thanks
    vishal

  • Logout confirmation dialog box

    Hi,
    Kindly provide me some sample example for showing confirmation dialog box in ADF (jspx page) on click of of a RichCommandImageLink?
    Thnx,
    Vikas

    Here we go:
    Code for the command button
                      <af:commandButton text="Logout" id="cb2">
                        <af:showPopupBehavior popupId="p1" triggerType="action"/>
                      </af:commandButton>
                      <af:popup id="p1">
                        <af:dialog id="d2" dialogListener="#{LoginLogout.dialogLogoutListener}">
                          <af:outputText value="logout?" id="ot2"/>
                        </af:dialog>
                      </af:popup>In a managed bead (here called LoginLogout) implement the dialog listener and navigation if the user really wants to logout
        public String logoutTarget(String aTarget)
            ExternalContext ectx = FacesContext.getCurrentInstance().getExternalContext();
            HttpServletResponse response = (HttpServletResponse) ectx.getResponse();
            String url = ectx.getRequestContextPath() + aTarget;
            HttpSession session = (HttpSession) ectx.getSession(false);
            session.invalidate();
            try
                response.sendRedirect(url);
                FacesContext.getCurrentInstance().responseComplete();
            catch (IOException e)
                e.printStackTrace();
            return null;
        public void dialogLogoutListener(DialogEvent dialogEvent)
            if (dialogEvent.getOutcome() == DialogEvent.Outcome.ok)
              logoutTarget("/byby.html");
        }The method logoutTarget(String aTarget) does the navigation to a target which is given as parameter. This method is called by the dialogListener if the use clicks ok. In case the user closes the dialog or clicks cancel, the dialog listener is NOT called at all.
    We use a normal html page as target of the logout because using a jspx page causing trouble sometimes. The session gets invalidated in the bean, but the URL still contains the old session info in the url, resulting in some side effects.
    Timo

  • Confirmation Dialog Box

    Hi All,
    With ADF UIX, what is the recommended way to implement a confirmation dialog box to get user's confirmation before an action is actually executed? Any UIX element like <messagebox>?
    Thanks.
    Elton.

    Elton,
    The best examples we have publicly available are at http://download.oracle.com/otn/nt/ids/uix/217/uix-demo-2.1.7.zip
    (I hope the link still works)
    This is for UIX 2.1.7, which is what ships with JDev 9.0.3. You'll want to do some things a bit differently if developing with UIX 2.2 in JDeveloper 10G.
    Hope this helps,
    Ryan

  • Tooltip for buttons on Confirmation Dialog Box

    Hi,
    How can we set the tooltips for buttons on the Confirmation Dialog Box.
    Pls throw some light on it.
    Rgds
    Shashank

    Found the solution:
    I Used 'ADMRadioGroupSuite1' Suite - RadioGroupSuite ("ADM Radio Group Suite") to group them. 

  • Confirmation Dialog Box Appears Disappears

    Hi,
    I am facing a problem here on Same os win 98 using different versions of Java run time environment.
    The code is supposed to work in this way.
    Applet is initiated by a click. a confirmation dialog box appears askign for input from a user in the form of a Yes or a No. if the user clicks Yes the applet continues otherwise it terminates.
    while using 1.4.1_02 This problem occurs that the Confirmation dialog box appears and then disappears for the jar is being downloaded.
    But using 1.3.1_04 gives no problems and the Confirmation box does not disappear.
    Regards,
    Saurabh

    Hmmm, are you running 10.6.8 or later & installed the Security updates?
    Java was an attack vector for FlashBack.
    Disable Java in your Browser settings, not JavaScript.
    http://support.apple.com/kb/HT5241?viewlocale=en_US
    http://support.google.com/chrome/bin/answer.py?hl=en-GB&answer=142064
    http://support.mozilla.org/en-US/kb/How%20to%20turn%20off%20Java%20applets
    Flashback - Detect and remove the uprising Mac OS X Trojan...
    http://www.mac-and-i.net/2012/04/flashback-detect-and-remove-uprising.html
    In order to avoid detection, the installer will first look for the presence of some antivirus tools and other utilities that might be present on a power user's system, which according to F-Secure include the following:
    /Library/Little Snitch
    /Developer/Applications/Xcode.app/Contents/MacOS/Xcode
    /Applications/VirusBarrier X6.app
    /Applications/iAntiVirus/iAntiVirus.app
    /Applications/avast!.app
    /Applications/ClamXav.app
    /Applications/HTTPScoop.app
    /Applications/Packet Peeper.app
    If these tools are found, then the malware deletes itself in an attempt to prevent detection by those who have the means and capability to do so. Many malware programs use this behavior, as was seen in others such as the Tsunami malware bot.
    http://reviews.cnet.com/8301-13727_7-57410096-263/how-to-remove-the-flashback-ma lware-from-os-x/
    http://x704.net/bbs/viewtopic.php?f=8&t=5844&p=70660#p70660
    The most current flashback removal instructions are F-Secure's Trojan-Downloader:OSX/Flashback.K.
    https://www.securelist.com/en/blog/208193454/Flashfake_Removal_Tool_and_online_c hecking_site
    More bad news...
    https://www.securelist.com/en/blog/208193467/SabPub_Mac_OS_X_Backdoor_Java_Explo its_Targeted_Attacks_and_Possible_APT_link

  • How to add a title to a JavaScript Confirm dialog box.

    function confirmDelete() {
    var msg = "Do you want to continue removing the items ?";
    return confirm(msg);
    Presently it says http://locahost:8080/says etc on the title bar for the dialog box. Instead I want to set the title as "Confirm Delete". How can I do this?

    You're talking about the document title as you set it in the HTML head? Just alter the title of the document accordingly in the same Javascript function.
    If you find Javascript hard, there's a nice tutorial at w3schools.com. And for Javascript related questions better use a forum devoted to Javascript. There are ones at webdeveloper.com and dynamicdrive.com.

  • Reg: Confirmation dialog box

    Hi All,
    I am using the below code for creating a dialog box. But it is giving me null pointer exception.
    IWDEventHandlerInfo ev1=wdControllerAPI.getViewInfo().getViewController().findInEventHandlers("YES");
                                  IWDConfirmationDialog dlg=wdComponentAPI.getWindowManager().createConfirmationWindow("No Customer Exists. Do you like to create new Customer?",ev1,"YES");
                                                                dlg.show();
    Kindly suggest.

    Hi
    use this
    //@@begin confirmationDialog()
              IWDConfirmationDialog confermationDialog = wdComponentAPI.getWindowManager().createConfirmationWindow(
                        displayMag, okHandle, label);
              confermationDialog.addChoice(cancelHandle, "No");
              confermationDialog.setTitle("Confirmation");
              confermationDialog.setIcon("~sapicons/s_n_crit.gif");
              confermationDialog.setWindowSize(550, 100);
              confermationDialog.show();
        //@@end
    Note : Handle represent the action not event which is there in your view pass it using
    wdThis.wdGetClickAction();
    Best Regards
    Satish Kumar

  • File Open Dialog box in JSF

    HOw do we display a File dailog box in jsf . Like JFileChooser..in jsf

    Use one of the many file upload components, e.g. Tomahawk has one.

  • I receive a confirm dialog box, when clicking on "stay on page" nothing happens

    I receive a notice that says "stay on page or leave page". When I click on either button nothing happens, then the page locks up and I have to shut down by pressing the power button as nothing will work and restart my computer a Mac Pro new 2012.
    I get the dialog box on this site:
    <br> http://www.toolkitcma.com

    Where are these buttons? I took a look at www.toolkitcma.com, but I did not see buttons with those messages on them. Maybe it might have helped if I had an account there, and I did not want to set up one just to test. Does that problem occur with any other site?

  • HT1343 Is there a shortcut for "Revert Changes" in the Close/Save confirmation dialog box?

    In OS X 10.8 Mountain Lion, the Close/Save confirmation dialog asks the user:
    Do you want to save the changes made to the document “Screen Shot 2012-10-12 at 12.35.12.png”?
    Revert Changes          Cancel     Save
    Is there a keyboard shortcut for this command, as there is one for Delete (Cmd+Delete) in new document closing confirmations?

    I'm not sure if there is a shortcut (I didn't find one), but if you turn on Full Keyboard Access in the Keyboard system prefs, all controls can be accessed from the keyboard. You can tab through (or arrow keys) the buttons. The active button will be outlined and can be activated with space bar. Since Revert Changes is the first button, it will come up outlined and you can just hit the spacebar to choose it.

  • Re-enabling confirmation dialog box when deleting playlists

    When deleting a playlist, a confirmation box will appear and also the option to no longer see the confirmation box. I enabled this option. I no want to see this confirmation box again. How can I re-enable it? I couldn't find anything in the .plist file.

    Ok, I got the dialog back. If you discard the preference file, it restores all the dialogs. But they really should add a way to change that without redoing your prefs. (Not a big deal, it takes you through most everything when you re-open iTunes.) Note, the dialog only shows up with playlists that have songs in them – empty ones just delete.
    Close iTunes, delete this file:
    /Users/<USERNAME>/Library/Preferences/com.apple.iTunes.plist
    Reopen iTunes, follow dialogs to reset preferences.
    Sure wish you could just "undo."
    One place they figured it out: http://discussions.apple.com/thread.jspa?messageID=6046139&#6046139

Maybe you are looking for

  • Errors in Export to PDF for web use - some images are lost when PDF is enlarged & in browser

    I have a multi-page PDF in InDesign CS6 that I want to export to view on the web. I need the file to stay under 2MB, and I need it to be crisp and nice enough to read the type on the page (as small as 9pt type). The errors that are occurring are the

  • Something went wrong when upgrading glibc

    /lib/ld-2.13.so is a circular link to itself, and therefore I cannot execute any program. It just says "too many levels of symbolic links". I still have a terminal and nautilus running. I was able to get ld-2.13.so from a different machine to a subdi

  • Workflow with iRecruitment

    Hi All.. There is a requirement to send reminder to Approvers ( Vacancy ). Should we use Workflow ? If Yes.. How ? Please help me understand with clear steps Thanks and Regards Deepak

  • Availability Check / Sales Order / Planning Strategy 50

    Hi, the material master has been setup with planning strategy 50. now if i sales order is created. the system directly created planned order for the sales order quantity. Now, there is smtimes a situation that some stock is already present in unrestr

  • Why is RotoBrush incapable of Remembering Propagation

    When I pan through frames that I have RotoBrushed (CS6 Version 11.0.0.378) it won't remember which frames it has propagated. You know when you've done some RotoBrush work and you're reviewing it.....so you pan through the frames without making furthe