Blocking Dialogs

I have a dialog in my program that prompts for a user name and password but I need to "block"...the program shouldn't continue until the "OK/CANCEL" button is clicked in the dialog..similar to what the JOptionPane functions do. Can someone give me an idea of how I can do this?

u can use JOptionPane.tht will return a integer value
Yes, but that's not what the OP's asking for.
@OP: Note that the JOptionPane methods take an Object parameter for their content. You can build yourself a little form and pass that in, and it will be displayed in the centre of the dialog; so just add whatever fields you need to a JPanel and then after the dialog returns you can just read the contents of those fields.

Similar Messages

  • Allow/Block dialog comes up even when sites are in Trusted Sites and/or Intranet sites.

    I have an issue where a user is prompted with an "Allow or Block" dialog everytime she clicks a link within a company created PDF.  The links all go to intranet sites, which are defined in the intranet section, and even placed in tnhe Trusted Sites as well.  How can I stop this dialog from popping up each time?
    Software versions in play are:
    Acrobat X
    Windows 7
    IE 9
    TIA for any assistance.

    Please be more specific.
    How are the servers defined in the Trust Manager and the OS Internet Options Control Panel?
    http://mycompanyserver.mycompanyname.com
    But does the link in the PDF file look something like this:
    http://mycompanyserver/pathtothePDFfile/thePDFfile.pdf
    If so, then Acrobat and Windows are probably not seeing it as the same server.  The FQDN (Fully Qualified Domain Name) is not defined as the same server.
    The same would be said for a server that had "https://" in front of the URL.  It's not considered the same server because it exists on a different port number.  Usually 443 for https.

  • Block dialogs from coming to front automatically if not already front app

    It's 2011, 43 years since I first used and programmed computers...
    I do a lot of writing, and I am really tired of applications (in the background) suddenly popping up dialog boxes without asking permission first, since sometimes I am typing away and the dialog box traps it, or worse: I hit the enter key just as a yes/no dialog comes up, and I have *no* idea what I said Yes to...
    Is there any way to Block dialogs from popping to the front without, say, bouncing the dock icon first?
    thanks

    Do you see a flashing Photoshop icon or button in the TaskBar if this occurs?
    If so, Windows 7 is blocking Photoshop from popping to the front, possibly because it thinks Bridge is still current.
    I don't use Bridge, so I can't tell you whether it's an improper interaction at that level, but I can say that sometimes video drivers can affect window behavior...  Check to see if your video card manufacturer has released a newer driver than the one you currently have.
    -Noel

  • Avoiding "PDF Modification Detected" blocking dialog

    Hello,
    I am working on an Illustrator script opens an AI or PDF file, extracts some information, then converts it to a JPEG.  It is designed to run unattended in batch mode, and sometimes is used to process PDF files which were not created by us, but were submitted from the Internet.  The script is working properly for most documents.
    However, we sometimes end up with PDF files that cause this warning dialog to pop up:
    PDF Modification Detected
    This document has been modified outside of Adobe Illustrator.
    How do you want to proceed?
    [ ] Discard changes, preserving Illustrator editing capabilities
    [ ] Keep changes, reducing Illustrator editing capabilities
    Cancel; OK
    The dialog is blocking, and so prevents our unattended script from running until a user walks to the console and presses "OK" or "Cancel".
    The script is in JavaScript, and contains this line, which I thought would prevent this sort of dialog from coming up:
    app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;
    Does anybody have suggestions for avoiding this dialog?  I would prefer for it to just select "OK" automatically, but even failing would be much better than blocking.
    Alternatively, any suggestions for detecting documents that are likely to trigger this warning beforehand?
    Thanks!
    -----Scott.

    It could be that this is just caused by out-of-sync timestamps on the file.
    But possibly you've got a bigger problem. PDFs generated by Illustrator may in fact contain two files: a PDF and an AI. WHen you open them in Illustrator, the AI will be edited (and the PDF will be updated when saving). When opening them in other software, the PDF part will be edited (and the AI won't be updated). Illustrator realizes this and warns you.
    You know your files, you'll have to find out what happened.

  • Showing a blocking dialog

    I guess I haven't done this in a long time or I'm just having a HUGE case of the Mondays, but I can't figure out how to show a dialog and have the call block until the dialog is hidden again (other than using the deprecated call show(), which I don't want to do).
    Basically, I need a non-deprecated equivalent to JDialog.show().
    Anybody out there want to lend me a hand?

    Are you trying to make a modal window?
    Because if you set yourDialog.setModal(true) it will block the calling thread. If you set yourDialog.setModal(false) it will NOT block the calling thread.
    Run the program as I have it first. Notice how the console outputs are blocked until you close the dialog?
    Next, see how un-commenting this.setModal(false) and commenting out this.setModal(true) changes the console output. It makes it so you have a dialog, but with no blocking on the calling thread.
    -Js
    import javax.swing.JDialog;
    public class ModalWindowExample extends JDialog
         public ModalWindowExample()
              this.setTitle("This is a modal dialog");
              this.setSize(200,100);
              this.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
              //SET THE DIALOG TO MODAL IF YOU WANT TO BLOCK
              this.setModal(true);
              //DONT SET THE DIALOG TO MODAL IF YOU WANT THE THREAD TO CONTINUE
              //this.setModal(false);
              this.setVisible(true);
         public static void main(String args[])
              System.out.println("Starting a thread");
              new ModalWindowExample();
              System.out.println("Continuing a thread after a dialog");
    }

  • How to overcome Security Block on link in PDF?

    I created a PDF using Word 2010. The document has website links. When I tested the PDF, an Adobe "Security Block" dialog box said it "does not allow connection" to a site, but it allows access to the other website link. How do I overcome this and fix the security settings? Thanks.

    Hello,
    Please check if the links below help you in configuring opening of file:// URIs. Please do note that FF does support file:// URIs out of the box, provided the format is set properly
    *[http://superuser.com/a/103030 Open file:// URIs in Firefox]
    *[http://kb.mozillazine.org/Firefox_%3a_Issues_%3a_Links_to_Local_Pages_Don%27t_Work Firefox local pages]
    Hope this helps.

  • Data exchange Mainscript (SCRIPT) with script block (DAC)

    Is there any way to exchange data beetwen a Mainscript (SCRIPT) with
    user-dialoges and script block (DAC) in this way that the script in
    scriptblock can access to this data?
    Background: I write a DAC-Application with some script-blocks for
    reading and writing data to/from real devices. During the development
    I'd like to simulate all device accesses because I don'd have the
    devices in my office. I write all scripts with a branch for simulation
    an real measurement on startup.
    How can I execute a swich (simulation / mesurement) without changing
    all my scripts all times? Can a script read a variable anyway (Variable
    from Mainscript, Diadem-Uservariable or "Hilfsvariable" like L1)? 
    Can I fill "DeviceParam1V" with content of a variable?
    I could use a input channel connected with a formula-block for it. (The
    formula-block can read a variable.) But this way is uncomfortable an
    don't work for input blocks.
    Martin Bohm
    [email protected]

    Because the DAC Script is executed in its own runtime environment you cannot use the DIAdem variables as in a normal VBS or a SUD.
    Still, there are ways to exchange information.
    First of all by an extra channel as Input (you named it)
    Secondly, there are several variables you can use. Have a look at the Script DAC block. There are two fields called Parameter1 and Parameter2. And each signal you configure has a parameter of its own.
    Prior to starting the scheme, you can use a script to change the value of those parameters:
    Call DACObjOpen("Script-in1")
      VBSSignalParam(1) = "abc"
    Call DACObjClose("Script-in1")
    Is changing the parameter of the first signal that is configured.
    Call DACObjOpen("Script-in1")
      VBSParameter1 = "1st device parameter"
      VBSParameter2 = "2nd device parameter"
    Call DACObjClose("Script-in1")
    is changing the global device parameters.
    On the side of the Script DAC driver VBS you cann use the paramP funtion to access the signal parameter that corresponds to the actual channel (as referenced by ChannelnumberP)
    ' SFD_ReadChannel
    ' Zweck               : Lesen eines Wertes für den Kanal "ChannelNumberP"
    ' ChannelNumberP      | Kanalnummer aus dem Block-Dialog
    ' ParamP              | Vom Anwender definierte Variable aus dem Block-Dialog
    ' DataP               | Variable zur Rückgabe des neuen Kanalwertes. Diese
    '                     | Variable sollte zumindest auf einen gültigen Wert
    '                     | initialisiert werden.
    ' ErrorP              | Variable zur Rückgabe einer Fehlermeldung. Wird diese
    '                     | Variable gesetzt, stoppt DIAdem die Messung
    Sub SFD_ReadChannel( ChannelNumberP, ParamP, DataP, ErrorP )
    End Sub
    To acces the device Parameters, use the init function:
    ' SFD_Init
    ' Zweck               : Diese Prozedur wird während des Messungsstarts aufgerufen
    ' DeviceParam1V       | Erster Parameter, der vom Anwender im DAC-Block
    '                     | eingegeben werden kann
    ' DeviceParam2V       | Zweiter Parameter, der vom Anwender im DAC-Block
    '                     | eingegeben werden kann
    ' ErrorP              | Variable zur Rückgabe einer Fehlermeldung. Wird diese
    '                     | Variable gesetzt, stoppt DIAdem die Messung
    Sub SFD_Init( DeviceParam1V, DeviceParam2V, ErrorP )
    End Sub
    Ingo Schumacher
    Systems Engineer Sound&VibrationNational Instruments Germany

  • Non-blocking file selector?

    Running W98/Labview 5.1.1, I have a DAQ application that collects data and
    streams it to file. For this I would like to be able to change output
    files without breaking the DAQ loop. For some reason, however the DAQ loop
    occurence will time out the moment I open the file dialog, even though
    the dialog runs in it's own while loop and even in it's own sub VI with
    low priority. Any suggestions how I could get a non-blocking dialog box?
    TIA,
    Rudolf

    Hi Rudolf,
    take a look
    http://zone.ni.com/devzone/devzoneweb.nsf/opendoc?openagent&75C636329327A87B862568690074800A&cat=8ABEC12D4C0AA4A3862567AC00583899
    I hope it help you in many cases.
    Mike
    Rudolf Potucek wrote:
    > Running W98/Labview 5.1.1, I have a DAQ application that collects data and
    > streams it to file. For this I would like to be able to change output
    > files without breaking the DAQ loop. For some reason, however the DAQ loop
    > occurence will time out the moment I open the file dialog, even though
    > the dialog runs in it's own while loop and even in it's own sub VI with
    > low priority. Any suggestions how I could get a non-blocking dialog box?
    >
    > TIA,
    >
    > Rudolf

  • How to disable Initialization block in 10g

    Hi ,
    I want to disable Initialization blocks in 10g. , How to do it.
    Rgds,
    Ma

    Hi,
    In your RPD--> right click u r init block variable name
    and right-click an existing initialization block in the Variable Manager and choose Disable or Enable. This option enables you to change this property without opening the initialization block dialog
    Thanks
    Deva

  • Firewall Notification: Block or Allow?

    My Firewall notification pops up saying that computer fd00:6587:... is trying to access my awacsd on my computer. I've been clicking block every time it appears but then another box appears saying SymUIAgent wants to make changes, to type my password to allow. I've just been clicking cancel. Should I be clicking allow when the first box appears?

    Thanks, hatter. I forgot to mention I am using the Airport Extreme. I see options for logging, but I want to PREVENT connections before they happen, i.e., an Allow/Block dialog popup or creating rules themselves based on IP addresses. I don't see options for that.

  • Hidden dialog renders applet unusable

    i have a problem with dialogs in my applet.
    if an applet dialog is open, and the user minimizes the browser or switches to another application, the dialog gets pemanently hidden (at least in firefox). there's no way to locate the applet again, and hence, no way for the applet to regain focus.
    clicking around on the applet generates a system beep but does not cause the dialog to reappear.
    one obvious approach is to eliminate dialogs. i need the dialogs, though, and want to ask the community if better alternatives exist.
    any ideas? does anyone else have this problem?
    thanks!

    i figured how to make the applet modal with both the Microsoft JVM and the SUN JVM. from reading posts elsewhere on the web, it seems like people have also had trouble with making dialogs modal with the Microsoft JVM. this solution also makes it possible for someone to switch applications while a modal dialog is open without causing the applet to be unusable. when the user switches back to the browser/applet, the blocking dialog is on top of all windows versus being hidden as it would normally.
    ==================
    BEGIN CODE
    ==================
    public NonblockingDialog (Frame parent, String title) {
              super(parent, title, true);
    addWindowListener(new WindowAdapter() {
                   public void windowDeactivated (WindowEvent we) {
                        requestFocus();
                        toFront();
    ==================
    END CODE
    ==================

  • Using Session Variable in the Column Level Security

    My Question -
    1. I created an initialization block with initialization string by calling a new session variable CTP_ID_LIST in the sql command, given appropriate database connections and when I exit out of Block, and chosen Row-wise initialization. I do not see a new session variable created under variables list. Why does this happen? Please help me on this.

    Hi,
    This happens when you select Row-wise Initialization.
    The row-wise initialization feature allows you to create session variables dynamically and set their values when a session begins. The names and values of the session variables reside in an external database that you access through a connection pool. The variables receive their values from the initialization string that you type in the Initialization Block dialog box.
    You can also use the row-wise initialization feature to initialize a variable with a list of values. You can then use the SQL IN operator to test for values in a specified list.
    Example: Using the table values in the previous example, you would type the following SQL statement for the initialization string:
    select 'LIST_OF_USERS', USERID
    from RW_SESSION_VARS
    where NAME='STATUS' and VALUE='FULL-TIME'
    This SQL statement populates the variable LIST_OF_USERS with a list, separated by colons, of the values JOHN and JANE; for example, JOHN:JANE. You can then use this variable in a filter, as shown in the following WHERE clause:
    where TABLE.USER_NAME = valueof(NQ_SESSION.LIST_OF_USERS)
    The variable LIST_OF_USERS contains a list of values, that is, one or more values. This logical WHERE clause expands into a physical IN clause, as shown in the following statement:
    where TABLE.USER_NAME in ('JOHN', 'JANE')
    Regards
    MuRam

  • RE:ABAP objects

    Hi,
    What do u mean by a CONSTRUCTOR concept in OOPS ABAP....
    Thanks in advance,
    Alex.

    Hi,
    Constructors are special PUBLIC methods that are triggered when an object is instantiated from a class. They are necessary when you want to set the initial state of an object dynamically.
    Like normal methods, there are two types of constructor - instance constructors and static constructors.
    To use the instance constructor, the CONSTRUCTOR method must be declared in the public section of the class using the METHODS statement, and implemented in the implementation section.
    Constructors must always be declared in the PUBLIC section of a class.
    Instance Constructor
    Executed once for each instance.
    Called automatically, immediately after the CREATE OBJECT statement.
    Can contain an interface with IMPORTING parameters and EXCEPTIONS , but cannot have any EXPORTING/CHANGING/RETURNING parameters .
    The interfaces are defined using the same syntax as for normal methods in the METHODS statement. To transfer parameters and handle exceptions, use the EXPORTING and EXCEPTIONS additions to the CREATE OBJECT statement .
    Static Constuctor:
    Static methods, declared as  CLASS-METHODS : CLASS_CONSTRUCTOR  in the public section of the class definition and are also implemented in the implementation part.
    Has  no interface parameters and cannot trigger exceptions. 
    Executed once in each program. It is called automatically for the class before it is accessed for the first time - that is, before one of the following actions:
    CREATE OBJECT obj  from the class.
    Call a static method : [CALL METHOD] class=>meth.
    Registering a static event handler method using SET HANDLER class=>meth for obj.
    Registering an event handler method for a static event of the class class.
    Addressing a static attribute with class=>a.
    Exception:-
    The static constructor is always called immediately before the action is executed, with one exception:
    If the first access to the class is to address a static attribute, the static constructor is executed at the beginning of the processing block (dialog module, event block, procedure) in which the access occurs.
    Caution:-
    The static constructor must not access its own class. Otherwise a runtime error will occur.
    The point at which the static constructor is executed has not yet been finalized, and it may yet be changed. SAP only guarantees that it will be executed before the class is accessed for the first time. It is  recommended not to write programs that require the static constructor to be executed at the beginning of a processing block.
    If it is helpful rewards points.
    Regards
    Pratap.M

  • Regarding Types of reports

    Hi friends
                       Help me to find the tutorial for ABAP Reports(Types and their applications)

    Hi Friend,
    Programs that can be run
    These programs can be run by a user by entering the program name or a transaction code. They are they actual application programs within the R/3 System, and are explained in more depth later on.
    Type 1
    You can start a type 1 program by entering its program name. For this reason, they are also known as executable programs. When you start a type 1 program, processors are started in the runtime environment that call a series of processing blocks (event blocks) in a predefined sequence. The sequence is oriented towards reporting tasks. This is why executable programs are also known as reports. For further information, refer to Running Programs Directly - Reports.
    A special type of type 1 program is a logical database. You can start logical databases together with reports. A logical database contains subroutines that are called by an invisible system program in a prescribed sequence for type 1 programs. The subroutines make certain reporting functions reusable. For further information, refer to Logical Databases.
    Type M
    Type M programs can only be started using a transaction code. A transaction code starts a screen, which consists of the screen itself and its flow logic. Screen flow logic can call special processing blocks (dialog modules) in the corresponding ABAP program. Since type M programs contain mostly dialog modules, they are known as module pools. For further information about running module pools, refer to Dialog-controlled Program Execution - Transactions.
    Programs that Cannot Be Run Directly
    These programs cannot be started directly by a user. Instead, they contain processing blocks or other source code that can only be used by an application program that is already running. They are described in more detail in a later section.
    Type F
    Type F programs are not executable. They serve as a container for function modules. When you call a function module from an ABAP program, the entire main program is loaded into the internal session of the current program. Since type M programs contain mainly function modules, they are known as function groups. Function modules are a type of procedure. They are described in more detail in the Procedures section.
    Type K
    Type K programs are not executable. They are container programs for global classes, and are known as class definitions. Classes belong to ABAP Objects and are described in more detail in that section.
    Type J
    Type J programs are not executable. They are container programs for global interfaces, and are known as interface definitions. Interfaces belong to ABAP Objects and are described in more detail in that section.
    Type S
    Type S programs are not executable. They are container programs for subroutines that should only be called externally. When you call a subroutine from an ABAP program, the entire main program is loaded into the internal session of the current program. Since type S programs contain mainly subroutines, they are known as subroutine pools. Subroutines are a type of procedure. They are described in more detail in the Procedures section.
    Type I
    Type I programs cannot be run directly, and contain no callable processing blocks. They are used exclusively for modularizing ABAP source code, and are included in other programs. Include programs are described in more detail in the Source Code Modules section.
    <b>Reward point, if helpful.</b>
    Regards,
    Atin

  • Difference between interface pool and class pool

    Hi,
    Can any body tell me the difference between Interface pool and Class pool.
    thank you in advance.
    regards

    Hi,
    Class and Interface Pools
    This section discusses the structure and special features of class and interface pools for global classes.
    Global Classes and Interfaces
    Classes and interfaces are object types. You can define them either globally in the Repository or locally in an ABAP program. If you define classes and interfaces globally, special ABAP programs called class pools or interface pools of type K or J serve as containers for the respective classes and interfaces. Each class or interface pool contains the definition of a single class or interface. The programs are automatically generated by the Class Builder when you create a class or interface.
    A class pool is comparable to a module pool or function group. It contains both declarative and executable ABAP statements, but cannot be started on its own. The runtime system can create runtime instances (objects) through a request using the CREATE OBJECT statement. These objects execute the statements of the class pool.
    Interface pools do not contain any executable statements. Instead, they are used as containers for interface definitions. When you implement an interface in a class, the interface definition is implicitly included in the class definition.
    Structure of a Class Pool
    Class pools are structured as follows:
    Class pools contain a definition part for type declarations, and the declaration and implementation parts of the class.
    Differences From Other ABAP Programs
    Class pools are different from other ABAP programs for the following reasons:
    ·        ABAP programs such as executable programs, module pools, or function modules, usually have a declaration part in which the global data for the program is defined. This data is visible in all of the processing blocks in the program. Class pools, on the other hand, have a definition part in which you can define data and object types, but no data objects or field symbols. The types that you define in a class pool are only visible in the implementation part of the global class.
    ·        The only processing blocks that you can use are the declaration part and implementation part of the global class. The implementation part may only implement the methods declared in the global class. You cannot use any of the other ABAP processing blocks (dialog modules, event blocks, subroutines, function modules).
    ·        The processing blocks of class pools are not controlled by the ABAP runtime environment. No events occur, and you cannot call any dialog modules or procedures. Class pools serve exclusively for class programming. You can only access the data and functions of a class using its interface.
    ·        Since events and dialog modules are not permitted in classes, you cannot process screens in classes. You cannot program lists and selection screens in classes, since they cannot react to the appropriate events. It is intended to make screens available in classes. Instead of dialog modules, it will be possible to call methods of the class from the screen flow logic.
    Local Classes in Class Pools
    The classes and interfaces that you define in the definition part of a class pool are not visible externally. Within the class pool, they have a similar function to local classes and interfaces in other ABAP programs. Local classes can only be instantiated in the methods of the global class. Since subroutines are not allowed in class pools, local classes are the only possible modularization unit in global classes. Local classes have roughly the same function for global classes as subroutines in function groups, but with the significant exception that they are not visible externally
    Reward points if useful....
    Regards
    AK

Maybe you are looking for

  • Creating Service PO using BAPI_PO_CREATE1

    Hi gurus, I am trying to create a PO with service lines using BAPI_PO_CREATE1 but am getting the following errror even though i have passed values to the structures POSERVICES POSRVACCESSVALUES and POACCOUNT along with item and header details: Please

  • Logic in a internal table

    hi experts , i need a logic i have a internal table itab_equi in that i am getting 11 values when i pass this internal table to another table using for all entries i will get 4 values in int_bmgkobj . i need logic for how to get the deleted values  i

  • X6 mass memory full error

    I want to copy some MP3 files to the X6 phone mass memory through windows explorer but it give me a memory full error message. Before I start to copy, it indicated 8.40G free out of 15.0G (not sure why it is 15G), but once I start to copy, it pops up

  • Trying to download trial of Adobe acrobat.

    Trying to download trial of Adobe acrobat.  After I sign in, the Adobe download assistant says:  "Error 100.  Error communicating with Adobe.com.  Check your network connection and restart Adobe download assistant.  Did that several times with the sa

  • CSS to ACE Migration Tool

    Hi, We are planning to upgrade from the existing CSS 11500 series to ACE (6506 bundle with 720 Sup engine). To facilitate a smooth migration, do we have any tool/procedure set? Thanks, RG.