How to handle "ok" and "cancel" button of dialog popup?

Hello everyone,
I'm using a dialog with type="okCancel". My question is how to handle ok and cancel button of this popup window. Here is my code below:
<af:popup id="kriterPopup">
<af:dialog title="Kriter Seçiniz" type="okCancel" inlineStyle="width:500px;height:400;" id="d2"
dialogListener="#{BasvuruDegerlendirmeBean.kriterDialog}">
<af:selectManyCheckbox label="Kriterler :" id="smc2"
binding="#{BasvuruDegerlendirmeBean.kritersCheckbox}">
<af:forEach items="#{BasvuruDegerlendirmeBean.kriterList}" var="item">
<f:selectItem itemLabel="#{item.ybKriter.tur}" itemValue="#{item.ybKriter.tur}" id="si3"/>
</af:forEach>
</af:selectManyCheckbox>
</af:dialog>
</af:popup>
I want to handle ok and cancel button of this window, and redirect to the pages which I want.
Can anyone help me how I can do?
Thanks, with my regards.
Ali

You need dialogListener..
    public void dialog1_dialogListener(DialogEvent dialogEvent) {
        if (dialogEvent.getOutcome().equals(DialogEvent.Outcome.yes)){ //for Yes
        }else{ //for Cancel
    }

Similar Messages

  • Hide Ok and Cancel buttons in a Popup

    JDev 11.1.1.5.0
    I am using an <af:popup> component. By default, when I run it shows Ok and Cancel buttons at the bottom. I don't want these two to be shown.

    Yes. I just found it right after posting this. So unmarked this thread as a question.

  • How to disable minimize and maximize buttons of a popup window

    hello.
    can someone please tell how to disable the minimize and maximize buttons for a popup window.
    i know this is very basic concept.. but iam new to jdeveloper..please someone help me out

    Hello,
    U can use script in ur page to open the Popup window.
    window.open("yourpage.do", window_name, 'toolbar=0,scrollbars=0,location=0,status=yes,menubar=0,resizable=0,width=600,height=400,left = 225,top = 140');
    Bye

  • How to handle stop and refresh button.

    i have two JSP pages. in the frist page the user has the option to either view previous ones or create a new. in both cases i pass a form id as parameter to execute the related data. in the second page , when user fills the data and clicks submit, and clicks the stop or refresh or any other button before the data gets committed and reaches the confirmation page, how do i handle it? when user clicks one of these buttons , the controller class executes again (the process request is again executed).but this time there are no parameters sent to the controller. how do i handle this? also when user clicks the back i have redirected to dialog page. but there are back,forward refresh buttons for the dialog page. if user clicks those, again there are no parameters sent to the controller class.
    how do i handle this.

    too many queries at the same time.
    1. Back button - Read the devguide and make the application/page bworser backbutton safe
    2. Refresh/Stop Buttons - either use js to restrict these, or embed logic in the code to stop undesirable behaviour.
    Thanks
    Tapash

  • Popups how top program the ok and cancel button

    How do I program the ok and cancel button in the popups. I want to add functionality to the existing ok and cancel buttons in the popup
    Thanks,
    Veena

    You can ise a dialog inside the popup and use a dialogListener to check how hte dialog has been closed
    public void handleDialog(DialogEvent event)
      if (event.getOutcome().equals(DialogEvent.Outcome.no))
        setGender(getOldGender());
        // reference to the gender component is from component binding
        // see selectOneRadio above - binding="#{sharedPopup.genderComponent}
        RequestContext.getCurrentInstance().addPartialTarget(getGenderComponent());
    }{code}
    Timo                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How I can internatiolization OK and Cancel buttons confirmDialog?

    private void clickButton() {
              int response = JOptionPane.showConfirmDialog(this, resBundle.getString("Confirmation_text_itroduction"),
    resBundle.getString("Confirmation_title"), JOptionPane.OK_CANCEL_OPTION,
                        JOptionPane.QUESTION_MESSAGE);
    if (response == JOptionPane.OK_OPTION) {
                   System.out.println("OK button clicked");
              } else if (response == JOptionPane.CANCEL_OPTION) {
                   System.out.println("Cancel button clicked");
    As you can see I internatiolization the title of confirm dialog and text (use object resBundle). OK!
    But how I can internatiolization OK and Cancel buttons is this confitm dialog?

    OK, I can internatiolization buttons "OK" and "Cancel" in confirm dialog:
    private void clickTestKindButton(String message) {
              Object[] options = { resBundle.getString("OK"),
                        resBundle.getString("Cancel") };
              int response = JOptionPane.showOptionDialog(this, message, resBundle
                        .getString("Confirmation_title"), JOptionPane.OK_CANCEL_OPTION,
                        JOptionPane.QUESTION_MESSAGE, null, options, options[0]);
              if (response == JOptionPane.OK_OPTION) {
                   new IntroductionTest();
              } else if (response == JOptionPane.CANCEL_OPTION) {
                   System.out.println("Cancel button clicked");
         }It's work OK!
    But how I can internatiolization buttons "OK" and "Cancel" in the input dialog ?

  • Would like to change my home page. I click on options and my general tab is blank with only the ok and cancel buttons showing. How do I fix this?

    In options, under the general tab, it is blank all except the ok and cancel buttons. I can't change my home page. Please help.

    Hi cor-el,
    Thank you for your reply. Before I had seen your reply. I went into options and under general, all of a sudden it showed what should be there. I closed browser and did it again and it didn't show. It has been blank for roughly two months. Just seems funny that I ask a question and after all this time of not showing what it should, it does, to only be blank again.
    I have also been trying to update the flash player. That comes up completely blank as well with nothing showing at all. I did this several times the day before I posted my question. That same day I also hit the reset button for firefox when I was having trouble trying to update the flash player.
    I did as you said to do. Nothing has changed. Is there something else that I could try?

  • Creating a dialog box with OK and Cancel buttons without OADialogPage

    Hi Experts,
    i want to create a dialog box for Delete Confirmation means after clicking on delete it should pop up a small dialog box with OK/Cancel buttons
    and need code for the same to handle the buttons.
    i have created with OADialogPage but its showing in a complete page but i want to show those buttons in a small box.
    Plz help.
    THANKS IN ADVANCE.
    Thanks
    Raja.

    Hi,
    I have not tried using javascript in destination URI as suggested by Mukul.
    I have tried the below code for opening a page as dialog box.
    You can try it for your requirement by creating a dialog page of your own, say XXDialogPage (with OK and Cancel button)
    StringBuffer l_buffer = new StringBuffer();
    l_buffer.append("javascript:mywin = openWindow(top, '");
    String url = "/OA_HTML/OA.jsp?page=/xx/oracle/apps/fnd/dialog/webui/OADialogPG";
    OAUrl popupUrl = new OAUrl(url, OAWebBeanConstants.ADD_BREAD_CRUMB_SAVE );
    String strUrl = popupUrl.createURL(pageContext);
    l_buffer.append(strUrl.toString());
    l_buffer.append("', 'lovWindow', {width:500, height:500},false,'dialog',null);");
    pageContext.putJavaScriptFunction("SomeName",l_buffer.toString());
    In dialog page's controller, you can forward it to the page onc ethe user selects OK or Cancel.
    Pass the selected value back to the main page and further you can use it for deleting.
    Regards.

  • Mapping enter and esc to ok and cancel buttons

    Hi,
    Does java's fine API offer any method of mapping Enter and ESC to OK and Cancel buttons in a customized JDialog?
    The current way I'm doing it is through a brute force of adding a KeyListener to every component in the dialog box (in an automated way), is there another way?
    Any suggestions would be appreciated.

    Uh oh, should I be scared because he knows more about
    Swing than just about anyone?
    Yes. Because if you really get stuck then he won't help you and then you are doomed.
    If anybody was rude it was him, and if anybody is an
    idiot it's you. See how easy it is to make claims
    without providing any reasons or rationale?Reasons and rationale have been provided but I guess you didn't grasp them the first go around so here goes.
    1) You were impatient
    You waited 30 minutes before whining and bumping. That is impatient. Nobody is being paid to deliver answers to you.
    2) You posted in the wrong forum.
    This is not the Swing forum is it? No it is not.
    3) You should learn to search
    If you had searched for even up to 15 minutes (and you wouldn't have needed this long) then you would have had your answer in half the time. Searching saves YOU time.
    4) You were rude
    When the facts (and please note the use of the word "fact" not personal opinion) above were pointed out to you then you were rude.
    Finally the "you are an idiot" problem. I will give you this is the most subjective of the lot although given that you cannot dispute ANY of the above facts (although you seem to be trying and that's helping to make the case that you're quite the idiot) that's really not saying much.
    However, it seems to me that if Person A wants the assistance of Person B (who is a valuable resource of information for person A and others) it does not seem wise for Person A to be rude to person B. So in the case of Person A who is rude to Person B who they are relying on as a free resource we can make the assertion that Person A is an idiot.
    In case you couldn't follow that you are Person A.

  • Moving ok and cancel buttons

    Hi,
    When I do JOptionPane.showOptionDialog(...);
    Can anyone tell me how to make the ok and cancel buttons appear at the bottom right of the dialog instead of the bottom center.
    Thanks,
    Jim

    Sure, use another panel as a spacer thusly:
    | |
    | Other Panels |
    | |
    | Spacer | OK Can|<-position panel contains both panels
    Use BorderLayout for the entire dialog and set a position panel to be SOUTH (If you are using someother layout, add a full panel as a backdrop and move your Other panels into it using NORTH). Add the Spacer panel and 'OK/Cancel' panel to this using GridLayout (2 columns, 1 row).
    There is no restriction, other than memory size, to how many panels you use and their hierarchy.
    Robert Templeton

  • How to handle ok/add/update button

    hi,
       the button ui=1 automatically changes in add/update /ok buttons .but how we handle update and add ivent through database.
    Pandey
    Sai I.S.

    Hi,
    I have made a new company in SAP B1 and I Selected the Use purchase account posting system in company detail Basic Initalization tab.
    so it is post the taxes in stock account.this is not formal and i am getting problem in normal processing. so i want to know what the effects of this purchase account posting system. how it is different from normal. how can i chang this company in narmal company for normal processing .plz tell me process of changing in normal. and if i carry on futher hat will be the efect of it.
    plz give me answar quickly
    I have also a problem when i creating new company .it does not take any user name and when i open that by manager user it gives massege wrong user or passward.
    what the problem is there plz give me solution of all above.
    HP

  • Lost my iPad and when I attempt to use the "LOST" feature in icloud, the NEXT and CANCEL buttons are not responding.  I have tried this on 3 different windows based computers.  Any ideas???

    When using icloud because I lost my ipad...when i attempt to use the "LOST" feature the "next" and "cancel" buttons do not respond.  I have attempted this on 3 different windows based computers on 3 different networks.  Any ideas? 

    Report to police along with serial number. Change all your passwords.
    These links may be helpful.
    How to Track and Report Stolen iPad
    http://www.ipadastic.com/tutorials/how-to-track-and-report-stolen-ipad
    Reporting a lost or stolen Apple product
    http://support.apple.com/kb/ht2526
    Report Stolen iPad Tips and iPad Theft Prevention
    http://www.stolen-property.com/report-stolen-ipad.php
    How to recover a lost or stolen iPad
    http://ipadhelp.com/ipad-help/how-to-recover-a-lost-or-stolen-ipad/
    How to Find a Stolen iPad
    http://www.ehow.com/how_7586429_stolen-ipad.html
    Apple Product Lost or Stolen
    http://sites.google.com/site/appleclubfhs/support/advice-and-articles/lost-or-st olen
    Oops! iForgot My New iPad On the Plane; Now What?
    http://online.wsj.com/article/SB10001424052702303459004577362194012634000.html
    If you don't know your lost/stolen iPad's serial number, use the instructions below. The S/N is also on the iPad's box.
    How to Find Your iPad Serial Number
    http://www.ipadastic.com/tutorials/how-to-find-your-ipad-serial-number
     Cheers, Tom

  • Yes, No and Cancel Buttons on Pop-Up for BACK or NEW button

    Hi Experts,
    First scenario:
    We have crated few mandatory fields in incident when ever we are not filling the mandatory fields and try to SAVE (Incident Tool bar button) the Incident, it will Check for any Error Messages, before saving the Document,
    If entries not found in mandatory fields record will not get saved.
    This functionality we are controlling in EH_ONSAVE method of the SRQM_INCIDENT_H/IncidentOV.
    Second scenario:
    But After filling few fields in Incident screen, If I click on NEW button for a new incident or BACK button ,  it give one popup with message Do you want to  save the changes ? With Buttons Yes, No and Cancel. If I click on the Yes button Incident gets saved with an IRN number without entry of any mandatory data.
    How can I control the second scenario as first scenario? Please suggest how to controll Yes, No and Cancel Buttons on Pop-Up for BACK or NEW button as SAVE button.
    Thanks in advance
    Chand

    hi,
    you can control  the pop-up SAVE button without saving your details or write your ownlogic on pop-up save.
    please refer to this post.
    Re: Suppress POP-UP
    regards
    Ismail

  • How to use Checkbox  and radio buttons in BI Reporting

    Hi BW Experts,
       My Client has given a report in ABAP format and the report has to be develop in BI.It contains Check boxes and the radio buttons. I don’t know how to use Checkboxes and radio buttons in Bex.For using this option, do we need to write a code in ABAP.Please help on this issue.
    Thanks,
    Ram

    Hi..
    Catalog item characteristic
    - Data element
    - Characteristic type
    Entry type
    List of catalog characteristics
    Designer
    Format (character)
    Standard characteristic
    Alternative: Master characteristic
    (used for automatic product
    assignment)
    Simple entry field
    Alternatives:
    Dropdown listbox or radio button
    list

  • Using Tiscali Webmail with Firefox 6. If I try and delete an email the Ok and Cancel buttons are disabled and nothing happens, have to use F5 to take me back. IE8 works so is this a compatibility issue?

    Using Tiscali Webmail with Firefox 6. If I try and delete an email the Ok and Cancel buttons are disabled and nothing happens, have to use F5 to take me back. IE8 works so is this a compatibility issue?

    It appears OP solved the problem: [/questions/874744]

Maybe you are looking for