Popup / Dialog positioning for a subapplication

We are loading sub applications into our parent application using separate ApplicationDomains but using the same Security Domain.
When we use an Alert, the alert is centered on the sub application, not the parent application.  Is there any way to get a Popup to center on the parent application instead?
We have a widgets style dashboard and some of the widgets are really small.  So, when they do a popup, it is often off the edge of the screen.
We copied this code from Alert.as to put in our dialog class, as it seemed like it was on the right track, but it always seems to go into the "else"
        if (!this._parentSprite)
                //Below for Flex 4 - also taken from Alert.as.            
            var sm:ISystemManager = ISystemManager(FlexGlobals.topLevelApplication.systemManager);
    // no types so no dependencies
    var mp:Object = sm.getImplementation("mx.managers.IMarshallPlanSystemManager");
    if (mp && mp.useSWFBridge()) {
                this._parentSprite = Sprite(sm.getSandboxRoot());
            else {
                this._parentSprite = Sprite(FlexGlobals.topLevelApplication);
We just want a way to use the parent application as the centering.  Thanks in advance for any help.
Irv

Also, when using getSandboxRoot(), we get the following error:
stack trace=TypeError: Error #1009: Cannot access a property or method of a null object reference.
[trace] at mx.accessibility::AccImpl$/http://www.adobe.com/2006/flex/mx/internal::getDefinition()[E:\dev\4.x\frameworks\projects \framework\src\mx\accessibility\AccImpl.as:248]
[trace] at mx.accessibility::UIComponentAccProps()[E:\dev\4.x\frameworks\projects\framework\src\mx\a ccessibility\UIComponentAccProps.as:120]
[trace] at mx.accessibility::UIComponentAccProps$/http://www.adobe.com/2006/flex/mx/internal::createAccessibilityImplementation()[E:\dev\4.x \frameworks\projects\framework\src\mx\accessibility\UIComponentAccProps.as:76]
[trace] at mx.core::UIComponent/initializeAccessibility()[E:\dev\4.x\frameworks\projects\framework\s rc\mx\core\UIComponent.as:7400]
[trace] at mx.core::UIComponent/initialize()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\UI Component.as:7355]
[trace] at mx.core::Container/initialize()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\Cont ainer.as:3129]
[trace] at mx.managers.systemClasses::ChildManager/childAdded()[E:\dev\4.x\frameworks\projects\frame work\src\mx\managers\systemClasses\ChildManager.as:189]
[trace] at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::rawChildren_addChildAt()[E:\dev\4.x\frameworks \projects\framework\src\mx\managers\SystemManager.as:1963]
[trace] at mx.managers::SystemManager/addChildAt()[E:\dev\4.x\frameworks\projects\framework\src\mx\m anagers\SystemManager.as:1595]
[trace] at mx.managers::SystemManager/addChild()[E:\dev\4.x\frameworks\projects\framework\src\mx\man agers\SystemManager.as:1578]
[trace] at mx.managers::PopUpManagerImpl/addPopUp()[C:\view\isalisbu_olr_ss2\png\apps\olr\ui\src\mai n\flex\mx\managers\PopUpManagerImpl.as:346]
[trace] at mx.managers::PopUpManager$/addPopUp()[E:\dev\4.x\frameworks\projects\framework\src\mx\man agers\PopUpManager.as:193]
[trace] at com.paychex.framework.controls::Dialog/show()[C:\view\isalisbu_olr_ss2\png\apps\olr\ui\sr c\main\flex\com\paychex\framework\controls\Dialog.as:75]
[trace] at com.paychex.framework.containers::ActionAreaDialog/show()[N:\Hudson\workspace\PNG_UIFrame work_v03_RC\hapnv022_PNG_UIFramework_v03_RC\soa_suite\png\framework\flex\ui-component\src\ com\paychex\framework\containers\ActionAreaDialog.as:61]
[trace] at Function/<anonymous>()[N:\Hudson\workspace\PNG_UIFramework_v03_RC\hapnv022_PNG_UIFramewor k_v03_RC\soa_suite\png\framework\flex\ui-bulb\src\com\paychex\framework\bulbs\DialogContro llerBulb.as:297]
[trace] at Function/http://adobe.com/AS3/2006/builtin::call()
[trace] at Function/<anonymous>()[N:\Hudson\workspace\PNG_UIFramework_v03_RC\hapnv022_PNG_UIFramewor k_v03_RC\soa_suite\png\framework\flex\ui-bulb\src\com\paychex\framework\bulbcore\DynamicBu lbHelper.as:61]
[trace] at Function/http://adobe.com/AS3/2006/builtin::call()
[trace] at Function/<anonymous>()[N:\Hudson\workspace\PNG_UIFramework_v03_RC\hapnv022_PNG_UIFramewor k_v03_RC\soa_suite\png\framework\flex\ui-bulb\src\com\paychex\framework\bulbcore\Juicer.as :975]
[trace] at Function/http://adobe.com/AS3/2006/builtin::call()
[trace] at WiringHelper/wiringLoadSuccess()[N:\Hudson\workspace\PNG_UIFramework_v03_RC\hapnv022_PNG_ UIFramework_v03_RC\soa_suite\png\framework\flex\ui-bulb\src\com\paychex\framework\bulbcore \WiringHelper.as:42]
[trace] at Function/http://adobe.com/AS3/2006/builtin::apply()
[trace] at com.paychex.framework.util::DelayedInvoker/timerHandler()[N:\Hudson\workspace\PNG_UIFrame work_v03_RC\hapnv022_PNG_UIFramework_v03_RC\soa_suite\png\framework\flex\ui-core\src\com\p aychex\framework\util\DelayedInvoker.as:46]
[trace] at flash.utils::Timer/_timerDispatch()
[trace]
In watching the code from alert, it never gets into the code that uses getSandboxRoot.  We are using the same security domain (trusted code) so we are not a sandboxed app, we are a mutli-versioned app (load for compatiblity / different application domain)
I'll work on a snippet of code that is easier to discuss that demonstrates the problem.

Similar Messages

  • 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).

  • Minimize and maximize icon for popup dialog

    How can i create a minimize and maximize icon for a popup dialog?By default close[x] icon is there.What should be done to have a minimize and maximize icons?

    You cannot do this (at least, there is no such one capability out of the box). But, you can play with panelWindow contentWidth/contentHeight at runtime, take look at: http://martindeh.blogspot.com/2011/03/dynamic-resizing-for-popup-dialogs.html

  • Set a popup Dialog to just below the caret position in TextField

    I have a JTextArea in which I wish to show up a popup dialog box whenever the user presses Ctrl and I want the popup to be visible just below the caret position where the user presses Ctrl. I'm using modelToView() but I'm not able to achieve the target.
    If anyone can help...

    You may find this usefull (if you have not already)
    http://www.java2s.com/Code/JavaAPI/javax.swing/JTextFieldmodelToViewintpos.htm
    If you have seen that and it still doesn't work we need an example to work with (as the above poster says) as you havn't even really explained what is going wrong!

  • Common popup dialog(but differnt model data) for entire application

    Hi
    i have use case like displaying the viewhistroy for the current page form data.
    so i need to implement common popup dialog which will show the current page data history in a pop up.
    can anyone suggest me how to implement? i am using the jdev11.1.1.3.0 version
    thanks,
    raj
    Edited by: Raj Gopal K on Mar 21, 2011 2:19 PM

    How about building a dynamic table to display the data. Probably a reusable 'task flow' which take some parameter to decide the query, and build the dynamic VO. This VO can be wired to the UI table - a couple of possibilities can be see here - http://jobinesh.blogspot.com/2010/06/model-driven-approach-for-building.html

  • 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 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@

  • How to handle the button "cancel" in a dialog box for displaying views?

    Hello!
    I ve a question about handling the cancel button in a dialog box for displaying views.
    I ve already implemented the dialog box by using the following code:
    METHOD eh_onnewqact.
      DATA stitle TYPE string.
      IF m_popup IS BOUND.
        stitle = cl_bsp_runtime=>get_otr_text( alias = 'ZCC_ICRM/NEW_TASK' )."cl_wd_utilities=>get_otr_text_by_alias( 'ZCC_ICRM/NEW_TASK' ).
        m_popup = comp_controller->window_manager->create_popup(
          iv_interface_view_name = 'ZCC_POPUP_NEWBT/NewQActWindow'
          iv_usage_name = 'CUNewQAct'
          iv_title = stitle
        CALL METHOD m_popup->set_on_close_event
          EXPORTING
            iv_view       = me
            iv_event_name = 'NEWQACT_POPUP_CLOSED'.
      ENDIF.
      m_popup->open( ).
    ENDMETHOD.
    My dialog box consists two buttons - cancel and create.
    The cancel buttons should close the popup and the create button should create an entity of a specified object. but let us come to the cancel button. I did´nt find any information about implementing an cancel button. So, how should I implement it? I thougt
    me->close( ). But that didnt works!
    Could u give me further information about that, because my cancel event-handler is empty?
    method EH_ONCANCEL_QACT.
    endmethod.
    After that I would know how my calling view could know that the user pushes the Create Button and how the data of 2 inputfields of the dialog box finds their way to the calling view in order to process this data there?
    Thank you very much!

    Hi Michael,
    thank you for your advice! This problem is solved...
    ...but I have another issue. Ive implemented 2 editable fields in my popup. The user should fill that fields with context and that context should be processed in the calling view of my popup.
    My question is how to transfer these information from my popup to my calling view or method?
    I tried the following...
          lv_context_node ?= m_popup->get_context_node( 'QUICKACT' ).
          IF lv_context_node IS NOT INITIAL.
            lv_text = lv_context_node->get_date( attribute_path = '' ).
          ENDIF.
    But it doesnt work! The context node object is always empty/initial.
    Thank you!
    PS: Another possibility could be that the object / node of the calling view is transferred to the pop-up in order to process it there.
    Edited by: Marcus Findeisen on Feb 22, 2011 12:13 PM

  • 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

  • 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.

  • 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.

  • Af:richTextEditor can not work fine in the popup dialog.

    Hi all:
    I want to use af:richTextEditor in a pop up dialog, but it can not be used correctly. The code is like below:
    <af:popup id="***">
    <af:dialog >
    <af:richTextEditor contentStyle="width:100%" value="this is a test" inlineStyle="width:100%" binding="#{backing_myBackingBean.richTextEditor1}"
    id="richTextEditor1"/>
    </af:dialog>
    <af:popup>
    The value "this is a test" can not be shown in the editor and I can not write/edit in this rich text editor.
    Anyone has some experience on using these components? Please help me.
    Thanks
    Hart

    Hi Frank,
    Below is my test code, the text editor does not work fine actually. Can you help me to find where I was wrong using this code OR is is a bug to use richtexteditor in popup dialog?
    <?xml version='1.0' encoding='GBK'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=GBK"/>
    <f:view>
    <af:document>
    <af:form>
    <af:outputText value="This is test page"/>
    <af:commandButton text="PopupRichTextEditor">
    <af:showPopupBehavior popupId="test">
    </af:showPopupBehavior>
    </af:commandButton>
    <af:popup id="test">
    <af:dialog modal="true">
    <af:richTextEditor value="this is for test">
    </af:richTextEditor>
    </af:dialog>
    </af:popup>
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>
    Thanks in advance.
    Hart
    Message was edited by:
    harth
    Message was edited by:
    harth

Maybe you are looking for

  • Questions about master-detail update and delete!!

    I have created a view object with two entity objects. These two entity objects map master-detail tables in DB. I want to update both tables when the user input, and delete the record in detail table (keeping master table unchanged) when the user clic

  • File DownLoad from R/3 to Local Disk through Web Dynpro

    Hi, I have a zebra print spool, to be saved in the local disk. For this, I have an RFC which will store the document in Portal Server KM folder and will give the file name for web dynpro app. The web dynpro app will search the KM Directory, and will

  • How to join a Domain Controller Server to an two-tier (SQL Server 2012) and Sharepoint 2013 (SP2013) farm

    Hi, I am trying to build a 3-tier SharePoint 2013 farm. 1. SQL Server 2012, Windows 2012 VM 2. DC Server, Windows 2012 VM 3. SharePoint 2013, Windows 2012 VM I didn't built the DC server. Someone else did. However, I created about 14 service domain u

  • Mapping executes fine but does not produce any output

    I created a mapping to copy values from one table to another for a particular condition. I have data for thsi particular condition in the input table. The Mapping validated fine and was deployed successfully. The OWB Mapping is run from Unix. The map

  • Link not recognizing legacy backup files

    I'm trying to restore some of my 9900 data into my new Q10 but link will not recognize the 9900 backups. I've tried this originally on my Mac to no avail. So I transfered over the 9900 backups to a PC and the Windows Blackberry Link won't recognize i