Arbitary Modal dialog in JDeskTop MDI environment

Why have Sun gone to such lengths to make it difficult to do your own model dialogs?
JOptionPane with it's showInternalXXX methods hints that JDialogs in an MDI are unhealthy (even though I'm not sure why).
Looking through the source for JOptionPane and JDialog shows that making your own JInternalWindow modal would be, at best, messy, at worst impossible.
JOptionPane acually uses a reflection cheat to access a private method in Component to do the modal thing.
Anyone know why this minefield has been built, and how best to get through?

On the face of it, sure. And I've yet to have a problem using JDialog this way.
What puzzles me, then, is why JOptionPane goes to the trouble of having all those showInternalXXXDialog methods, which when I check the code do their own thing as far a modality is concerned. I had a poke arround in the source of JOptionPane in an attempt to determine the point in having these two kinds of Dialog.
On a previous occasion I've looked through JDialog in an attempt to understand how that implements modality. And it does it in rather a different way.
In both cases it seems like Sun has gone out of their way to prevent us from doing our own thing.

Similar Messages

  • How to display non modal dialog box in a Dll call from TestStand implemented in visual c

    Dear Jason F.
    Applications Engineer
    National Instruments
    Hello
    I did the same way you told me
    the non modal dialog appeared and
    system hangs and
    giving the error message
    ""SeqEdit.exe-Application Error
    The instruction at �0x047fc5b0� referenced memory at �0x047fc5b0�. The memory could not be �read� ""
    please solve my problem
    and thanks for yours early response
    you can email me at
    [email protected]

    Hi Mkehret,
    Does your dialog have ActiveX controls on it? If your DLL dialog uses ActiveX controls and is not programmed in a certain manner it can hang because of a conflict in the threading model used by the TestStand Engine that is calling into your DLL and the model that is required by the MFC ActiveX Container. If you are using ActiveX controls in your dialog, you need to make special considerations for the threading model MFC dialogs that use ActiveX controls need in order to work properly. The example under \Examples\MFCActiveXContainerDlg illustrates how to appropriately handle this situation as well as explaining why it is necessary.
    Note: The above example displays the dialog as modal, but this is irrelevant to the problem I am describing.
    Again for information on properly creating a dialog class object and displaying it as non-modal refer to the information on MSDN that I referred you to in this post:
    http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=506500000008000000E98A0000&USEARCHCONTEXT_CATEGORY_0=_8_&USEARCHCONTEXT_CATEGORY_S=0&UCATEGORY_0=_8_&UCATEGORY_S=0
    If your dialog does not use ActiveX controls or after trying the programming method illustrated in the "MFCActiveXContainerDlg" example TestStand still hangs when calling your DLL, try calling your DLL from another environment just to make sure whether the DLL works at all. If the DLL works properly when called by another environment (e.g. VB, VC++, LabVIEW, or CVI), please submit a MINIMAL and REPRODUCEABLE example source project for your DLL for us to look at (please exclude all unnecessary code not required to reproduce the specific problem of displaying the dialog, and include all files necessary to build your dll with any
    specific instructions needed to do so).
    Jason F.
    Applications Engineer
    National Instruments
    www.ni.com/ask

  • Javascript call from Flash in modal dialog window

    Hi.
    As I see it's impossible to call Javascript function from
    flash in modal dialog (opened with showModalDialog), neither with
    getURL nor with ExternalInterface.call.
    The only solution I found (in my case it's enough, I only
    need to refresh some DIV content in the page from flash) is to
    catch error in the modal dialog (Javascript window.onerror) and
    then do some operations.
    I'm intereseted: is this for security reason on Win XP SP2? I
    didn't found any solution, but is there any?

    Hi Gary,
    Actually I'm not very sure that whether it is the VS issue if it still has this issue in a new Environment.
    To make sure that it is not the VS setup file issue, one idea is that you could re-download your VS2013 Pre version here:
    http://www.visualstudio.com/downloads/download-visual-studio-vs
    And then re-install it again. Test the result. Hope that it is not the VS setup file issue.
    If still no help, really sorry for that I couldn't repro this issue in my side. But
    you can submit this feedback to Microsoft Connect feedback portal:
    http://connect.microsoft.com/VisualStudio/feedback/CreateFeedback.aspx,Microsoft
    engineers will evaluate them seriously. You could share this project in your report, the product team members would troubleshoot and repro this issue.
    You will get email notification for update in your connect report.
    If you submit it, please share us the link here, so we could get the latest information from the product team members.
    Sincerely,
    Jack
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Modal dialog window to system

    Hi,
    I could not find proper link to post this, so I am posting here.
    I want a system level dialog window i.e. when this window is visible it should always be at top most and user should not allowed to select other applications.
    I used runModalForWindow method of NSApp but it is creating modal window with respect to my application and I am able to select other applications.
    I want my modal dialog should be top most dialog to my application and user should not be able to select other application.
    Thanks.

    Hi
    My application is running in kiosks environment. So I want when any modal dialog pops up in desktop from my application, user should not be able to select any other application from the desktop i.e. I want my modal dialog window should always be at the topmost.
    If it is not possible to have a system level dialog window, any alternate solution so that my modal dialog will be at topmost and user should not be able to select any other application as long as this dialog is visible will really helpful to solve my problem.
    Thanks.

  • Modal Dialog window

    Hi,
    I have designed a XDP form using Adobe designer 7.0 in which i have a button. now i want a modal dialog window to be opened on click of a button.
    how can i do this? what should be the type of button?
    Thanks,
    rajasekhar MV

    Hi
    My application is running in kiosks environment. So I want when any modal dialog pops up in desktop from my application, user should not be able to select any other application from the desktop i.e. I want my modal dialog window should always be at the topmost.
    If it is not possible to have a system level dialog window, any alternate solution so that my modal dialog will be at topmost and user should not be able to select any other application as long as this dialog is visible will really helpful to solve my problem.
    Thanks.

  • GUI hangs after it fail to pop up a modal dialog

    Hi everyone! I have a swing application that will pop up a log off confirm dialog (modal) when the user click on the "log off" button. It works fine for about 8 hours. Then when I click on the "log off" button, the dialog never pop up and the GUI is freezed, which means it does not react to user mouse click anymore, like a hidden modal dialog is in front. But actually there is no hidden dialog.
    At the same time, my windows XP freeze also. I cannot even open a folder. Then I kill the winrunner, and the XP is able to open a folder, but my GUI is still freeze. No exception behind and all threads are running. I can use some test script to control the GUI, but somehow it just never react to user click.
    Does anyone encounter the same problem and know the possible reason?
    Thanks!

    Hi motes_19:
    I have noteiced this as well in an application that I have created...however, my app doesn't freeze and the OS still runs (Win 2000). I suspect that your problem might be that you aren using the SwingUtilities.invokedLater() or SwingUtilities.invokeAndWait() methods to update your GUI. I am using them and still having some intermitten problems. Hope this helps you...if you have a solution for me, let me know.
    EH

  • Is there a fix for modal dialogs opening behind palettes -cs6 -osx 10.6.8

    Is there a fix for modal dialogs open behind palettes in
    Photoshop cs6 13.0 (createive cloud update) + OSX 10.6.8 Snow Leopard on MacBook Pro? 
    ( I am using 2 monitors where the second monitor is set to be the menu display.  cs4 does not exhibit this bug. )
    Toggling the Application Frame off improves the hiding 'feature' but this does not include the desired continuous floating in front of palettes in all circumstances.
    An example is Blending Options, then chose Stroke, then chose the Color Picker.  After clicking OK, the Blending Options dialog now sits behind the palettes.  One trick is to click on another app, then back to cs6 to force a window redraw.
    It sure would help me if this could be solved.  I am preparing educational videos and this display bug makes things very troublesome.
    Thanks for any help.  If I find a solution, I will post to this thread so everyone can benefit.

    The setting for the graphics check box Does Not make a difference.  If I have a new document window open, then add a layer, then open the blending options > drop shadow > edit the color > the chooser dialog opens, and immediately both dialog windows drop behind the palettes AND any document windows.
    The same behavior for the Preferences dialog > guides > color.
    The quick workaround is to click another app, then back to CS6.  A real pain, of course.
    It is only a factor when opening a second (child) dialog box.
    Other CS6 apps do work correctly (eg. FW AE)
    I have yet to get a handle on this.  Mac OSX 10.6.8    CS6 13.0  x64
    Thanks for your replies, and the long reply time for me was a vaction away from the office.

  • How to remove the default icons from the toolbar of modal dialog box screen

    Hello Friends,
    Iam calling a screen from function module using CALL SCREEN statement.
    The screen is of type Modal Dialog Box. I created some input fields and buttons in the screen. When the screen is displayed, I can see the tool bar at the bottom along with the input fields and buttons in the screen.
    These icons are Continue(Enter), Check, Cancel. How can I supress this??
    I mean in my screeen I want only my input fields and buttons but not the default toolbar. How to do that?
    Regards,
    Raju

    Hi Raju,
    Try this...
    First try to capture the F-codes of ur button apppearing on the dialog box and then exclude it from the PF-status by passing it to itab.
    types: begin of tab_type,
            fcode like rsmpe-func,
           end of tab_type.
    data: tab type standard table of tab_type with
                   non-unique default key initial size 10,
          wa_tab type tab_type.
    clear tab.
    move 'DELE' to wa_tab-fcode.
    append wa_tab to tab.
    move 'PRIN' to wa_tab-fcode.
    append wa_tab to tab.
    set pf-status 'STA3' excluding tab.
    Cheers,
    Simha.
    Reward all the helpful answers..

  • Skillbuilders modal dialog - condition for parent page dialog

    Hi
    When using this awesome plugin, I have a dynamic action on my calling page that deals with the selection from the dialog.
    It uses
    Select type:DOM Object
    DOM Object: document
    Condition: javascript expression
    ($v('P110_PROD_SEARCH') == 'BLAH')
    where the js expression is making sure I run the correct dynamic action, particularly when I have a few buttons on the page invoking different variations of the modal dialog.
    My first action is some javascript that interrogates the value of
    this.data.modalPageCloseValue
    this helps me make decisions in later actions on whether to run some pl/sql, for instance
    In light of a recent question of mine regarding a potential APEX bug (Display item with HTML affected by dynamic action and since we can't put conditions on actions - I was wondering if I could incorporate something into my dynamic action condition to stop the entire dynamic action from executing if modalPageCloseValue is null - but it seems to be out of scope?
    Scott

    Scott,
    You're current condition is:
    $v('P110_PROD_SEARCH') == 'BLAH'Just change that to:
    $v('P110_PROD_SEARCH') == 'BLAH' && this.data.modalPageCloseValueRegards,
    Dan
    blog: http://DanielMcghan.us/
    work: http://SkillBuilders.com/APEX/
    twitter: https://twitter.com/dmcghan

  • How can I control modal dialogs in Applescript without a mouse?

    I am trying to use a Griffin PowerMate button to select between two options in an Applescript modal dialog and cannot seem to figure out how to do this. I can set a default button, but I want the user to select between two options (shifting the highlighted button) via the PowerMate. Does anyone have a suggestion?
    I can program the PowerMate to send/emulate a particular keystroke, but I do not know how to make the standard Applescript dialog respond to a keystroke, only a mouse action. I'm trying to create a mouseless interface.
    In short, I want the dialog respond to "Twist to the left and press the button to select A, Twist to the right and press the button to select B." Thoughts?
    Thank you.

    Your System Preferences > Keyboard Shortcuts > Full Keyboard Access preference will need to be set to "all controls", but it also depends on where the particular button is located in the dialog.  The tab key will highlight the buttons from left to right, shift-tab will highlight the buttons from right to left, and the spacebar will "press" the currently highlighted button.  In addition, the escape key will choose the Cancel button (if there is one), and the return key will choose the default button (if a default has been set the button itself will be lit).

  • In Unix, main JFrame focus not regained after modal dialog exit.

    Hi all,
    I'm new to this forum so hopefully this is the right place to put this question.
    I have a relatively simple GUI application written in Java 6u20 that involves a main gui window (extends JFrame). Most of the file menu operations result in a modal dialog (either JFileChooser or JOptionPane) being presented to the user.
    The problem is that when running on Unix (HPUX), the process of changing focus to one of these modal dialogs occasionally results in a quick flash of the background terminal window (not necessarily that used to launch the Java), and the process of closing the modal dialogs (by any means, i.e. any dialog button or hitting esc) doesn't always return focus to the main extended JFrame object, sometimes it goes to the terminal window and sometimes just flashes the terminal window before returning to the main JFrame window.
    I think the problem is with the Unix window manager deciding that the main focus should be a terminal window, not my Java application, since the problem occurs in both directions (i.e. focus from main JFrame to modal dialog or vice versa).
    In most cases of JOptionPane, I DO specify that the main extended JFrame object is the parent.
    I've tried multiple things since the problem first occured, including multiple calls to a method which calls the following:
    .toFront();
    .requestFocus();
    .setAlwaysOnTop(true);
    .setVisible(true);
    ..on the main JFrame window (referred to as a public static object)...
    just before and after dialog display, and following selection of any button from the dialogs. This reduced the frequency of the problem, but it always tends to flash the terminal window if not return focus to it completely, and when it occurs (or starts to occur then gets worse) is apparently random! (which makes me think it's an OS issue)
    Any help appreciated thanks,
    Simon
    Self-contained compilable example below which has the same behaviour, but note that the problem DOESN'T occur running on Windows (XP) and that my actual program doesn't use auto-generated code generated by a guibuilder:
    * To change this template, choose Tools | Templates 
    * and open the template in the editor. 
    package example;  
    import javax.swing.JOptionPane;  
    * @author swg 
    public class Main {  
         * @param args the command line arguments 
        public static void main(String[] args) {  
            java.awt.EventQueue.invokeLater(new Runnable() {  
                public void run() {  
                    new NewJFrame().setVisible(true);  
    class NewJFrame extends javax.swing.JFrame {  
        /** Creates new form NewJFrame */ 
        public NewJFrame() {  
            initComponents();  
        /** This method is called from within the constructor to 
         * initialize the form. 
         * WARNING: Do NOT modify this code. The content of this method is 
         * always regenerated by the Form Editor. 
        @SuppressWarnings("unchecked")  
        // <editor-fold defaultstate="collapsed" desc="Generated Code">  
        private void initComponents() {  
            jMenuBar1 = new javax.swing.JMenuBar();  
            jMenu1 = new javax.swing.JMenu();  
            jMenuItem1 = new javax.swing.JMenuItem();  
            jMenu2 = new javax.swing.JMenu();  
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);  
            jMenu1.setText("File");  
            jMenuItem1.setText("jMenuItem1");  
            jMenuItem1.addActionListener(new java.awt.event.ActionListener() {  
                public void actionPerformed(java.awt.event.ActionEvent evt) {  
                    jMenuItem1ActionPerformed(evt);  
            jMenu1.add(jMenuItem1);  
            jMenuBar1.add(jMenu1);  
            jMenu2.setText("Edit");  
            jMenuBar1.add(jMenu2);  
            setJMenuBar(jMenuBar1);  
            javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());  
            getContentPane().setLayout(layout);  
            layout.setHorizontalGroup(  
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)  
                .addGap(0, 400, Short.MAX_VALUE)  
            layout.setVerticalGroup(  
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)  
                .addGap(0, 279, Short.MAX_VALUE)  
            pack();  
        }// </editor-fold>  
        private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {  
            int result = JOptionPane.showConfirmDialog(this, "hello");  
        // Variables declaration - do not modify  
        private javax.swing.JMenu jMenu1;  
        private javax.swing.JMenu jMenu2;  
        private javax.swing.JMenuBar jMenuBar1;  
        private javax.swing.JMenuItem jMenuItem1;  
        // End of variables declaration  
    }

    It won't comfort you much, but I had similar problems on Solaris 10, and at the time we traked them down to a known bug [6262392|http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6262392]. The status of this latter is "Closed, will not fix", although it is not explained why...
    It's probably because the entry is itself related to another, more general, bug [6888200|http://bugs.sun.com/bugdatabase/view_bug.do;jsessionid=b6eea0fca217effffffffe82413c8a9fce16?bug_id=6888200], which is still open.
    So it is unclear whether this problem will be worked upon (I suspect that yes) and when (I suspect that... not too soon, as it's been dormant for several years!).
    None of our attempts (+toFront(...)+ etc...) solved the issue either, and they only moderately lowered the frequency of occurrence.
    I left the project since then, but I was said that the workaround mentioned in the first bug entry (see comments) doesn't work, whereas switching to Java Desktop instead of CDE reduced the frequency of the issues (without fixing them completely either) - I don't know whether it's an option on HPUX.
    Edited by: jduprez on Jul 9, 2010 11:29 AM

  • How to make a dalog process custom events when blocked by modal dialog

    Hi,
    I would like to understand the way modal dialogs block other dialogs so that I can properly solve an issue I'm having with two modal dialogs, one blocking the other.
    I have an application, netbeans platform based, that opens a JDialog, NewDiskDlg, with it's modal property set to true. This dialog is responsible for starting a thread that will process a given number of files, from time to time, depending on some conditions, this thread will send events to the NewDiskDlg.
    When this thread is started, the NewDiskDlg creates a new JDialog, also with the modal property set to true. Both dialogs have the same parent, the main window. And this works as I expected, the second dialog, ActiveScanningDlg, opens on top of the NewDiskDlg and, until the thread stops, the dialog stays visible.
    When the thread stops an event is sent to this two dialogs signaling that the job has been completed, and here is my problem. The second dialog, the one that is visible when the event arrives, receives the event and executes the dispose() method, releasing control to the NewDiskDlg in the back, but the NewDiskDlg does not receive the event and does not process it correctly.
    I understand the no input can be sent to a blocked window, but does that include calling upon the window's methods?
    I've been looking for some help on this but my search terms are not good enough to provide me with any useful information. I've also read the topic on the focus system that is present in the Java Tutorial but I feel that that is not what I should be looking at.
    The following code is a snippet of the important parts that I described:
    NewDiskDlg has the following methods to process the events
        public void readingStarted(ReadingEvent evt) {
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    scanningDlg.showCentered();
        public void readingFile(ReadingEvent evt) {
            //DO NOTHING
        public void readingStopped(ReadingEvent evt) {
            Lookup.getDefault().lookup(MediaReader.class).removeListener(this);
            if (!showAgain) {
                dispose();
        public void readingAborted(ReadingEvent evt) {
            JOptionPane.showMessageDialog(this, "", "", JOptionPane.ERROR_MESSAGE);//TODO: i18n on the error messagens
            Lookup.getDefault().lookup(MediaReader.class).removeListener(this);
        }ActiveScanningDlg processes the events like this:
        public void readingStarted(ReadingEvent evt) {
            //DO NOTHING
        public void readingFile(ReadingEvent evt) {
            jpbReadingProgress.setString(evt.getCurrentFileName());
        public void readingStopped(ReadingEvent evt) {
            Lookup.getDefault().lookup(MediaReader.class).removeListener(this);
            dispose();
        public void readingAborted(ReadingEvent evt) {
            readingStopped(evt);
        }This is an example on how the events are sent:
        private void fireReadingFile(ReadingEvent evt) {
            for (ReadingListener l : listeners) {
                l.readingFile(evt);
        }

    Hi,
    You have to check the Tolerance limits set for the following tolerance keys. In case if any where the limit is breached the systems blocks the Invoice as 'R - Invoice verification'. Please check the limits set for all these keys.
    AP - item amount variance (if you have activated the item check)
    DQ and DW - for Quantity variance
    PP - price variance with the order price
    ST - date variance
    VP - Moving average price variance
    Regards,
    Kathir

  • Module Pool - Error message on a Modal Dialog screen with input

    Hello All,
    I have a modal dialog screen which is called on F4 help of a input field. This dialog screen has radio buttons on it to select. On selection, we check if the user is authorized to that option. If not, raise and error message with command MESSAGE msgid.....
    When the error message pops-up and when clicked ok on it, the radio buttons on the modal dialog screen gets disabled. I want to have the modal dialog box to be able to accept the new radio button as input.
    Can anyone please suggest.
    Thanks,
    Smita

    Put all of your Radio buttons in the CHAIN ... ENDCHAIN with one module.
    CHAIN.
        FIELD rb1.
        FIELD rb2.
        FIELD rb3.
        MODULE check_chain ON CHAIN-REQUEST.   "<< implement logic in check_Chain
      ENDCHAIN.
    If you want, you can even disable the options before displaying the screen. Do all necessary checks in the PBO and based on that disable the options.
    Regards,
    Naimesh Patel

  • Distiller Server "Could not open file" modal dialog

    We're running Distiller Server 8, and I've got a dilemma that I'm hoping is solvable.
    This is installed on a Windows 2008 server, with jobs coming into watched folders from our OPI server. Periodically, we get a dialog box that says Acrobat Distiller "Could not open the file: P:\OPI_Data\PDF_Processing\Index_PDFs\out\<filename>". The path specifics will vary, but it's always a path to a file in process... not to a config file or anything like that.
    The big problem is that this pops up as a modal dialog and Distiller won't process any more files until someone clicks "OK". On the console. On a server. In the datacenter. We run two shifts, and I'm getting really tired of phone calls at midnight saying "Distiller is hung... can you fix it?"
    Is there a way to run Distiller Server in silent mode? Some way to tell it "If you have a problem, just fail that job and move on"? Having to have a server administrator connect in and click a dialog box is just silly.

    That seems to have done the trick, thanks.  I don't really like doing forces unless someone who knows more than I recommends it, as I see way too many threads where that has complicated things tremendously.

  • Item not being saved when item is in a jquery modal  dialog

    Hi all,
    I followed instructions found here :
    http://shijesh.wordpress.com/2010/04/10/jquery-modal-form-in-apex-4/
    to create a jquery modal dialog, this is the code I added in html header :
    <link rel="stylesheet" href = "http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/
    redmond/jquery-ui.css" type="text/css" />
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js"> </script>
    <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.js"> </script>
    <script type="text/javascript">
    $( function() {
       $('#ModalForm').dialog(
            modal : true ,
            autoOpen : false ,
            width : 425,
            closeText : 'Close',
            stack : false,
            resizable : false,
            buttons  : {
                Cancel : function() {
                         closeForm();
                Save : function() {
                    updateMEMOVELD();
    function openForm()
        $('#ModalForm').dialog('open');
    function closeForm()
        //$('#ModalForm input[type="textarea"]').val('');
        $('#ModalForm').dialog('close');
    function updateMEMOVELD ()
       var get = new htmldb_Get(null, &APP_ID.,   
                        'APPLICATION_PROCESS=f_memo', 0);
       get.add('P9_MEMOVELD',$v('P9_MEMOVELD'));
       var gReturn= get.get();
       //alert(gReturn);
       //alert($v('P9_DATUM'));
      $s('P9_MEMOVELD',gReturn);
      alert($v('P9_MEMOVELD'));
      $s('P9_MEMOVELD_COPY',$v('P9_MEMOVELD')); 
      $('#ModalForm').dialog('close');
    </script>my situation is a little different, my modal does not have to perform an sql update, just change a field
    the user will then save in the main form
    for some reason the field never gets updated in the db
    I even created a on demand application process called f_memo :
    BEGIN
      APEX_UTIL.SET_SESSION_STATE('P9_MEMOVELD',:P9_MEMOVELD);
      htp.p(:P9_MEMOVELD);
    END;why is my field not send to the db ?
    it works when I delete this from the region header :
    < d i v id="ModalForm" title="Add Person" style=" d isplay:n one  "   >but then of course I no longer have a modal dialog
    what's wrong ?
    I put the code online at apex.oracle.com
    workspace XONIXRS
    login/password demo/demorun the application
    click on lijst facturen (invoices) (in the right sidebar region)
    then click on the zoeken (search) button
    a report appears, click on edit on the first line (200900017)
    now a form appears, click on the outright button memo
    now the modal shows up, change the field and click on save
    click on ok (for the alert) and then click on Save invoice
    you will remain on the same page
    now click on annuleren
    and then click on edit on the first line (200900017) again
    then click on memo again, you will see the memo has not been changed
    how comes ?
    Kr
    Martin

    The issue is that creating a modal of a region lifts that region from the HTML. Just have a look at the DOM when you run your page and not the source html, because that does not reflect changes to the dom made on page load. This means that your memo-field is removed from the FORM-tags, and effectively won't submit to session state. The item is not processed when you submit the page! You can track that through debugging your page. Memo is not saved and not processed.
    Trying to save the value to session state is not enough, it doesn't really matter in this case. The moment you submit the page, the session state will get overwritten by the submitted values of the items.
    So what i did:
    <ul>
    <li>move P9_MEMOVELD to region FACTUUR, together with all the other db fields</li>
    <li>change the type to hidden</li>
    <li>set value protected to NO</li>
    <li>in the modal region create a new page item P9_MEMOVELD_POP, type textfield</li>
    <li>set the source to always use a page item as source, with source P9_MEMOVELD</li>
    <li>changed function updatememoveld:
    function updateMEMOVELD ()
       var get = new htmldb_Get(null, &APP_ID.,   
                        'APPLICATION_PROCESS=f_memo', 0);
       get.add('P9_MEMOVELD',$v('P9_MEMOVELD'));
       var gReturn= get.get();
       //alert(gReturn);
       //alert($v('P9_DATUM'));
      $s('P9_MEMOVELD',gReturn);
      alert($v('P9_MEMOVELD'));
      $s('P9_MEMOVELD_COPY',$v('P9_MEMOVELD')); 
      $s('P9_MEMOVELD',$v('P9_MEMOVELD_POP'));
      $('#ModalForm').dialog('close');
    }Whether you want or need the session state set is up to you, it depends on if you use this somewhere else dynamically on the page and thus would influence results there, but i don't think it will (it's a memo field...)</li>
    </ul>
    Extra remarks:
    <ul>
    <li>be careful with including jquery libraries! The standard libraries are included, yet you add previous versions too! (1.4.2) This might lead to issues...</li>
    <li>use your templates better. Why would you wrap a region in div tags? Change or add a region template to be div tags. You can then easily assign a static id to this region, and target it. This will save you from wrapping wrapped wrappers (cause that is what the generated code looks like in the end).</li>
    </ul>

Maybe you are looking for

  • Can I open a second iTunes account for my child, but use my email for both accounts?

    I have one iTunes account, my ID is my email address.  I want to open a second account for my daughter, but I want to see her iTunes Store receipts (sent to MY email address).  When I try to set up a new account, it says that I need to enter my email

  • Can't back up..?

    My iPad mini keeps telling me that it can't back up in iCloud because there is not enough available storage, but I have 4.8 GB of available storage. This is a brand new iPad Mini. Please Help!

  • Consistent crash while printing

    Whenever I print something to my Canon iP4850 printer using my MacBook running Mac OS X 10.7.4 with all updates installed, the printer application "quits unexpectedly". Printing still works, but ignores my quality settings. How can I fix this? Crash

  • Need help with Flash Menus

    IM working on this Flash menu and i can't seem to change the names on the menu please someone help me how to change the names thanks      http://i294.photobucket.com/albums/mm87/Gorla89/Untitled.png Here is the source file [URL=http://www.zshare.net/

  • Time Machine Not Overwriting Older Backups

    Time Machine is telling me that the 1TB backup disk is full, albeit there is 62GB of available space (why is TM stating it's full?). In any event, TM is not overwriting the older backups. How can this be enabled? Thank you!