How can I stop OK button from closing dialog when validations are failing?

I am using jDev 11.1.1.6.0.
I am using a commandButton with a showPopupBehavior. If I change values in the dialog that cause validation messages, I can still press the OK button and the dialog closes. Is there a way to prevent the dialog form closing (without use of javascript) if there are validation errors? Is this a bug in ADF?
My .jsff page contains the following fragment
<af:commandButton id="cb-new"
text="#{ResourcesGenBundle['AltTxt.New.Newobject']}..."
immediate="true" useWindow="true">
<af:showPopupBehavior popupId="p-crf" triggerType="action"/>
</af:commandButton>
<af:popup id="p-crf" contentDelivery="lazyUncached"
binding="#{pageFlowScope.manageRule.createRuleFolderPopup}">
<af:dialog id="d-crf"
title="#{ZspBusinessRulesGenBundle['Action.CreateRuleFolder.CreateRuleFolderInManageSalesP']}"
contentWidth="360" contentHeight="360" resize="on"
dialogListener="#{pageFlowScope.manageRule.onCreateRuleFolderDialogEvent}"
stretchChildren="first">
<f:subview id="s-mrf">
<jsp:include page="/oracle/apps/spe/businessRules/publicUi/page/ManageRuleFolderPF.jsff"/>
</f:subview>
</af:dialog>
</af:popup>

trick was to set autoCancel="disabled" on the popup and hide the popup in the DialogListener when appropriate

Similar Messages

  • How can I stop a JFrame from closing when clicking the close button.

    I need to display a dialog when a user attempts to close my app, giving them the option to close, minimize or cancel. How can I stop the form from closing after the user makes his selection? I have the folllowing code, but my form still closes after selecting an option:
    private void formWindowClosing(java.awt.event.WindowEvent evt) {                                  
            //An array of Strings to be used a buttons in a JOptionDialog
            String[] options = {"Close", "Minimize", "Cancel"};
            //Determines what the user wants to do
            int result = JOptionPane.showOptionDialog(null, "What to you want to do?  Close the application, minimize or cancel?", "Please select an option...", 0, JOptionPane.QUESTION_MESSAGE, null, options, options[0]);
           //Determines what to do, depending on the user's choice
            if (result == 0) {
                //Close the application
                System.exit(0);
            } else if (result == 1) {
                //Minimize the application
                this.setState(Frame.ICONIFIED);
        }Any help would be much appreciated!

    import java.awt.event.*;
    import javax.swing.*;
    public class test extends JFrame {
         public static void main( String[] args ) {
              new test();
         public test() {
              setSize( 200, 200 );
              //the next line makes the JFrame not close
              setDefaultCloseOperation( JFrame.DO_NOTHING_ON_CLOSE );
              //now add a listener that does the trick
              addWindowListener( new WindowAdapter() {
                        public void windowClosing( WindowEvent e ) {
                             //ask the user and do whatever you wish
              setVisible( true );
    }

  • Teaching Myself Python. How Can I Stop The Program From Closing :)

    I wrote a program today that will log into a router here at work and check if the line protocols are up and if i can see thir mac address.  If i run it from the IDLE program it works fine.  When i run it as just crosnet.py it runs fine but closes before i can see the output.  I imagine there is some simple line that will have run and just sit?  Or even better, loop back to the beginning and wait for me to give it a new number to then telnet with.
    #import getpass
    import sys
    import telnetlib
    HOST = "111.111.111.111"
    password = "password"
    vpc = raw_input("Enter The VPC Number: ")
    #password = getpass.getpass()
    tn = telnetlib.Telnet(HOST)
    #tn.read_until("login: ")
    #tn.write(user + "\n")
    #if password:
    tn.read_until("Password: ")
    tn.write(password + "\n")
    #tn.write("sh int atm6/0.vpc\n")
    tn.write("sh int atm6/0." + str(vpc) + "\n")
    tn.write("sh arp | in " + str(vpc) + "\n")
    #tn.write("exit\n")
    print tn.read_all()
    Sorry the code is bad, dont know python and i was shown a outline of how to telnet and adjusted it to my needs.

    while True:
    and just indent everything else under it
    Ends when you press ^C.
    if you wish to have a way to break out of the loop, say, when you press enter at the VPC number without entering anything, add the following after your vpc input:
    if not vpc:
    break
    which will break out of the while loop and end your program.
    Last edited by buttons (2007-12-14 22:03:06)

  • How can I stop sound track from being divided when adding clips to other tracks in PrE12?

    The situation:
    I have a project with several minutes of video clips on the timeline (expert view) in "Video 1/Audio 1."  There is also music on the sound track (below the empty "Narration" track).
    Any time I make an edit to the Video 1 track, PRE cuts the Sound Track.  (Note that this is not the Audio 1 track, it's the sound track which is two tracks away.)  If I insert a clip, the Sound Track is cut and left with a gap.  Same if I do a FreezeFrame insert.  This is bad enough (make ten insertions, have the Sound Track chopped into ten separate pieces), but it gets worse: when I try to slide the Sound Track pieces back together, the Video 1 clips will be moved around.
    This appears to be a major bug but I'm hoping there is a simple way to deal with it.
    Here's what the Manual (p.71) has to say about it (not much).
    "When you insert a clip into the Expert view timeline, adjacent clips on all tracks shift to accommodate the new clip. By shifting all clips together, the audio and video of the existing clips remain in sync."
    * The question here is, adjacent to what?  The Sound Track is a continuous music clip of many minutes; it is alone on the Track, and there is nothing on the track above it (Narration track).  So it's not adjacent to anything, and yet it is being chopped up.
    The Manual continues:
    "Sometimes, you don’t want all clips to shift with each insertion. For example, when you add background music that superimposes the entire movie, you don’t want clips to shift."
    *They got that right, but they don't say anything about how to prevent it.
    This next makes no sense at all:
    "To shift specific clips togather, press the Alt key as you insert.  At a time, you can shift specific clips simultaneously on a maximum of two tracks.  These include the track receiving the insertion and the track containing the linked audio or video (if any). The affected tracks shift together, remaining aligned. The clips on other tracks are unaffected."
    *There is no mention of how to specify what clips would be shifted, or not.
    I'm not dealing with linked clips.  And they tell me how to shift clips (sort of) but nothing about how to stop clips from being cut up and shifted.  This all makes it very hard to create a coordinated product.
    Any suggestions or solutions will be much appreciated.

    Thanks, ATR,
    I wll try this--but I still am unclear on how to do what the Manual says is possible: select clips on another track that WILL be moved, if I so desire, so as to remain synched to the main Video track.
    UPDATE:
    In the case of inserting Freeze Frame, I just tried both Ctrl method and Alt method, and neither worked.
    1. Put Video on Vid1 track
    2. Put Music on Sound Track
    3. Ran a few seconds of Vid
    4. Stopped Vid, selected Freeze Frame
    5. Held down Ctrl key while clicking "Insert in Movie"  also tried with holding down Alt key.
    Result: a 3 second still was inserted int the Vid1 track.  A corresponding gap was created in the Sound Track.
    6. Slid the final part of the Sound Track to the left along the timeline to re-connect it to the next segment created by the above process.
    Result: the video following the final Freeze Frame was pushed to the right end of  Video1 track.
    7. Slid the Sound Track all the way to the left.
    Result: the entire Video 1 Track contents were pushed to the right and divided in pieces.
    I documented each step with screen shots which I can send if you want them and if I can figure out how to do it.
    UPDATE #2
    In the case of inserting a video clip to the Timeline, I just tried both Ctrl method and Alt method, and neither worked.
    1. Locate video in Project Assets
    2a. R click video in Project Assets (pull-down menu appears), hold down Ctrl, click Insert to Timeline.
    Result: Vid clip is inserted on Video 1 track, Sound Track is separated with a corresponding gap.
    2b.  R click video in Project Assets (pull-down menu appears), push Alt
    Result: pull-down menu disappears as soon as Alt is pushed down.
    I can stil drag the Vid clip but it's one more manual step...I love shortcuts!!

  • How can I stop my iPhone from Losing space when I STREAM iTunes Movies?

    I mean, isn't the point of streaming so that I don't have to download the movie?  Even if the phone has to download the movie, why isn't there some option to delete the downloaded movie from phone to free up some space!?

    Settings > Mail, Contacts, Calendars. Is Time Zone Support on or off?
    If you don't want the date and time updated automatically with your iPhone, you can turn this off at Settings > General > Date & Time > Set Automatically > Off.

  • How can I stop disc images from popping up when connecting a drive?

    Hello,
    I have an external hard drive with several partitions, all formatted as Mac OS Extended. Two of the partitions are disc images of the install CD's for Drive Genius and Data Rescue from Prosoft Engineering. When I connect the drive using a FW800 cable to any Mac running Leopard or Snow Leopard, all of the partitions on the drive are mounted in the Finder and these two partitions pop up the window for the installer, as if I had inserted the CD. Is there a way to suppress these windows from popping up every time I connect the drive? Thank you!
    -Mike

    See http://discussions.apple.com/message.jspa?messageID=12561402

  • How can I stop the "Cannot Open iTunes" dialog

    How can I stop the "Cannot Open iTunes" dialog when more than one user is logged into the computer without switch to the user using and closing iTunes. Why doesn't the dialog AT LEAST have the option to 'Do not attempt to open iTunes for this User any more' instead of the lazy programmer OK button only. OR Even the Do not ask this again option.

    Just adding to the last answer:
    Sony Reader; free download from Sony intended to run with Sony eReaders but works quite happily without.
    https://ebookstore.sony.com/download/
    I prefer ADE1.7.2 to Sony Reader, and Calibre to either (for DRM-free books),
    but Sony Reader certainly worth a try to see how you get on with it.

  • How can I stop the program from going through all of the text previously put in.  It is making the process very slow.

    How can I stop the program from going through all of the text previously put in.  It is making the process very slow. 

    while True:
    and just indent everything else under it
    Ends when you press ^C.
    if you wish to have a way to break out of the loop, say, when you press enter at the VPC number without entering anything, add the following after your vpc input:
    if not vpc:
    break
    which will break out of the while loop and end your program.
    Last edited by buttons (2007-12-14 22:03:06)

  • How can i stop my picture from flipping when I take it on the front camera?

    How can i stop my picture from flipping when I take it on the front camera? Need help as it's frustrating me:(

    Hmm...Double click on the Home button and try to delete the camera app then launch it again that should fix it. You can also turn off your phone and turn it back on again.

  • How can I stop my screen from going on and off when I play games ?

    HOw can I stop my screen from going on and off all the time when I touch it.

    Maybe it is a hardware problem, but you will not know that unless you start eliminating all possible software issues. Try this. Close all apps in the recents tray and reboot your iPad.
    Tap the home button once. Then tap the home button twice and the recents tray will appear at the bottom of the screen. Tap and hold down on any app icon until it begins to wiggle. Tap the minus sign in the upper left corner of the app that you want to close. Tap the home button twice.
    Reboot the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider if it appears on the screen - let go of the buttons. Let the iPad start up.

  • All my contact are being copied to my friend's iphone and i also am getting his contacts on my phone,when i delete a contact it also deletes it from his phone,we are sharing the same apple ID. How can i stop our contacts from being shared between us

    All my contact are being copied to my friend's iphone and i also am getting his contacts on my phone,when i delete a contact it also deletes it from his phone,we are sharing the same apple ID. How can i stop our contacts from being shared between us

    Everything that you have checked in your icloud settings will be shared between devices using the same Apple ID.  If you don't want icloud to share that information, then simply turn off that process under settings > icloud

  • How can I stop my iPhone from synching my contacts and groups lists twice?

    How can I stop my iPhone from synching my contacts and groups lists twice....I am using iCloud but am not sure how correct this duplication.

    Go into Settings>Mail, Contacts, Calendars. Is this happening at the bottom in the signature section, or in the header of the mail where your email address is? If it is the signature, then go to the Signature area of the Mail settings. If this is in the header, then go to the account in question and edit your account information to include your name instead of Johnny.

  • When I record an audio track, there is a waveform. When I stop recording, the waveform disappears and becomes a straight line. It also disappears from the track edit window. But the sound is there. How can I stop the waveform from disappearing?

    When I record an audio track using Logic Pro X, there is a visible waveform which appears as I record. When I stop recording, the waveform disappears and becomes a straight line. It also disappears from the track edit window. But the sound is still there. How can I stop the waveform from disappearing? And can I do something to view it after it has disappeared? Anyone know the anser?

    In Logic:
    Preferences/Audio Set Recording Delay to 0 <zero>
    This should always be set to zero unless a specific set of circumstances exist and you're audio drivers do not report position correctly.
    On occasion, usually when importing a Logic 9 project, Logic-X randomly changes this to a negative/positive number.  It's actually a bug in Logic, as it should always display the waveform.

  • How can i stop my phone from vibrating in my ear when i am on the call?

    How can i stop my phone from vibrating in my ear when i am on the call? I usually keeps my phone on vibration mode so i get notified when there is a new mail or message? However, when i am on the call, then also, it vibrates in my ear everytime a mail comes. Very irritating. I use my business phone and mails keep coming every 2-5 mins.
    Please help.

    very impractical . specially when you call A LOT and receive notifications constantly!

  • How can i stop internet media from flooding elements 6?

    how can I stop elements 6 from constantly importing internet photos and flooding my memory?

    PSE isn't importing photos off the internet, but it could be importing photos from your hard drive that are being placed there as you browse the internet.
    It's likely that you've told PSE to import all new photos on your hard drive using the Watched Folders mechanism.
    In the Organizer, go to File > Watch Folders...
    See the list of folders PSE is currently watching.
    Check the setting near the bottom of the dialog as to what PSE should do when it finds new images in the folders it is watching.
    Make any necessary changes to have it do what you want it to do.
    Cheers
    Bob

Maybe you are looking for