How to use a cancel button........

hello everyone,
              i have a selection screen, from where i am calling a selection-screen as a pop-up screen. the fields i am checking on the pop-up screen will get append on the previous screen. now the problem i am facing with the cancel button.
    if i am pressing the cancel button still the checked fields are getting appended.
i want to exit from the screen and want to keep the previous screen as it is. it is a simple report program.
please help me out.
thanks i advance.

I am using set screen 0. and leave screen.
but still the problem persists.
let me tell you in detail.
i am going to pop-up screen to get the fields appended on my previous screen.
if i check some checkboxes on it and click ok then according to those checked fields the corresponding select-options should come on previous screen. 
because i have added set screen 0. to 'OK'.
now what i am facing is if i check some checkboxes on the pop-up and say 'CANCEL' still the program is appending the those checkboxes and appending them on the previous screen.
what i am expecting is, it should exit the pop-up screen and should maintain the previous screen as it is.
thanks

Similar Messages

  • How to use the cancel button in showInputDialog

    um how would i go with overriding the cancel button's deafult function in JOptionPane.showInputDialog?
    in my code:
    package alphaOne;
    * this program takes in a number and gets the factorial of that number
    import javax.swing.*;
    public class Factorial {
         public Factorial() {
               * variables intilization, input is where the option pane puts the data
               * number is teh actucal number entered parsed from string result is
               * where the resutl is stored flag1 is the indicator if the user had
               * entered an integer
              String input;
              int flag1 = 0;
              int number = 0;
              long result = 0;
               * this while loop runs continously unless an integer is entered
              while (flag1 != 1)
                   try {
                        input = JOptionPane
                                  .showInputDialog("Enter the number to be factored, Integer only: ");
                        number = Integer.parseInt(input);
                        flag1 = 1;
                   } catch (NumberFormatException ea) {
                        JOptionPane.showMessageDialog(null,
                                  "The input was not a integer!", "Warning",
                                  JOptionPane.ERROR_MESSAGE);
              result = number;
              for (int x = 1; x < number; x++) {
                   result = result * (x);
              JOptionPane.showMessageDialog(null, "The result is: " + result,
                        "Result", JOptionPane.CLOSED_OPTION);
              try {
                   System.exit(0);
              } catch (SecurityException ea) {
                   System.out.print("ARRRRR its dead!");
         public static void main(String[] args) {
              Factorial One = new Factorial();
    }the cancel button does not break the while loop

    what is the value of null compared to when you compare it, and do we use the String.equals() or the String == null to compare? as seen in here i tried with input.equals(null) as a comparison but it deos not exit when i press cancel
    package alphaOne;
    * this program takes in a number and gets the factorial of that number
    import javax.swing.*;
    public class Factorial {
         public Factorial() {
               * variables intilization, input is where the option pane puts the data
               * number is teh actucal number entered parsed from string result is
               * where the resutl is stored flag1 is the indicator if the user had
               * entered an integer
              String input;
              boolean flag1 = false;
              int number = 0;
              long result = 0;
               * this while loop runs continously unless an integer is entered
              while (flag1 != true){
                   try {
                        input = JOptionPane
                                  .showInputDialog("Enter the number to be factored, Integer only: ");
                        number = Integer.parseInt(input);
                        System.out.println(input);
                        flag1 = true;
                        if (input.equals(null))
                             try {
                                  System.exit(0);
                             } catch (SecurityException ea) {
                                  System.out.print("ARRRRR its dead!");
                   } catch (NumberFormatException ea) {
                        JOptionPane.showMessageDialog(null,
                                  "The input was not a integer!", "Warning",
                                  JOptionPane.ERROR_MESSAGE);
              result = number;
              for (int x = 1; x < number; x++) {
                   result = result * (x);
              JOptionPane.showMessageDialog(null, "The result is: " + result,
                        "Result", JOptionPane.INFORMATION_MESSAGE);
              try {
                   System.exit(0);
              } catch (SecurityException ea) {
                   System.out.print("ARRRRR its dead!");
         public static void main(String[] args) {
              Factorial One = new Factorial();
    }i have also tried to ue input == null, input == "", input.equals(""), input.equals(" ")
    Message was edited by:
    TheHolyLancer
    i edited the part so it is bold
    Message was edited by:
    TheHolyLancer

  • How to code a Cancel button in a frame

    hello..i'm new to java..and i'm currently working on a project that displays a 'Quiz' screen, meaning a new frame from the main frame..
    the problem is, how do i code the Cancel button in the 'Quiz' frame so that only the 'Quiz' frame disappears and leave the main frame for user to view? i've tried using setDefaultCloseOperation( EXIT_ON_CLOSE ); but it seems that it closes all the program..and i don't want that.
    how should i do it??
    please help me..thanks

    1. Check out my StandardDialog class as an example of how to implement a cancel button
    2. use either the HIDE_ON_CLOSE or DISPOSE_ON_CLOSE standard closing operations

  • How to use a radio button in enabling/disabling a text box in report progra

    Hi,
        Could any please let me know, how to use a radio button in enabling/disabling a text box in report program.

    *& Report  ZMR_RADIO_BUTTONS
    REPORT  ZMR_RADIO_BUTTONS.
    PARAMETERS : R1  RADIOBUTTON GROUP G1,
                 R2  RADIOBUTTON GROUP G1.
    PARAMETERS : A1 TYPE I,
                 A2 TYPE I.
    AT SELECTION-SCREEN OUTPUT.
    *initialization.
    IF R1 = 'X'.
    LOOP AT SCREEN.
    IF SCREEN-NAME = 'A1'.
       SCREEN-INPUT = 0.
        SCREEN-ACTIVE = 0.
    ENDIF.
    IF SCREEN-NAME = 'A2'.
       SCREEN-INPUT = 0.
        SCREEN-ACTIVE = 1.
    ENDIF.
    ENDLOOP.
    ENDIF.
    IF R2 = 'X'.
    LOOP AT SCREEN.
    IF SCREEN-NAME = 'A1'.
       SCREEN-INPUT = 0.
        SCREEN-ACTIVE = 1.
    ENDIF.
    IF SCREEN-NAME = 'A2'.
       SCREEN-INPUT = 0.
        SCREEN-ACTIVE = 0.
    ENDIF.
    modify screen.
    ENDLOOP.
    ENDIF.
    START-OF-SELECTION.
    *IF R1 = 'X'.
    *LOOP AT SCREEN.
    IF SCREEN-NAME = 'A1'.
       SCREEN-INPUT = 0.
       SCREEN-ACTIVE = 1.
    ENDIF.
    *ENDLOOP.
    *ENDIF.
    *IF R2 = 'X'.
    *LOOP AT SCREEN.
    IF SCREEN-NAME = 'A2'.
       SCREEN-INPUT = 0.
       SCREEN-ACTIVE = 0.
    ENDIF.
    *ENDLOOP.
    *ENDIF.

  • How to use a back button in action pages?

    Hi all,
    I have created a user login page,home page and user profile page.
    If the user provide correct username and password in the login page he will be taken to home page.
    In the home page he will be having his username and a link to view his profile.
    When the user click on the link "My Profile(user profile)" he wil be taken to that page.
    In my profile page the user can edit only his firstname,lastname and password .
    On the user profile page i have placed a Back Button(using javascript: on onclick event i have used history.back()) to go back to home page after editing his profile.
    If the user edit his profile for n-number of times then atlast if he wants to go back to home page-then he wil cilck the back button.
    Now the problem occurs like the back button not going to home page and it simply going back with the edited history.
    How to use a back button in action pages; without repeating the actions done on the page; how to redirect to the users home page?
    I simply used the hyperlink in userprofile page to go to home page but when i click onit it is displaying blank home page.
    I'm using hibernate orm mapping; cflogin and cflogout tags.
    Any help appreciated,
    Chandru P

    chandrup wrote:
    Hi Dan,
    Dan Bracuk wrote:
    Use an anchor tag.
    I simply used the hyperlink(<a href="home.cfm">Home</a>) in userprofile page to go to home page but when i click onit it is displaying blank home page.
    I can see your problem. You may use javascript:history.go(-1), javascript:history.go(-2), ..., to go back one page, two pages, and so on. But how does one go back an arbitrary n pages? The link href="home.cfm" isn't a good solution for the browser. It makes a new call to the server which, as you may have discovered, can overwrite all the changes made at the browser. 
    You should use the Javascript variable history.length. If you open n links in succession, starting from page0.cfm, then the browser holds the value of history.length as n. So, experiment with something like
    <a href="javascript:history.go(-history.length)">Go home</a>
    or
    <a href="javascript:history.go(-history.length+1)">Go home</a>

  • How to disable the cancel button in InputDialogBox?

    Can someone please tell me how to disable the cancel button in an input dialog box?
    thanks,

    Cross posted: [http://www.coderanch.com/t/487888/Swing-AWT-SWT-JFace/java/disable-cancel-button-input-dialog]

  • Explain How to use Structure mapping button

    Hi All
    Iam Developing an application "Implementing and Using Exceptions in Guided Procedures"
    Can you please explain How to use Structure mapping button,
    Plz give me steps in details
    Thanks
    Srinivas

    Hi
    Create a project using 0020 as method.
    Max

  • How to show ok & cancel button using showMessageDialog

    hi to all, when i use showMessageDialog it gives only ok option,
    like
    JOptionPane.ShowMessageDialog(null,"are you sure you want to continue" ,"Confirmation",JOptionPane.QUESTION_MESSAGE);
    this statement shows only ok option, i want ok and cancel option both.
    and can u tell me how to put actions in ok & cancel option
    like if user clicks ok option then he can continue the program , if user clicks cancel then he would exit from the program.
    can u tell how to comapre that using if statement
    please reply me as soon as possible.

    This is probably close to what you want. I believe messages can be replaced by null. You can probably figure out the rest from the API.
    response = JOptionPane.showConfirmDialog(myFrame,
                                             messages,
                                            "Delete hard drive?",
                                             JOptionPane.OK_CANCEL_OPTION);
    // If User hit CANCEL button we jump out
    if (response == JOptionPane.CANCEL_OPTION)
        return;

  • How to capture OK / Cancel Button response of warning type message in EBS D2K form using Form personalization

    Hi Experts
    We are working on one requirement in which on a standard D2K EBS form based on the response of a warning message we need to perform certain actions using Form Personalization.
    The problem is that we are not able to capture response of OK and Cancel buttons of the warning.
    If any one has come across such scenario, I would request to please share your valuable suggestions. 2898414
    Thank You
    Regards
    Mirza Tanzeel

    Figured out myself that this is mot possible using Form Personalization.
    Only option possible is to try implementing by modifying custom.pll
    Thanks
    Mirza Tanzeel

  • How to handle the "cancel" button and "close" icon of a popup ?

    Hi,
    I have a popup with "cancel button" and "close icon"(on the top right corner of the popup), I want the same operations to be performed on clicking of any of these two components.
    Is there a way to handle such situation ?
    I read about 2 cases to look into this but they didn't work too well for me.
    1. I read about the "popcancellistener" but that listener is called whenever the popup closes, so suppose I have an "ok button" on the popup to create a record, after the record is created, the popup closes and goes into the "popcancellistener", now the question is "how do we know if it came there because of the 'ok button' or 'some other event'".
    2. I even checked the "DialogListener", now I'm able to distinguish between the 'OK' and 'CANCEL' button in the dialoglistener using the "Dialog.Outcome.ok/cancel", but when a user clicks on the close icon, we do not enter the "DialogListener" at all, so in this case "how do we handle the close icon click event"
    Do let me know if you need any more information from my side.
    Thanks for the help in advance.

    The following mechanism responds to any of the following events: <Esc> key, Close icon ('x'), Cancel button
    JavaScript part:
    function popupClosedListener(event){
                  var source = event.getSource();
                  var popupId = source.getClientId();
                  var params = {};
                  params['popupId'] = popupId;
                  var type = "serverPopupClosed";
                  var immediate = true;
                  AdfCustomEvent.queue(source, type, params, immediate);
    }JSF part:
             <af:popup ....>
                  <af:clientListener method="popupClosedListener"
                                           type="popupClosed"/>
                  <af:serverListener type="serverPopupClosed"
                                          method="#{myBean.serverPopupClosedMetod}"/>
            </af:popup>Finally, Java part:
    public void serverPopupClosedMetod(ClientEvent event){
    }

  • How to disable the cancel button in the ProgressMonitor

    hi,
    I need to know, is there any way to disable/remove the (cancel)button in the ProgressMonitor?
    One more problem is,
    Once i click the cancel button, isCanceled() return true, how to make it false again so that the process continue....
    It is very urgently.....
    please help me out.
    Thanks in advance.
    Regards,
    Deepa Raghuraman

    I don't think that's a good solution, because Cancel button itself is not disabled, so user is tempted to click it and nothing happens.
    A better but dangerous solution is this:
    progressMonitor = new ProgressMonitor(ProgressMonitorDemo.this,
                                         "Running a Long Task",
                                         "", 0, 100);
    progressMonitor.setMillisToDecideToPopup(0);
    progressMonitor.setMillisToPopup(0);
    progressMonitor.setProgress(0);
    JDialog dialog = (JDialog)progressMonitor.getAccessibleContext().getAccessibleParent();
    JOptionPane pane = (JOptionPane)dialog.getContentPane().getComponent(0);
    pane.setOptions(new Object[]{});Refer to the same question here [http://stackoverflow.com/questions/512151/how-do-i-disable-the-cancel-button-when-using-javax-swing-progressmonitor] .

  • How to enable the "Cancel button" so you can stop a report while loading ...

    I have seen that some reports have a Cancel button located just below "the loading ..".
    How can I enable that button in MS Reporting service 2005?

    The following mechanism responds to any of the following events: <Esc> key, Close icon ('x'), Cancel button
    JavaScript part:
    function popupClosedListener(event){
                  var source = event.getSource();
                  var popupId = source.getClientId();
                  var params = {};
                  params['popupId'] = popupId;
                  var type = "serverPopupClosed";
                  var immediate = true;
                  AdfCustomEvent.queue(source, type, params, immediate);
    }JSF part:
             <af:popup ....>
                  <af:clientListener method="popupClosedListener"
                                           type="popupClosed"/>
                  <af:serverListener type="serverPopupClosed"
                                          method="#{myBean.serverPopupClosedMetod}"/>
            </af:popup>Finally, Java part:
    public void serverPopupClosedMetod(ClientEvent event){
    }

  • How to use a link button in a matrix

    Hi, I'm trying to create a matrix with a column that uses a link button to call a Sales order.. how can i do it? i'm new in SBO!

    Hi,
    You can do it in 2 differents ways:
    1. With the ScreenPainter. Set the column property "Type" with the value "et_LINK_BUTTON" and the property "LinkObjectType" with the value of the Business Object (for Sales Orders, the value is "17").
    2. Directly on the XML file. You can see and example below.
    <column uid="col" type="116" title="Parte" description="" visible="1" AffectsFormMode="0" width="55" disp_desc="0" editable="1" right_just="0" val_on="" val_off="" backcolor="-1" forecolor="-1" text_style="0" font_size="-1">
          <databind databound="1" table="" alias="col"/>
    <ExtendedObject linkedObject="17" LinkedObjectType="17"/>*
    </column>
    The most important things are the properties "type" (116 for linked button) and "linkedObject" and "LinkedObjectType" (17 for Sales Orders).
    I hope this can help you.
    Regards,
    Cristian Rivero

  • Apple Keybord ADB (Anyone knows how to use the power button?)

    Hi, I just found my uncle's old Mac SE and I was wondering if anyone knows how to set the power button on the keyboard (Apple Keyboard) model number M0116C? I want this key to work, because it is actualy not working.
    Tanks!

    Hi, I just found my uncle's old Mac SE and I was
    wondering if anyone knows how to set the power button
    on the keyboard (Apple Keyboard) model number M0116C?
    I want this key to work, because it is actualy not
    working.
    You don't make any settings for the power switch; either the Mac can use it or it can't. The Mac SE has a rocker power switch on the back of the CPU. The keyboard can't change the state of the power supply. Later Macs could, but not the SE.

  • How to use mobile phone buttons

    hello. you know how to use left right up down and fire buttons without using canvas ? I am using MIDlets and when I have lots of forms. When the user clicks next button, he should go to next page. When the user clicks previous button he should go to previous page and also fire button works? Is it possible using previous, next and fire buttons without using keypressed() ? de.enough.polish can be used to use next previous buttons ?

    In MIDP, it is simple to navigate between different screens (pages?) using Command objects. If needed, [click here to learn|http://developers.sun.com/mobility/midp/articles/ui/|MIDP GUI Programming] +"...description of the GUI classes included in the MIDP with examples of how to use them. This article concludes with guidelines to GUI programming for mobile information devices..."+
    BTW there's no API in MIDP to access buttons like fire from within forms, unless these contain CustomItem objects

Maybe you are looking for

  • Error Opening a Sybase Connection

    Ok, this is the first time i have tried to establish a sybase connection before but this is what i did. I went to the sybase site and downloaded the new JConnect 5.5 and 4.5 I installed it and it is setup in my classpath. jisql works properly so i am

  • Error occured in document posting

    Hi, I create cash account 200100, but when i was post the document i got this error like "the account 200100 was not assigned to Bil" Chart of account is BIL Moderator: Follow the instructions from SAP and assign G/L account to CoA

  • IC WinClient 5.0 - Case ownership issue

    Hello, We have an issue where we need to do the following: If an agent answers an email, if the customer responds to that email, then this response should be automatically assigned to the original agent. I was thinking that we might be able to use th

  • Zen Micro's In Stock Directly Through Creative L

    All, I have just received a report that we have stock on the White and Black models of the Zen Micro. They are not on the shop page, however you can order them directly through us by calling: -800-998-000 and selecting option # I will update as avail

  • Windows 7 network file transfer absurdly slow

    I know there are plenty of other posts about slow network file transfer. Here, elsewhere, I can't say I read them all but most are referring to slow down to 1MB/s. I am getting <20KB/s. If I transfer a very small file (less than 100KB) it would start