How to know my dialog has changed

I have a Jdialog componenet with various textfields,passwordfield,a few checkboxes and listboxes.
I have two buttons at the bottom saying ok and cancel
ok button updates the new info from the dialog and updates the database.
How do i identify whether the dialog components have really undergone a change so that i dont update my database with values which were never modified
thanx in advance

I am assuming the following things.
1) you instantiate your JDialog from your parent frame.
like this.
JDialog yourNewDialog = new JDialog();
yourNewDialog.show();
This makes your dialog appear.
You can make the following changes.
If the dialog is modal.
you can add a method which returns a integer in the JDialog Box
int value = 1;
public int okOrCancel(){
return value;
update value = 1 in actionperformed of the Ok button to 1 and value = 2 in actionperformed of the Cancel button
in your main program:
U can call the method
yourNewDialog.okOrCancel() and know which button was pressed.
Hope this helps.
Ram

Similar Messages

  • How can I audit what has changed in a document in SharePoint?

    Hello everybody
    I need to audit the changes in all documents of my SharePoint server. That is, who has changed what, in a document such as an excel file. I need to know who has changed the file and what changes he has done to the file. How can I audit this kind of information?
    Is it possible to audit this kind of information through SharePoint? If not, is it possible to do this job with the Excel it self, that it distinguish the changes made by the members (for example highlight the cells with different colours for different users)?
    Thank you

    Hi ,
    As Margriet points, we can open different version  items and check what are changed after enabling list/library version history.
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • How to Solve 'Row currency has changed'!

    Hi,all
    I hava encountered a problem:
    in my create info page,i click one button and popup a dialog page to select a record from the list in the popup page,when i select one more record,problems occur:
    JBO-35007: Row currency has changed since the user interface was rendered. The expected row key was oracle.jbo.Key[0 ]
    I tried to change set EnableTokenValidation = "false",but if the popup page has several page to display the result list,it has another problem,e.g,when you hava select the third record in the second page and you want to update it to the first record in the first page,when you complete the select,you will see the actual record dipalyed in the create page is the first record in the second page.
    so i'm so confused about this,
    Thanks.
    Alex

    I have the same problem and found many posts that suggest the same thing:
    EnableTokenValidation = false
    However, I would appreciate if someone can get into details what that really means. Even better, any pointer to appropriate documentation would help!

  • How to know which table has got referencial integrity constraint

    Dear All,
    How can i know which table has got referencial integrity constraint on which table ?
    Ex : Department id column is a primary key in departments table whereas it is a foreign key in employees table. From where can i find the info regarding the relation between employees and departments table ?
    Waiting for your reply.
    Regards,
    Shyam

    you can use dba_constraints or all_constraints to help.
    http://download.oracle.com/docs/cd/B14117_01/server.101/b10755/statviews_1037.htm
    Example:
    select owner, CONSTRAINT_NAME,CONSTRAINT_TYPE,TABLE_NAME from dba_constraints where R_OWNER=':A' and R_CONSTRAINT_NAME=':B'
    A = owner of primary key
    B = constraint name (primary key name)

  • How to know if Mcbook has a virus

    How to Know that your MacBookk has a virus

    It's very unlikely that your Mac has any kind of malware at this point in time. See my Mac Malware Guide.
    You could always run a scan with ClamXav to see if anything turns up, but most likely that isn't going to find anything other than some Windows malware attached to e-mail messages or something like that. (Note: don't let any anti-virus software delete e-mail messages, that will corrupt the mailbox.)
    I would echo Linc's question... if you are having a problem that leads you to ask this question, post the details for further advice.

  • How to Know if SOmeone has Blocked you on Iphone

    My messages return as undeliverable.  How would I know if someone has blocked me on their iphone?

    If your messages come back deliverable that means the receiving party has turned off iMessage or has no data connection (if they were iMessages).
    If they blocked you, your messages would show as delivered, but the recipient would never see them. They are simply discarded by the receiving phone.

  • Subcon - how to know if stock has transferred in "subconvendor 2 " location

    Dear All,
    see this scenario :
    your factory sends subcon rawmaterials to subconvendor1 for machining and the FG obtained  is moved to subconvendor 2 for polishing . then this FG returns to your factory .
    please let me know how this can be carried out in sap , and also how do we come to know when subconvendor1 has delivered the FG to subconvendor 2 ?
    Rohan

    Dear Kamble,
    You can see the stock at Subcontractor by MBLB from that you can get the information whether material issued to subcontractor or not. for tracking Material transfer fron Subcon1 to Subcon 2 first you have to tack the material back from Subcon 1 and issue to Subcon 2.

  • How to find out who has changed the SYSADMIN password?

    Hi,
    Is there a way to trace who has changed the SYSADMIN password in an instance?
    Regards,
    Neeraj

    of course, this is limited to any updates to the
    user, e.g. added responsibility, etc. So, it
    probably is very limited in value.That's why it is recommended to enable AuditTrail, which is a way of keeping track of changes made to important data in Oracle Application tables. AuditTrail keeps a history of the following three questions:
    1. What changed
    2. Who changed it
    3. When did the change take place

  • How to know which Action has been done by a Dialog in ControlsFX?

    Hello!
    I am using ControlsFX for the "Dialog" class. This class lets you build a dialog with "Node" Content.
    I set the content to a GridPane and and had wanted to set up a custom Action.
    There are premade Actions like "OK" "CANCEL "YES" "NO" "CLOSE" so I tried using "OK" and it worked by saving all of the info in the TextFields which were set in the GridPane
    However when I tried "CLOSE" "NO" or "CANCEL" it also saved the data within the TextFields... SO I'm confused, what Actions are exactly going on, and I figured I would just make an if statement saying {code} if(Dialog.getAction(Action.OK) == true){code} but it never worked.
    Thoughts on howe to do the actions? I tried to make a custom action at first, but the premades "workjed" but not really.. :(?

    Thanks!
    This wasn't there when I first looked at it, or I was looking at another location of the api, I will make sure to look at this one now :D.
    I basically did Action action = Dialog.show().
    then did if (action.equals(Dialog.Actions.OK))
    //code
    }So it works :).
    I like the custom action too, I'm interested in the example Action response = Dialogs.create()
          .title("You do want dialogs right?")
          .masthead("Just Checkin'")
          .message( "I was a bit worried that you might not want them, so I wanted to double check.")
          .showConfirm();I from the api it says that .create() is static Dialogs Type, so I'm curious how that's used as the Action in this case?
    Thanks again :)

  • How to know which button has been selected on portal screen

    Dear Freinds,
                i an abaper i have one specific doubt regarding icon which has been selected on the portal screen.
    My requirement is we have portal screen on which i have two Buttons(or links) one Self and another for Dependents. i have to write an Bapi or RFC and give it to webdynpro developer.
    i have to write logic in my RFC based on the button selected on the portal screen (self or dependent) .
    in my RFC function module i have used import parameters &  table parameters( return value for the webdynpro to pick up)  . In the table parameters i have given structure z_struc  & the  Z_Struc has basically three fields
    a) self b) depndt c) flag.
    so i have written logic as
                       if v_flag_self = 'A'
                        logic for the self of the employee
                       elseif  v_flag_dep = 'B'.
                        logic for the dependent.
                       endif.
    so any one  could please let me know how i should pass on to the webdynpro
    or to recognize that the value for the Self he has to consider is A
    and dependent button he has to take is B. Because based ont he this flag values
    (A & B) only my logic works.
    how i should pass this values to him .
    Regards
    latha.

    Thanks!
    This wasn't there when I first looked at it, or I was looking at another location of the api, I will make sure to look at this one now :D.
    I basically did Action action = Dialog.show().
    then did if (action.equals(Dialog.Actions.OK))
    //code
    }So it works :).
    I like the custom action too, I'm interested in the example Action response = Dialogs.create()
          .title("You do want dialogs right?")
          .masthead("Just Checkin'")
          .message( "I was a bit worried that you might not want them, so I wanted to double check.")
          .showConfirm();I from the api it says that .create() is static Dialogs Type, so I'm curious how that's used as the Action in this case?
    Thanks again :)

  • How to know if board has already been intialized

    Hello,
       I am trying to automate a microscopy stage.  I need to be able to move the stage in XY with blended motion, and in Z with single axis control.  I have been able to do this but I still have one glaring problem.  The module for the XY stage may be loaded first, or the Z stage may be loaded first.  The one that get loaded first needs to initialize the board, and then the rest need to just run on the board.  I do not know beforehand which one will be first and I have not been able to figure out how to transfer this information between the programs as I have multiple boards that are running from this system and the user may decide to control the stage with one board and the Z focus with a different one.  
    So with all of that, is there a function that will tell you if the board has been initialized.  Here is what I want to do
    Start .dll
    Get properties (Board ID, Axis, blend mode....)
    Check if board is initialized.   If not then flex_initialize_controller (BOARDID,null);
    Set up axis...
    Run program.
    Thanks
    Solved!
    Go to Solution.

    When an NI 73xx motion control board is not initialized (e. g. after a power cycle or a board reset), the board is in Power-Up Reset state. The initialization routine needs to reset this flag to prepare the board for normal operation. You can read the Power-Up Reset flag with flex_read_csr_rtn().
    I hope this helps,
    Jochen Klier
    National Instruments

  • HOW TO KNOW WHAT APPLICATION HAS OPEN A PDF FORM

    Hello,
    I would like to know how I can verify that application has opened a certain PDF form (for example Reader or Professional). This checking must be done from the same form when the document is opened (using JavaScript for example).
    b Thank you for your time.

    Have you seen the example that Lori DeFurio has posted on the developer site to do just this? The javascript example in the form works in both Acrobat and LiveCycle Forms. A sample of the results are:
    Viewer Version = 7.05
    Viewer Type = Exchange-Pro
    Major Form Version = 7
    Minor Form Version = 7.07
    http://partners.adobe.com/public/developer/en/tips/lc_viewer_version.pdf
    Hope this helps.
    Angie Okamoto
    www.techedsolutions.com

  • How to know if someone has jailbroken my stolen iPhone 5

    My iphone 5 was stolen 1 month ago. I think the guy who stole it must get it jailbroken. How can I know who is using my phone?

    You cannot tell that and all they need to do is restore it to factory settings and it is a new iPhone...however, some carriers can/will block a stolen iPhone based on the iMEI if it has been reported.  In that case it would have to be jailbroken to be used on another carrier.

  • How to know a dialog box is opened?

    Hi friends
                    I am developing a VI which automatically opens a URL. As soon as URL opens, it displays a dialog box for entering password.  But we don't know when this dialog box opens. How to detect that the dialog box is opened so that I can paste the password?

    How is this URL opened? Does a browser open up, or do you have a browser embedded on your VI's front panel via ActiveX (assuming you're on Windows)? If you're not on Windows, which OS are you running? If you are running on Windows then you can use the Windows API to check if a window exists. You can get them in several locations on the NI site. Here's one place.

  • How to know whether sequencefile has loaded or not?

    Customizing user interface.
    I "reload sequencefile on start". And do not use SequenceFileView. Some sequencefile spends a long time for loading. And sometimes, reference of sequencefile should be empty. Because the sequencefile has being delete, or did not open any file last time, etc.
    I need feedback from TS engine. How to get it?
    Solved!
    Go to Solution.

    I think the following excerp from the TestStand help answers your question:
    SequenceFiles Property (Read Only)
    Syntax
    ApplicationMgr.SequenceFiles
    Data Type
    SequenceFiles
    Purpose
    Collection of sequence files the application opens.
    Remarks
    This property eliminates the need to keep an array of open
    sequence files. Use the ApplicationMgr.OpenSequenceFile
    method to add files to the collection and the ApplicationMgr.CloseSequenceFile
    method to remove files from the collection.
    hope this helps,
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

Maybe you are looking for

  • Accessing DBA_TABLES from PL/SQL

    Hi all, Can I access DBA_TABLES from a PL/SQL block? Following is the code I tried: SQL> SHOW USER USER is "SYSTEM" SQL> ED Wrote file afiedt.buf   1  CREATE OR REPLACE PACKAGE BODY BARAKAU   2  AS   3  PROCEDURE UPPER_COLS ( P_USER VARCHAR2, P_TABLE

  • Notice for 2 Updates Needed for Note 3 Lollipop Update

    This morning I had an update notice on my Galaxy Note 3saying I had an update available which I took care of right away. It also said that this was 1 of 2 updates in preparation of Lollipop 5.0. After the rather small update, it said another would be

  • My front camera wont open.

    When I go to switch from my back camera (which works fine) to my front camera, It doesnt open. It just shows the closed shutter screen, and I cant get it to go away? Help? I have a iPod 5, IOS 6.0.1

  • Join two table (Inner Join)

    how to join two tables using inner join.

  • Shared use of BPS variables across planning areas?

    Hello, Is it possible to use 1 var for 2 planning areas? I understand it is area-specific but would like to find out if this is possible so that I can minimize the number of variables to use. Thanking you in advance. Regards, Adette Rosenthal