Multiple Consecutive Popup Dialogs

Hi,
I am having a poblem with the following code;
package com.innsite.inntouch;
import javax.swing.JApplet;
import javax.swing.JOptionPane;
public class TestApplet extends JApplet{
     public TestApplet() {
          super();
          validateForm();
     public boolean validateForm() {
          JOptionPane.showMessageDialog(this,
         "Eggs aren't supposed to be green.");
          JOptionPane.showMessageDialog(this,
                   "they should be red.",
                   "Inane warning",
                   JOptionPane.WARNING_MESSAGE);
          return(false);
}This lilttle example is fine unless the browser is running is 'kiosk' mode. In kiosk mode (can be achieved by pressing F11 on IE) the second popup momentarily displays then jumps to the back of the browser.
Is this a bug?
I am running Windows XP with JRE 1.4.2_08 and IE 6.0
Thanks for replies.

Hey guys,
Do you have a code example for me please?
I am using the popup for a piece of code that takes some time
to run.. and when its done running i remove the popup. But when i
run the script again, my popup doesn't appear. :(
Here the code i use:
private var pop2:Canvaspopup;
public function imageSelected(event:Event):void // i cum
here on the select event from a file dialog box.
trace(pop2);
if(pop2!=null)
pop2=null;
pop2=new Canvaspopup();
pop2 =
Canvaspopup(PopUpManager.createPopUp(Application.application as
Sprite,Canvaspopup,true));
PopUpManager.centerPopUp(pop2);
// here i do some image stuff like use a loader for the
selected image
public function handleImageComplete(event:Event):void //when
the loader is complete i cum here
// do some image resizing and saving
PopUpManager.removePopUp(pop2);
pop2=null;
}

Similar Messages

  • Control position of popup dialog box

    Hi,
    Is there a better method of positioning a popup dialog below a string control? - see attached (run parent.vi)
    Can I obtain a Pane ref and a VI ref given a string control reference? so that I only need to pass the string ref
    thanks
    Al
    Solved!
    Go to Solution.
    Attachments:
    parent.vi ‏9 KB
    child.vi ‏16 KB

    If your VI has multiple panes (or just to be prepared), you can find, here  a VI that returns the pane of a control.
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • How do you use the Multiple Item Information dialog box ???

    How do you use the Multiple Item Information dialog box ???
    Where are the instructions on how the information in the Multiple Item Information dialog box equates to ...
    1. The way iTunes sorts tracks and albums
    2. The reason to select a leading check box
    3. Why there are Option selections (Yes /No) and leading check boxes.
    4. Why some changes remain in the track info, but do not "take effect" in iTunes (Part of a compilation is an example)
    Looked in Help, Support, went to the local Genius bar for an hour, even arrainged a call from apple support ...
    Thanks

    As Christopher says, it's a compilation. Different tracks are by different artists.
    Setting the *Album Artist* field to *Various Artists* and setting *Part of a compilation* to Yes should be all that is required. Depending on your *Group compilations when browsing* setting ( I recommend On ) either should suffice but I suggest doing both.
    Based on your commentary, I selected all the "O Brother" tracks, and checked the boxes for everything line that was blank in the Info and the Sort panes. Only exceptions were the album name and the disc number 1 of 1 and the artwork. I blanked and checked anything else.
    That's not what I meant. When you select multiple tracks, only those values which +are already common+ to all tracks are displayed. Typically these will include Artist, though not with compilation albums, Album Artist, Album, No. of Tracks, Genre plus various sort fields. A blank value may indicate that different tracks have different values or it may be that the value is blank for all tracks. For the drop down values on the Options tab the value shown may not reflect the information in every tag. If values you expect to be common, such as Album Artist or the Album title are not displayed you can simply type these in and click OK. This will often be enough to group the album.
    If you place a checkmark against the blank boxes and apply changes then you will clear those fields so you should only do this if that is the effect you want. Putting a checkmark next to an empty (representing different values) *Track No.* box, for example, will just clear the all the track numbers which is very rarely useful.
    Adding then removing extra text is for a specific problem where despite all common values being identical across the tracks of the album iTunes seems to "remember" that it should see two albums. A typical example would be when an album originally listed as *Album CD1* & *Album CD2* is given disc numbers X of Y and then has the Album name changed to Album. I've seen iTunes merge all but one track into the new album, but insist on listing one remaining track separately, despite both albums having the same title. In this case I've found overtyping the album title again has no effect whereas changing it to AlbumX and then back to Album does what I was trying to achieve in the first place.
    Don't forget that even properly organsied albums may still break up if you don't chose an album-friendly view. Sorting on the track name or track number columns can be useful in some circumstances but in general I revert to Album by Artist when browsing through my library.
    tt2

  • How to display a screen as Popup Dialog box in Module Pool

    Hi All,
    I have a requirement to display a popup dialoge box into module pool.
    i need to display a screen as a popup on the current screen on a button click.I have developed a screen and in atribute tab i have defined the screen type as modal dialog box but  it is displaying previous screen screen is hide i want to display on the same screen as a popup.
    Thanks
    Narendra

    Hi Narendra,
    Try to trigger the popup once it is done with the previous action might be anything.
    i have shown one sample code where after i click on save button when the data is saved successfully
    after that it has to trigger me a popup asking for conformation for the next action.
    A small piece of code
    INSERT INTO ZORMD1 VALUES WA_ZORMD1.
        IF SY-SUBRC = 0.
          G_LOCAL1 = 0.
          MESSAGE S000.  " Data saved successfully and immediately call the popup
    CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
            EXPORTING
      DEFAULTOPTION  = 'Y'
    TEXTLINE1 = 'SUCCESSFULLY SAVED'
              TITEL = 'POPUP FOR conformation'
             START_COLUMN         = 25
             START_ROW            = 10
            CANCEL_DISPLAY       = 'X'
           IMPORTING
    ANSWER  = G_PRINT
    IF G_PRINT = 'J'.
    PERFORM PRINT_OUT.
    ENDIF.
    Do the modification according to your requirement.
    Cheers!!
    VEnk@

  • OK button not visible in popup dialog box.

    Hi,
    There is some problem with the popup dialog boxes that I am using. Sometimes I can see the OK button while sometimes it is not visible.
    Any clue regarding this odd behaviour?
    Many Thanks,
    Anagha

    HI everybody,
    I am also having similar error now.
    IN the standard Dialog box, I am not able to get the button, despite of doing everything properly.
    Please find the code used:
    IWDControllerInfo conInfo= wdThis.wdGetAPI().getControllerInfo();
                                  IWDEventHandlerInfo evntInfo = conInfo.findInEventHandlers("Ok");
                                  IWDConfirmationDialog confDialog =wdComponentAPI.getWindowManager().createConfirmationWindow("Please Enter a search Criteria", evntInfo , "OK");
                                  confDialog.setTitle("Confirmation Window");
                                  confDialog.open();
    I  have created the eventhanler.
    I tried all possible ways but nothing has resolved the issue.
    The only difference is that I need to place this code in custom controller only.

  • Acquire data from a tab delimited file using a popup dialog object on a stamp

    I am trying to import data from a tab delimited file using a popup dialog object on a stamp.  I have purchased the book by Thom Parker--All About PDF Stamps in Acrobat and Paperless Workflows and have been working through the examples in the appendix.
    My problem is understanding how to bring the data into the dialog object from the file.
    I don't want to plagiarize his book--so am electing at this time not to show my code.  The  script is reading the file, just not bringing in the records from the file so that I can select which line to import into the stamp.
    I have typed in the code exactly how the book describes, but when the popup dialog object is selected, there is nothing in the drop-down.  When I click OK, the first record is put on the stamp--except for the fields that I am wanting to appear in the dialog object popup box.
    I have searched the forums, and also the JavaScript reference.  There are examples of the popup dialog object, but none of them show how to import the data from a file--just for the items to be typed in as the list.
    Any help would be greatly appreciated!  i have been trying to work on this for several months now.

    Karl
    Thank you for getting back with me!
    In answer to your questions:
    1. Your trusted function is not a trusted function. Did you put this
    function into a folder level script so that it will get executed at system
    startup?--
         yes--I saved the script as a .js file and put it in the following path (I have Acrobat XI Pro for Windows)
    C:\Documents and Settings\tjohnson\Application Data\Adobe\Acrobat\Privileged\11.0\JavaScripts\GetTabData.js
    2. The script cannot find your tab delimited data file, or it cannot
    extract the data. Did you add the data file in the correct location? The
    location from the script in the book would be c:\mydata\Contacts.txt
    Yes--the file is in the same path as the book.
    Below is my code that references the file.
    var cPath = "/c/mydata/Contacts.txt";
    the slashes in the book go in the direction of the text above--should they go in the direction that you have in your question?
    Also,  the name and email address need to be separated by one Tab character.
    They are. 
    3. The fields need to be named the same way as the columns in the data file (the two names are in the first line of the file).
    My headings are RevByFromTab and EmailFromTab--which match the names of the two fields on the stamp.
    So, check that you are not getting any errors in the JavaScript console
    (Ctrl-J or Cmd-J), and verify that the tab delimited file is in the correct
    location
    When I run in the java script console--and I just run the script on the stamp,
    it says
    TypeError: event.source is null
    17:Console:Exec
    undefined
    When I place the stamp on the page, the popup box is working, but when you click on the down arrow, there is nothing listed.  When I click OK, the RevByFromTab is populated by the first item in the file, but the EmailFromTab field says undefined.
    Thank you
    Message was edited by: tdjohnson7700

  • Hide RANGE option in Multiple Selection Popup window

    This is regarding Parameter option.
    In parameter variable,i declared NO INTERVALS option
    to get only multiple values.
    In multiple selection popup window.i want to select only multiple values not RANGE values. so i want to either disable or hide the f7 option.how to do this.
    (we have ranges option at Popup window
    when u click f7 or complex selection icon at bottom popup window.)
    do we have any option to hide this.
    Ambichan

    hi,
    look fm SELECT_OPTIONS_RESTRICT
    (here's a docu)
    regards Andreas

  • Best strategy for working with popup dialog/PanelWindow (refbook)?

    In JD 11g I want selecting the value from reference book (which returned from DB). This reference book must show in popup dialog.
    I create bounded task flow with page fragment in which place the query filter and table with values for selecting.
    1. I inserted task flow as region in DIALOG component and place command button "OK" and "Cancel" into DIALOG buttons facet.
    Problem - I cant gain access to binding value (which contain ID of selected row) from fragments page definition.
    I try set the "Data Control Scope" value of task flow to "shared", but this did not help.
    2. I place command button "OK" and "Cancel" into page fragment and inserted task flow as region in panelWindow component. Now I cant gain access to binding value from fragments page definition (of course). But I cant auto-close the panelWindow after pressing buttuns on page fragment.
    Please help to solve a problem!

    Thank you for help, Frank!
    I have many reference books (reftables), which contains much records each (two columns - ID, TITLE). Also I have several tables (main tables), which refer to these reference books (maintable.ID_REF1 -> REF1.ID). On page, where I edit record from one of the main tables, i cant use simple LOV combobox, coz many records from reftable. Also I cant use ADF LOV input / ADF CHOICE LIST coz in input fields shows the ID of ref row (i want - the "title" column, bun cant do it). So I have solved to use the modal dialog / panel window in which include the region with reftable (coz each reftable may use in many page with edit of main tables).

  • Avoid popup dialog in smartforms

    hi all,
    i'm facing a problem, i want to avoid popup dialog in smartforms.
    i have set structure SSFCTRLOP-no_dialog = 'X'. but it still show popup dialog. did i miss something?

    Hi,
    I had the same issue, no need to set device to PRINTER since the underlying function module will default that if blank.
    On debugging the SMARTFORM function module.
    It turns out that the parameter USER_SETTINGS defaults to 'X', which will display the printer dialog popup.
    Changing this setting (USER_SETTING) to ' ' (SPACE) when calling the generated SMARTFORM function module as below then stopped the pop up appearing.
    (The actual issue is that the destination specified was being overwritten with *, so it was looking to the users settings for a printer. Normally LOCAL PRINTER, changing the user_setting to ' ' keeps the printer specified and no need for the printer dialog popup)
    * Get function module name
       CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
         EXPORTING
           formname           = i_formname
         IMPORTING
           fm_name            = l_fm_name
         EXCEPTIONS
           no_form            = 1
           no_function_module = 2
           OTHERS             = 3.
       IF sy-subrc <> 0.
         CASE sy-subrc.
           WHEN 1.
             RAISE no_form.
           WHEN 2.
             RAISE no_function_module.
           WHEN OTHERS.
         ENDCASE.
       ENDIF.
      CALL FUNCTION l_fm_name
         EXPORTING
           control_parameters   = i_ctrl_params
           output_options       = i_output_opts
          user_settings        = ' '                                        <--- *** Set this to SPACE ***
           t_line_items         = it_trolley_items
         IMPORTING
           job_output_options   = l_job_output_options
         EXCEPTIONS
           formatting_error     = 1
           internal_error       = 2
           send_error           = 3
           user_canceled        = 4
           OTHERS               = 5.
    This fixed the issue in my case, every case is different.
    Hope this helps someone, even though this is posted long after the original question.
    Thanks
    Jodh Atwal

  • Close ADF Popup Dialog with html button in Inline Frame

    hi,
    I'm using jdev 11.1.1.2,
    I have a adf popup dialog which contains an Inline Frame(source is a jsp file).I want to close the dialog with a html submit button in the frame page. when the submit button is clicked, auto close the dialog.
    can anyone help in this.
    Thanks

    Try to close the popup from Javascript using a sciptlet similar to the following one:
    var popup = AdfPage.PAGE.findComponent('<yourPopupClientId>');
    if (popup.isPopupVisible()) {
      popup.hide();
    }where <tt><yourPopupClientId></tt> should be replaced with the popup's client ID. The client ID is composed of the popup's ID from the <af:popup> tag preceded with IDs of the eventual parent naming containers where the popup has been declared.
    For example, if the tag is <tt><af:popup id="myPopup"></tt>, then the clientId might be:
    <tt>  myPopup
      container1:myPopup
      container1:container2:myPopup</tt>
    ... and so on, depending on where you have defined the popup in your JSF page (i.e. within which naming containers), you should determine it first.

  • Why the validator can't display the error message on the popup dialog?

    I have input text with a validator and a custom ok button and a cancel button on the popup dialog.When I click the ok button,the validator will validator the input value on the input text,but it just close the popup dialog without display the message firstly.The point is it does validate the value but doesn't display the message.Can anybody help?

    It seems if I use the button which is associated with the dialog the validator works well,but if I use the custom button the error message doesn't display. the environment is 11g.
    the code of the page is :
    <af:form>
    <af:popup id="copyPopupDialog" contentDelivery="lazyUncached">
    <af:dialog title="validator" closeIconVisible="false" type="none">
    <af:inputText id="copyReportsetCode" styleClass="" label="code"
    value="11"
    validator="#{reportSetManagedBean.validatCode}"></af:inputText>
    <f:facet name="buttonBar">
    <af:panelGroupLayout layout="horizontal" halign="right">
    <af:commandButton text="ok"/>
    <af:commandButton text="cancel" immediate="true"/>
    </af:panelGroupLayout>
    </f:facet>
    </af:dialog>
    </af:popup>
    <af:commandButton text="commandButton 1">
    <af:showPopupBehavior popupId="copyPopupDialog"/>
    </af:commandButton>
    </af:form>
    the code of the managedbean is:
    package david;
    import javax.faces.component.UIComponent;
    import javax.faces.context.FacesContext;
    import javax.faces.validator.ValidatorException;
    import org.apache.commons.logging.Log;
    import org.apache.commons.logging.LogFactory;
    import java.util.regex.Pattern;
    import javax.faces.application.FacesMessage;
    import javax.faces.application.FacesMessage;
    import javax.faces.application.FacesMessage.Severity;
    public class ReportSetManagedBean {
    public ReportSetManagedBean() {
    public void validatCode(FacesContext facesContext, UIComponent uIComponent,
    Object object) {
    FacesMessage msg = new FacesMessage("eror");
    throw new ValidatorException(msg);
    }

  • Af:popup dialog width and height

    hi all,
    i want to know how to define popup dialog width and height.
    here is my code.
    <af:popup id="popup1" contentDelivery="lazyUncached"
    launcherVar="source" eventContext="launcher" >
    <af:dialog title="General Details - Standard Statement" type="none" id="AddInstDialog"
    inlineStyle="width:600px;height:400px">
    I do something like in above code.
    but it is not working.
    With Regards,
    WP

    add panelWindow
                          <af:popup id="popup5" contentDelivery="lazyUncached">
                            <af:panelWindow id="panelWindow5" title="Stop" modal="true" inlineStyle="width:369px;height:350px;">

  • How to make panel collection with auto width and height in popup dialog ?

    Hi,
    I have ony af:popup in that I have added af:dialog. And in this af:dialog I have added af:table which is surrounded by af:panelCollection.
    Means my popup structure is like as below
    af:popup
    af:dialog
    af:panelCollection
    af:table
    If I set resize="on" in af:dialog then I can able to resize my popup dialog but the panelCollection inside the af:dialog is not become auto adjusted.
    I am able to make panelCollection width auto adjusted by using AFStretchWidh style class but not able to adjust its height.
    Hope you can understand my problem and pls try to provide me its solution if you have already implemented this.
    Regards,
    DevD

    I believe you are using af:panelGroupLayout because there are some other components except af:panelCollection, so try this combination
    <af:popup id="p1">
      <af:dialog id="d2" resize="on" stretchChildren="first">
        <af:panelStretchLayout id="psl2">
          <f:facet name="bottom"/>
          <f:facet name="center">
            <af:panelCollection id="pc1">
              <f:facet name="menus"/>
              <f:facet name="toolbar"/>
              <f:facet name="statusbar"/>
              <af:table var="row" rowBandingInterval="0" id="t1">
                <af:column sortable="false" headerText="col1" id="c1">
                  <af:outputText value="#{row.col1}" id="ot5"/>
                </af:column>
                <af:column sortable="false" headerText="col2" id="c3">
                  <af:outputText value="#{row.col2}" id="ot4"/>
                </af:column>
                <af:column sortable="false" headerText="col3" id="c2">
                  <af:outputText value="#{row.col3}" id="ot3"/>
                </af:column>
                <af:column sortable="false" headerText="col4" id="c4">
                  <af:outputText value="#{row.col4}" id="ot2"/>
                </af:column>
                <af:column sortable="false" headerText="col5" id="c5">
                  <af:outputText value="#{row.col5}" id="ot1"/>
                </af:column>
              </af:table>
            </af:panelCollection>
          </f:facet>
        </af:panelStretchLayout>
      </af:dialog>
    </af:popup>Put only af:panelCollection in CENTER facet of af:panelStretchLayout and use other facets of af:panelStretchLayout for other components.

  • Create a confirmation popup dialog when submitting a form

    Hi all,
    I have a simple business : ask a question (yes/no) to a user when he is submitting a form.
    This form is an "ADF Form (11g)" and is displayed in a inline dialog. It is triggered for an EntityView when user clicks on an edit button of a table row.
    I've tried lot of different solutions but it never works.
    Let me tell you about these:
    Solution 1: Adding a showPopupBehavior
        <af:document id="d1">
          <af:messages id="m1"/>
          <af:form id="f1">
            <af:panelFormLayout id="pfl1">
              <af:inputDate value="#{bindings.Datedeb.inputValue}" label="From:" required="#{bindings.Datedeb.hints.mandatory}" shortDesc="#{bindings.Datedeb.hints.tooltip}" id="id2">
                <f:validator binding="#{bindings.Datedeb.validator}"/>
                <af:convertDateTime pattern="#{bindings.Datedeb.format}"/>
              </af:inputDate>
           <!-- ... -->
              <f:facet name="footer">
                <af:group id="g1">
                  <af:commandButton text="Submit" id="cb1">
                    <af:showPopupBehavior popupId="p1" />
                    <af:returnActionListener/>
                  </af:commandButton>
                  <af:popup id="p1">
                    <af:dialog id="d2" title="Assistance" type="yesNo" dialogListener="#{backingBeanScope.dialogBackingBean.mustClosePreviousAddress}">
                      <af:outputText value="Do you want to close the previous adress automatically ? " id="ot1"/>
                    </af:dialog>
                  </af:popup>
                </af:group>
              </f:facet>
            </af:panelFormLayout>
          </af:form>
        </af:document>The issue is that the +<af:returnActionListener/>+ is never triggered and the form do not close.
    Solution 2: Adding a showPopupBehavior and change the triggerType
        <af:document id="d1">
          <af:messages id="m1"/>
          <af:form id="f1">
            <af:panelFormLayout id="pfl1">
              <af:inputDate value="#{bindings.Datedeb.inputValue}" label="From:" required="#{bindings.Datedeb.hints.mandatory}" shortDesc="#{bindings.Datedeb.hints.tooltip}" id="id2">
                <f:validator binding="#{bindings.Datedeb.validator}"/>
                <af:convertDateTime pattern="#{bindings.Datedeb.format}"/>
              </af:inputDate>
           <!-- ... -->
              <f:facet name="footer">
                <af:group id="g1">
                  <af:commandButton text="Submit" id="cb1">
                    <af:showPopupBehavior popupId="p1" triggerType="click" />
                    <af:returnActionListener/>
                  </af:commandButton>
                  <af:popup id="p1">
                    <af:dialog id="d2" title="Assistance" type="yesNo" dialogListener="#{backingBeanScope.dialogBackingBean.mustClosePreviousAddress}">
                      <af:outputText value="Do you want to close the previous adress automatically ? " id="ot1"/>
                    </af:dialog>
                  </af:popup>
                </af:group>
              </f:facet>
            </af:panelFormLayout>
          </af:form>
        </af:document>By reading in your forum I find this solution to be able to initiate a popup and execute the commandButton action by adding the triggerType="click" on the showPopupBehavior.
    The issue then is that the dialog get closed without waiting for a user response on the popup dialog (yes/no)
    Solution 3: Adding aAdfFacesContext.getCurrentInstance().returnFromDialog(null, null); in my dialog listener
        <af:document id="d1">
          <af:messages id="m1"/>
          <af:form id="f1">
            <af:panelFormLayout id="pfl1">
              <af:inputDate value="#{bindings.Datedeb.inputValue}" label="From:" required="#{bindings.Datedeb.hints.mandatory}" shortDesc="#{bindings.Datedeb.hints.tooltip}" id="id2">
                <f:validator binding="#{bindings.Datedeb.validator}"/>
                <af:convertDateTime pattern="#{bindings.Datedeb.format}"/>
              </af:inputDate>
           <!-- ... -->
              <f:facet name="footer">
                <af:group id="g1">
                  <af:commandButton text="Submit" id="cb1">
                    <af:showPopupBehavior popupId="p1" triggerType="click" />
                  </af:commandButton>
                  <af:popup id="p1">
                    <af:dialog id="d2" title="Assistance" type="yesNo" dialogListener="#{backingBeanScope.dialogBackingBean.mustClosePreviousAddress}">
                      <af:outputText value="Do you want to close the previous adress automatically ? " id="ot1"/>
                    </af:dialog>
                  </af:popup>
                </af:group>
              </f:facet>
            </af:panelFormLayout>
          </af:form>
        </af:document>
      public void mustClosePreviousAddress(DialogEvent dialogEvent)
        //Business logic
        AdfFacesContext.getCurrentInstance().returnFromDialog(null, null);
      }It looks like it work and close the dialog when click on yes/no on the popup dialog but the value are not submitted and the data model do not change.
    Solution 4: Sendind an ActionEvent on the button when user has made his selection
        <af:document id="d1">
          <af:messages id="m1"/>
          <af:form id="f1">
            <af:panelFormLayout id="pfl1">
              <af:inputDate value="#{bindings.Datedeb.inputValue}" label="From:" required="#{bindings.Datedeb.hints.mandatory}" shortDesc="#{bindings.Datedeb.hints.tooltip}" id="id2">
                <f:validator binding="#{bindings.Datedeb.validator}"/>
                <af:convertDateTime pattern="#{bindings.Datedeb.format}"/>
              </af:inputDate>
           <!-- ... -->
              <f:facet name="footer">
                <af:group id="g1">
                  <af:commandButton text="Submit" id="cb1" binding="#{backingBeanScope.dialogBackingBean.cb1}">
                    <af:showPopupBehavior popupId="p1" />
                    <af:returnActionListener/>
                  </af:commandButton>
                  <af:popup id="p1">
                    <af:dialog id="d2" title="Assistance" type="yesNo" dialogListener="#{backingBeanScope.dialogBackingBean.mustClosePreviousAddress}">
                      <af:outputText value="Do you want to close the previous adress automatically ? " id="ot1"/>
                    </af:dialog>
                  </af:popup>
                </af:group>
              </f:facet>
            </af:panelFormLayout>
          </af:form>
        </af:document>
      public void mustClosePreviousAddress(DialogEvent dialogEvent)
        //Business logic
        cb1.queueEvent(new ActionEvent(cb1));
      }The same as foor the third solution, it looks like it work and close the dialog when click on yes/no on the popup dialog but the value are not submitted and the data model do not change.
    I've verified with an actionListener, the actionEvent received when the user click on the button is exactly the same as the one i've dispatched manually.
    Can you help me with a solution adressing this issue?
    Best regards,
    Alex

    Mmm something like this ?
        public void newDialogListener(DialogEvent dialogEvent) {
            if (dialogEvent.getOutcome().name().equals("ok")) {
                this.getBindings().getOperationBinding("Commit").execute();
                    // Do something
        }

  • Cancel / Reset links in popup dialog

    Hi, I'm new to ADF 11g (using Jdeveloper 11.1.1.4.0) so this is probably an easy question. I have a popup dialog (using <af:popup>, <af:dialog>), and in the dialog, I want to have Cancel and Reset links. I know that if I set the type attribute of <af:dialog> to "cancel", I could get a Cancel button for free. But I want to have a Cancel link instead of a button so I have the type attribute of <af:dialog> set to "none" to not show any of the default buttons. How could I best implement a Cancel link as a commandLink or goLink? The documentation for <af:dialog> at http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_dialog.html says this about the cancel button behavior and I just want to have the same for my Cancel link:
    The ESC key, "cancel" button and close icon queues a client dialog event with a "cancel" outcome. Dialog events with a "cancel" outcome will not be sent to the server.
    Also, I want to have a Reset link in my dialog that just resets the form fields in the dialog. How would this be done? I saw that there's a <af:resetButton> component available, but this renders as a button and again I want to have a Reset link instead of a button.
    Thanks.

    Ok, this worked for me:
    <af:resource type="javascript">
    function closePopup(actionEvent) {
    var eventSource = actionEvent.getSource();
    var popup = eventSource.findComponent("p1"); // p1 is the id of my popup
    popup.hide();
    actionEvent.cancel();
    </af:resource>
    <af:commandLink text="Cancel" id="cl1" partialSubmit="true">
    <af:clientListener type="click" method="closePopup"/>
    </af:commandLink>
    Interestingly, I found that if I did not have partialSubmit="true" on the commandLink, then the popup would disappear on its own. I did not even have to have a clientListener on the commandLink. I guess this is due to the following mentioned at http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_dialog.html
    Using partial submit custom buttons is recommended because by default, a popup will not restore visibility after a full postback. The immediate parent (af:popup) controls this behavior. If the parent popup's autoCancel property is enabled, full submit commands will cause the popup dialog to auto-dismiss. When the autoCancel property is disabled, full submit commands will restore visibility on postback. See the af:popup tag documentation for more information on controlling aspects of auto-dismissal.
    Does anyone know what the difference between using popup.hide() and popup.cancel() would be in the above javascript? They seem to have the same effect. Also, do I really need to have actionEvent.cancel() in the above javascript? I have seen that in some other examples, but not really sure if it's really necessary as having it there or not there doesn't seem to make a difference either.

Maybe you are looking for