Confirmation dialog-native window

Hi,
how can i create native yes/no confirmation dialog with air
window component like titlewindow with popup manager?
Thanks

Hi,
how can i create native yes/no confirmation dialog with air
window component like titlewindow with popup manager?
Thanks

Similar Messages

  • Feature Request -  use native Windows file browsing dialog

    I'm not sure if this has been brought up before. I wasn't able to find anything with a search in the forum, so I'll post it here.
    An enhancement request for SQL Developer would be to have it use the native file browsing dialogs in Windows. I'm using Windows 7, and it would be nice to have a native Windows dialog pop up when I go to open or save a file, rather than the ugly (I think) default one, which must be a generic Java file browsing construct. The native dialog would allow it to include all the links to Windows 7 libraries, favorites, and other things like Dropbox, Google Drive, etc. if those were installed.
    I'd be curious to hear what others think about this idea.
    Thanks,
    Brian

    At the risk of starting a Windows/Linux/Mac flame war, or pissing off Java developers, I'm not really into the whole Java write once, run anywhere approach. Particularly when it comes to look and feel. There are merits to cross-platform development when it comes to application functionality, but look and feel is a bit trickier. Windows has specific features that Windows users are used to seeing and using. Mac the same. Linux the same. I think this is especially true when it comes to dealing with the file system. So applications should adjust to the native environment nicely and not introduce elements that don't "fit in". Just MY $0.02. :-)
    I'm not a Java developer, but IvanG pointed out that it SHOULD be pretty easy to invoke a native Windows dialog box from Java. That would be my choice.
    Thanks!

  • Exception while Creating Confirmation Dialog Window

    Hi,
    Iam trying to create a confirmation Pop up window on the click of a "Save" button. I followed the procedure mentioned in the following link :
    http://wiki.sdn.sap.com/wiki/display/WDJava/CreatingConfirmationDialogBoxinWebDynproJava
    But when i click on Save button, iam getting this exception -
    com.sap.tc.webdynpro.services.exceptions.CreationFailedException: add of choice failed! (eventhandler: null)
    at the following line :
    IWDConfirmationDialog confDialog = wdComponentAPI.getWindowManager().createConfirmationWindow(
      /* dialogText, evtHndlr, buttonText OR evtHndlr.getName() */
      wdComponentAPI.getTextAccessor().getText("GoHomeConfQuestion"),
      evtHndlr,
      wdComponentAPI.getTextAccessor().getText("GoHomeConfCancel")
    Can any one please suggest me where iam going wrong and what is the cause of this exception?
    Thanks in advance.
    Regards,
    Maggie

    Sample code
    dialog part
    IWDConfirmationDialog createDialog=wdComponentAPI.getWindowManager().createConfirmationWindow("You are going to Submit.  Are you sure?",ctrl.findInEventHandlers("create"),"YES");
              createDialog.addChoice(ctrl.findInEventHandlers("doNothing"),"NO");
              createDialog.open();
    you have to create event not the metod
      public void create(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
    //your action
      public void doNothing(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin doNothing(ServerEvent)
    //your action
        //@@end

  • Code of confirmation dialog window

    Hi all,
          I have a component in which, I need to display confirmation dialog window when am trying to close a  window  with three buttons like YES,NO and CANCEL ...Its not like an pop-up window..can anybody provide source code for this..Thanks in advance

    Use Work Protect mode if you are running in Portal environment.
    SAP Online Help : http://help.sap.com/saphelp_nw70/helpdata/en/45/b76f4169e25858e10000000a1550b0/content.htm
    Thread which discuss the same :
    Re: Save Changes before leaving a web dynpro application

  • Use Native Windows Dialogs in Firefox 10

    I like to set Firefox 10 to use the original Native Windows Dialogs when Open, Save, Save as, etc. are called.
    I use Direct Folders to quickly navigate to any folder I need, this has been working fine until now, but not with this new version.
    I need to know what to set in "about:config" to use the old Windows Dialog boxes

    Hi,
    Firefox uses the Windows native dialog boxes by default. You can try to check this in [https://support.mozilla.com/en-US/kb/Safe%20Mode Safe Mode].
    [http://kb.mozillazine.org/Problematic_extensions Problematic Extensions]
    [https://support.mozilla.com/en-US/kb/Troubleshooting%20extensions%20and%20themes Troubleshooting Extensions and Themes]
    [http://support.mozilla.com/en-US/kb/Uninstalling+add-ons Uninstalling Add-ons]
    [http://kb.mozillazine.org/Uninstalling_toolbars Uninstalling Toolbars]
    Safe mode disables the installed '''Extensions''', and themes ('''Appearance''') in '''Tools''' ('''Alt''' + '''T''') > '''Add-ons'''. Hardware acceleration is also temporarily disabled - the manual setting is '''Tools''' > '''Options''' > '''Advanced''' > '''General''' > '''Use hardware acceleration when available'''. [https://support.mozilla.org/en-US/kb/Options%20window%20-%20Advanced%20panel?as=u Options > Advanced]. All these settings/add-ons can also be individually or collectively disabled/enabled/changed in Firefox normal mode to check if an extension, theme or hardware acceleration is causing issues.
    [https://support.mozilla.org/en-US/kb/Options%20window Options]
    If the problem persists, you may have to change the settings in Direct Folders or any other Windows enhancement/theme software.

  • How to get  the choice clicked by the user on a Confirmation dialog?

    Hi,
    'm trying with Confirmation dialog which should return
    'yes', 'No', or 'Cancel'
    I wrote like:
    String Message="Do u want  to update ??";
         IWDControllerInfo controllerInfo = wdControllerAPI.getViewInfo().getViewController();
         IWDConfirmationDialog dialog =wdComponentAPI.getWindowManager().createConfirmationWindow( Message, controllerInfo.findInEventHandlers("Yes"), "Yes");
         dialog.addChoice(controllerInfo.findInEventHandlers("No"),"No");
         dialog.addChoice(controllerInfo.findInEventHandlers("Cancel"),"Cancel");
         dialog.open();
    It works as a normal dialog window
    But how can I get the choice that is clicked by the user.
    ie . either 'Yes', 'No', or 'Cancel'.
    can any body help me
    thanks
    Smitha

    Smitha,
    In addition to your code, create 3 event handlers in your controller, name them Yes, No, Cancel. In every event handler you know what event was fired, i.e. what button is pressed.
    Valery Silaev
    EPAM Systems
    http://www.NetWeaverTeam.com

  • Confirmation Dialog when clicking on Tree Node.

    I am working on Oracle Apex 4.2.0.00.27 and I have the following problem:
    The code below shows the definition of a tree. The tree displays records from the table ACTIVITIES in hierarchical structure.
    When user clicks on a leaf/node of the tree he will be redirected to another page where the details of each Activity/leaf/node are displayed.
    The tree is part of a page where I have established a functionality to check for changes on the input fields of the page and inform the user when he tries to redirect without first saving the changes he made.
    What I want to do is:
    WHEN user clicks on a node of the tree AND he hasn't saved any changes he made
    THEN
    trigger a confirmation dialog.
    IF
    he clicks OK he is redirected to the node details page as defined on the tree definition:
    f?p=&APP_ID.:10:'||:APP_SESSION||'::::P10_ID:'||"ID"
    ELSE if he clicks CANCEL
    he stays on the same page.
    The condition to trigger the confirmation box is:
    if (document.getElementById('P0_CHANGES_DETECTED').value == 1)
    where P0_CHANGES_DETECTED is a universal hidden text field that is set to +'1'+ every time a change is made.
    and here is the tree definition:
    select case when connect_by_isleaf = 1 then 0
    when level = 1             then 1
    else                           -1
    end as status,
    level,
    +"NAME" as title,+
    null as icon,
    +"ID" as value,+
    null as tooltip,
    decode(PARENT_ID,null,null, 'f?p=&APP_ID.:10:'||:APP_SESSION||'::::P10_ID:'||"ID") as link
    from "#OWNER#"."ACTIVITIES"
    where GROUP_ID = :P20_GROUP_ID
    start with "ID" in (select ID from "#OWNER#"."ACTIVITIES" where GROUP_ID = :P20_GROUP_ID and PARENT_ID is null)
    connect by prior "ID" = "PARENT_ID"
    order siblings by "ID"
    I hope it is clear what I want to achieve. Thanks in advance.

    So you'll want to bind an event to all tree nodes that checks for the value and then fires the confirmation if there value is 1.
    Try something like this:
    - first, give your static ID attribute in your tree the value of tree_static_id (or whatever you want. just replace the id selector below with what you choose).
    - In your Page Function and Variable Declaration Javascript:
    function confirmSave() {
    var changeDetected = jQuery('#P0_CHANGES_DETECTED').val();
    if(changeDetected == 1) {
    //only do this if change is detected
    if(confirm('You have unsaved changes. Do you want to leave this page?')) {
    window.location('[your url here]');
    jQuery(document).ready(function() {
    //bind function to the click event
    $('#tree_static_id').find('li a').bind('click', function() { confirmSave(); } });
    });Hope this helps

  • 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

  • Centralizing standard Confirmations Dialog in external Component

    Hello Community,
    i'm developing on an application consisting of several different development-components, each containing again different wd-components. the component design of wd is a great advantage for reuse components.
    but i still have a problem to achive better reuseability.
    so i have one development-component which contains a component which at the moment contains methods (in the component-controller of that component) for outputing standard-messages. no view controllers or windows are defined.
    But i also have some Stanard-Confirmation Dialogs which i want to reuse.
    So i declared a new method in that central component-controller which i also declared in the interface controller of the component:
      //@@begin javadoc:dialogWarningNotYetSaved()
       * Method declared by application.
      //@@end
      public void dialogWarningNotYetSaved( com.sap.tc.webdynpro.progmodel.api.IWDAction contUnsavedEvent, com.sap.tc.webdynpro.progmodel.api.IWDAction contSavedEvent, com.sap.tc.webdynpro.progmodel.api.IWDAction abortEvent )  {
        //@@begin dialogWarningNotYetSaved()
           IWDMessageManager msgMgr = wdComponentAPI.getMessageManager();
           msgMgr.reportMessage(IMessageMessages.NOT_YET_SAVED, null);
           String dialogText = wdComponentAPI.getTextAccessor().getText(IMessageMessages.NOT_YET_SAVED, null);
           IWDConfirmationDialog dialog = wdComponentAPI.getWindowManager().createConfirmationWindow(dialogText, contUnsavedEvent, "Continue Unsaved");
           dialog.addChoice(contSavedEvent, "Save and Continue");
           dialog.addChoice(abortEvent, "Abort");
           dialog.show();
        //@@end
    The main problem is, that the dialog does not return a value but instead does fires an action or event, attached to a choice.
    But it seems, that such an event has to be one declared in the component. But i want to call the method containing the Confirmation-Dialog from another component and so, in my opinion, it has to trigger the event or action in the calling component. to reach this, i put the actions into parameters of the central method in the external component and put this action-parameters in the dialog.addChoise Method.
    But doing so, WD-Runtime throws an exception, that the actions are not known in the repository of the component???
    does anybody has an idea what i have to do to make it work correctly?
    regards and thanx in advance
    Matthias

    Hi,
    Create one event "SaveAndContinueEvent" with some parameters in your Common Component's Component Controller.
    SaveAndContinueEvent(String param1, String param2).
    And create one more method as "saveAndContinue(String param1, String param2)" in the same Component Controller with same parameters and
    fire the event "SaveAndContinueEvent" in that method as below.
    wdThis.wdFireSaveAndContinueEvent(param1, param2);
    Now in the "contSavedEvent" event handler of the View invoke the method saveAndContinue() of Component Controller as below.
    wdThis.wdGetCommonCompController().saveAndContinue(param1, param2);
    Now in the Other Components, from where you are invoking this Common Component to open the dialog box, in the corresponding Views create the eventHandler as
    "SaveAndContinueEventHandler" and while creating this eventHandler select "SaveAndContinueEvent" of Common Component as a source event to that eventHandler.
    Now when ever user clicks on SaveAndContinue button the "SaveAndContinueEvent" event of Common Component will be fired and that even will be handled by "SaveAndContinueEventHandler" of the main view.
    Regards,
    Charan

  • Wrapping the text on the confirmation dialog

    Can any one pls tell me how to wrap the text on a confirmation dialog?
    thanks in advance.
    regards
    Lakshminarayanan.V

    Hi,
    Currently this is simply not possible. Probably later TextView UI element will be enhanced to support this (at least, this feature is at "Whish List", search this forum for word POLL), and confirmation dialogs will inherit desired behavior automatically.
    For now you have to create your own component and use it pop-over window as confirmation dialog. In your component you may either use TextArea for multi-line display (quick and ugly) or split string into several context attributes and display them using several TextView UI elements (either dynamically created or pre-created till some reasonable maximum, say, 5 lines <-> 5 controls)
    VS

  • Confirm Dialog (JavaScript)

    Hi,
    I'm using the JavaScript confirm dialog attached to a button (return confirm('xxxxxxxxxxxxxxx').
    It works fine but I need two things:
    1. How can I change the window title?
    2. How can I change the titles of the two buttons? (I need them in Spanish).
    Thanks a lot for your help

    Hi!
    As far as I know, there is no possibility to change title of standard dialogs like alert, confirm etc. You can use window JavaScript object and set title in it's parameter name.
    And since JavaScript is realized in browser, it seems that change of your locale should change button's title to language of locale.
    Thanks,
    Roman.

  • Poping Up a Confirmation Dialog

    I would like to popup a confirmation dialog when a user clicks a 'cancel' button in my page. If the user clicks 'NO' in the dialog, data is not cleared and navigation is canceled.
    I tried this ...
    public String cancelBtn_action() {
            int i = JOptionPane.showConfirmDialog
                        (null, "Do you really want to clear all data and start over?",
                            "Warning", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
            if(i == JOptionPane.YES_OPTION) {
                getSessionBean1().clearBeans();
                return "clear";
            else return "null";
        }... but the dialog is hidden behind all the open windows on my machine (b/c the 'null' argument in showConfrimDialog, I guess).
    Can I attach this dialog to the page somehow (so it does not get hidden)? Should I even use Swing? Is there a prefered way to use popup dialogs in JSF/Creator?
    Any information would be much appreciated.

    Thank you for your reply.
    Pardon any redundancy, but to be sure that I am making myself clear and that I am understanding your response...
    At first 'cancel_action()' ( event handler in the page bean) looked like this:
    public String cancelBtn_action() {
           getSessionBean1().clearBeans();
           return "cancel";
    }To make this code conditional I next tried this:
    public String cancelBtn_action() {
            int i = JOptionPane.showConfirmDialog
                        (null, "Do you really want to clear all data and start over?",
                            "Warning", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
            if(i == JOptionPane.YES_OPTION) {
                getSessionBean1().clearBeans();
                return "cancel";
            else return "null";
    }This code works 'fine', except that the dialog gets displayed behind all open windows where the user can not see it. (If there is a way to tie the dialog to the browser frame so it does not get buried (maybe there is?), this would allow all the JOptionPane stuff to be leveraged nicely with JSF).
    Since you are not modifying any data based on the
    response received from confirmation dailogclearBeans() clears data previously entered in several session-scoped beans (so data is (conditionaly) modifed). "cancel" and "null" are different navigation cases
    I would suggest to use javascript based dialogs. I like the simplicity of using javascript, but I need to set a flag (or something similar) in my page bean to conditionaly control navigation and whether to clear data stored in the session beans. This seems to require that the javascript calls a method in the page bean. Can this be done with JSF?
    >
    You can also use another jsp page in a popup as
    confirmation dialog by specifying the size of the new
    page.
    So I guess you mean a non-JSF JSP page? Since I need to finish executing the code in the event handler that was interupted by the confirmation dialog, I think that JSF navigation/lifecycle issues would be a problem. Am I correct?
    Again pardon any redundancy.
    More details on either (or any other) approach would be helpful.

  • Confirmation dialog

    Hi everyone,
    I'm playing around with some GUI and need to confirm with user when exitting program. If he hits OK, I shut down my server and exit the program, when he hits cancel I want to continue and not close anything. I thought I could do it with windowListener in the following way:
    public void windowClosing(WindowEvent e){
    disconnect();
    public void disconnect()
    // Show confirmation dialog
    int answer = JOptionPane.showConfirmDialog(this, "Do you really + "want to shut down the server?","Confirmation",
    JOptionPane.OK_CANCEL_OPTION, JoptionPane.QUESTION_MESSAGE);
    // Handle decision
    if(answer == JOptionPane.OK_OPTION){
    System.out.println("Shutting down server!");
    this.setVisible(false);
    System.exit(0);
    However, even when I hit cancel, my window disappears, but program keeps running. Obviously, there must be a different way to do it. Any suggestions?

    http://java.sun.com/docs/books/tutorial/uiswing/components/frame.html#windowevents

  • Confirmation Dialog which saving any settings at OCI Mapping

    Hi Experts,
    OCI Mapping:
    when i change and settings at OCI and when i click on Save button, I used to get popup(Confirmation Dialog) window with messaage as " Price fields are not configured consistently across all views".
    I am not able to findout what is exact problem and why it is showing such message?
    You help will be rewarded in points..
    Thanks
    Bharat

    that happens when the same price setting fields (contract and list price) are not set for all the views in the catalog .
    you should have the same fields (settings) for price - in all the views in the catalog (Resultset , Itemdetials, context, compare and Shopping list) to ignore the warning
    thanks
    -Adrivit

  • 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>

Maybe you are looking for