Embedding Regions Inside PopUp Windows

<b>Problem Description</b>
Regions can be incorporated into ADF Faces popup content to support potentially complex navigation through a series of pages to complete a task. Another important benefit of including regions within ADF Faces popups is content reuse. These great benefits make ADF Faces popups containing regions a commonly used application development pattern. Incorporating regions into <af:popup> content can seem similar to incorporating regions into a page, especially since an <af:popup> is actually considered part of a page. However, there are some important differences to keep in mind. When incorporating regions into <af:popup> content, the following default development constraints must be taken into consideration:
<ul>
<li>Content within the <af:popup> component is created and executed when its corresponding page is initially displayed. It’s not automatically refreshed when a <af:popup> is disclosed.</li>
<li>When disclosing an <af:popup> subsequent times from the same page, region content isn’t automatically refreshed and restarted from the beginning.</li>
<li>An <af:popup> is not automatically dismissed when its region content completes via navigation flow. Likewise, when an <af:popup> is dismissed, its corresponding region content is not automatically considered “complete”. Therefore, resources used by the corresponding task flow (e.g., memory, DB transactions) are not released.</li>
<li>Region components activate when their <af:region> UI component is invoked (i.e., component tree built), not when the component tree is rendered. Most JSF UI components build their component tree and wait until rendering to activate. The <af:region> UI component is different since it must first resolve its task flow’s target view to include the corresponding page fragment.</li>
</ul>
Many of these default development constraints are the result of <af:popup> behavior being mainly client-side only. When a user discloses an <af:popup>, JavaScript on the client unhides the <af:popup> created previously when the page was initially displayed. When the <af:popup> is dismissed, JavaScipt on the client simply hides the <af:popup> again. In both cases, no event or request is sent to the server to refresh the region content or retrieve data based on the current application state. If the <af:popup> is displayed a second time, it simply redisplays the <af:popup> content remaining from the previous disclosure.
<br>
<b>Technical Pattern Description</b>
This document describes the recommended development approach for the “ADF Faces Popup + Region” pattern. Other development approaches may be possible to achieve the same desired use case behavior. The development approach described in detail within this document is considered the most comprehensive and least complex approach.
For releases <b>prior to</b> JDeveloper Studio Edition Version 11.1.1.2.0
Click here to see the pattern described in this document.
See the below blog entry for an overview of how this pattern is addressed in the JDeveloper Studio Edition Version 11.1.1.2.0 release as an ADF feature.
http://blogs.oracle.com/DavidGiammona/2009/09/task_flow_call_activity_run_as.html
Edited by: Richard Wright on Nov 17, 2009 5:28 PM
Edited by: Richard Wright on Dec 10, 2009 8:32 AM
Edited by: Richard Wright on May 13, 2010 1:04 PM

Hi,
I am wondering, if there a way to, while staying on the same popup (so, _without clossing popup), to refresh and restart region content from beginning ? For example, when user presses button on the popup, what I want, is :
1. stay on the same popup
2. release resources used by the corresponding task flow
3. refresh and restart dynamic region content (thus calling default task flow activity from the same task flow).
4. new content (depending on the default t.flow activity) should be displayed on the popup.
This can be used in the following use-case : Imagine that user inserts new record on the popup. Default activity is the CreateInsertRow.
When user press the 'Save and Create New' button, the data should be commited to the database, resources used by t.flow should be released, and default activity should be called again.
Thanks in advance,...
Richard Wright wrote:
<b>Problem Description</b>
> Regions can be incorporated into ADF Faces popup content to support potentially complex navigation through a series of pages to complete a task. Another important benefit of including regions within ADF Faces popups is content reuse. These great benefits make ADF Faces popups containing regions a commonly used application development pattern. Incorporating regions into <af:popup> content can seem similar to incorporating regions into a page, especially since an <af:popup> is actually considered part of a page. However, there are some important differences to keep in mind. When incorporating regions into <af:popup> content, the following default development constraints must be taken into consideration:(...)
>
For releases <b>prior to</b> JDeveloper Studio Edition Version 11.1.1.2.0
Click here to see the pattern described in this document.

Similar Messages

  • Embeding Regions inside Popup Windows-Pattern

    Hi folks,
    i'm trying to build a prototype using the "Embeding Regions inside Popup Windows"-Pattern.
    I've got one emp-VO on a jspx page and a popup displaying the same VO as read-only table in a region created from a fragment.
    The popup should be used to choose a employee that could be edited on the underlying formular.
    The problem:
    When the popup opens only the header of the table and the text "Daten werden übertragen" (Fetching data) is displayed.
    But data is never displayed.
    Does somebody know what's going on?
    Thanks!

    Hi,
    if you use a dynamic region for this, make sure the managed bean that switches between the empty task Flow id and the Task Flow to show is neither in backingBeanScope, nor in request scope. It should be at least in viewScope.
    Frank

  • Scrollbar inside Popup Window

    Hi Experts,
    I have created a popup window with a table inside that. Data is getting populated from BAPI into this table.
    Please tell me the procedure for creating a scrollbar inside the table.
    Thanks.

    Hi
    No need to  create scrollbar inside the table fro popup or any element It will introduce whenever it required.
    Just set the number of rows for table 5 ,10  etc Once data from BAPI/RFC will more than this number scroller
    will comes automatically.
    Best Regards
    Satish Kumar

  • Table never gets populated inside popup window on customer's site

    I'm working on application in ADF (ADF BC, ADF Faces) with JDeveloper 11.1.1.4 (application deployed on customer's site in Weblogic Server 10.3.6)
    and in one page I'm having a button behind which is a code to execute a query against a table whose data is going to be shown in popup window.
    Query limits the number of records to be shown to 100 (in query: rownum <= 100).
    In my development environment this works fine, but there is a problem on customer's site.
    For the query to execute it takes about 20 seconds at the site of customer. After that in backing bean there is a code to show popup.
    In the page - popup starts showing (it means that query ended) but never fetching data in the table (all the time there is a message - "Fetching data" like framework is retrieving it but nothing happens).
    I have tested a query in SQL*plus - it returns data.
    I couldn't find out what is the reason for such behaviour.
    Do you have any suggestions what to try?
    Thanks,
    Nebojsa

    I've found the reason for not populating table in popup.
    Although there is a limitation to the number of rows displayed in table in the form of additional where clause: "rownum <=n" this part of where clause is added to the VO in overridden method: executeQueryForCollection.
    Before executing this method framework is executing: getEstimatedRowCount which when executed for the first time through method getQueryHitCount executes a query against the database (select count(1) from... without my rowum <=n which is added to the query afterwards in above mentioned method executeQueryForCollection).
    My question is: if I don't want to add rownum <= n at design-time, where it would be the best place to add it to the query so to avoid above described situation and to have that rownum <= n in place for the count query as well?
    Nebojsa

  • Need to dynamically include an image file when calling a popup window

    I am working on a web dynpro Java app which uses a button to call a popup window/view. Within the popup, I want to dynamically choose an image to show (from mime types) based on a criteria...there will be multiple buttons on the initial view that all call the same popup, but the popup will have content specific to which button called it (specifically the image embedded in the view).
    My question is, what is the proper/best way to do this?
    Here are some possible ways I can think of...
    1. Pass a parameter from each button during the call of the event, but how does that get sent to the implementation of the second view for use in determining which image? And, how do I modify the source property of the image element based on that parameter?
    2. Create multiple pages and views for each button to call...but this seems decidedly un-DRY.
    3. Saw one posting on how to dynamically create a cached image...I could use different event handlers in the initial view, then load individual images from the mime library at that point...cache it into a hard-coded image name...then just call the identical view every time. Not sure this is even possible...input?
    I don't know specifically how to implement any of these options, or know if there are other/better ways. Any help would be appreciated.

    Just create a context attribute "imageFileName" in the component controller or a custom controller, map this attribute from both views (the one that contains the buttons and the one in the popup window that displays the image).
    Now you can have an separate action for each button or one common action. In the first case just set the "imageFileName" inside the action handler for the specific button. In the second case use an action parameter "buttonId" and a parameter mapping
    button.mappingOfOnAction().setParameter("buttonId", button.getId());
    to determine which button triggered the action. After having checked which button was pressed, set the "imageFileName" accordingly.
    Armin

  • Redirecting popup windows to embed window

    I'm working on embedding javafx inside 3d engine. I'm using EmbeddedWindow/HostInterface route used by JFXPanel and it works perfectly for most of the cases. Unfortunately, popup windows (right click, top menu, choice box etc) are giving some trouble in full screen mode - they are popping up as new top-level windows instead of being painted on existing scene.
    This works in windowed mode - they pop up on top of render window and things work properly. But in full screen mode, I will need to catch them somehow.
    I don't suppose there is an easy way to display all popups in-scene... but is there any way to catch popups being displayed and manually render/redirect needed events? It doesn't have to be very efficient, as popup windows are not very common.

    thanks.. i had those PDFs docs mentioned in the notes, but never could pinpoint how to change to inplace navigation..
    note 1405902 clearly states how to do this in the Solution section
    Solution
    See attached document.
    For configuring inplace navigation:
    1. Inplace navigation is supported by the launchpad framework.
    2. From the application, whenever an OIF is launched from the workcenter, any navigational step from this OIF can be configured as inplace navigation or new window.
    3. To configure this as inplace navigation, go to launchpad (transaction lpd_cust). Choose any entry and go the details in edit mode. Click on Show Advanced Parameters. Change the parameter Navigation Mode to Inplace Navigation.

  • Custom pushbutton in ME21N should display a popup window with item details

    Hello,,
    The requirement is to
    1. Add a custom pushbutton in ME21N screen at header level.
    2. The user will select some PO line items and will click on this push button.
        This inturn should trigger a popup window with item details only for those selected PO line items along with schedule line qty.
    I have created the custom push button in a custom tab using the BADI ME_GUI_PO_CUST.
    Now I am not able to retrieve item details and schedule line details inside the PAI of the custom tab..
    i.e., when i click on the custom push button, I am not able to retrive the item data and schedule line data.
    Please help me to retrive PO line item data and schedule line data.
    Regards,
    Sharah

    JSF is not so relevant in this question. It's all about how the generated client side code look like. Which is usually a bunch of HTML/CSS/JS (open page in browser, rightclick and view source). If you know HTML, you should know that using target="_blank" in a <form> or <a> element would open a new window. If you know JS, you should know that using window.open() would open a new window.
    Apply this so in the JSF source code so that the generated HTML/JS output is exactly what you want.

  • Creating a PDF report within a popup window

    bq. Hi, \\ Within my application i've a page which uses JasperReports to generate a simple PDF report within prerender(): \\ public void prerender() { \\ try { \\ this.planned_bar_tripsDataProvider1.refresh(); \\ if (this.planned_bar_tripsDataProvider1.cursorFirst()) { \\ getApplicationBean1().*jasperReport* \\ ("PlannedBarTripsReport", "application/pdf", \\ getSessionBean1().getPlanned_bar_tripsRowSet1(), null); \\ } \\ } catch (Exception ex) { \\ log("Exception generating report", ex);} \\ } \\ jasperReport() is taken from the Sun PDF tutorial (http://developers.sun.com/jscreator/learning/tutorials/2/reports.html) \\ Now, when this page is opened within the application (browser) window the PDF report successfully renders. \\ However, when the page is opened within a popup window, using the (onclick) Javascript function: \\ function generateReport() { \\ window.open('PlannedBarTripsReport.jsp') ; \\ window.event.returnValue = false; \\ } \\ the PDF report fails to render. The result is a brief pause followed by a blank popup. No exception. No Abobe embedded window. No clues as to what's gone wrong. \\ Any advice would be greatly appreciated. \\ Ta.

    Hi Venkatv and everyone.
    This is the link where I found about Including Dynamic Images in a Report.
    http://www.oracle.com/technetwork/testcontent/apexprnt2-otn-098981.html
    It's so easy and clear to do.
    Good Luck!!!
    Regards.
    Ayrem

  • Not able to display the desired view if button is pressed in POPup window

    Hi Experts,
    I have developed a web dynpro application.In this i have created a pop up window which consists of three buttons YES , NO and CANCEL.
    I have developed three event handlers in the view VIEW_POPUP which is acting as view of the pop_up window.  When i click on any of these buttons no event handler is getting triggered.
    Please give your suggestion as where the problem is.

    Hi Ravi,
    I think u created a  view and embedded it in another window and calling that window.,
    If u want to display a popup window with action buttons., jus use create_popup_to_confirm() method.
    refer this code,.
    * Data declarations for Pop up window
      data: lt_text type string_table,
            lo_window_manager type ref to if_wd_window_manager,
            lo_api_component type ref to if_wd_component,
            lo_window type ref to if_wd_window,       
            l_api type ref to if_wd_view_controller.
       msgtext = 'Do u want to continue. ?'
        append msgtext to lt_text.
          clear: tmp_from , tmp_to .
          l_api = wd_this->wd_get_api( ).
          lo_api_component = wd_comp_controller->wd_get_api( ) .
          lo_window_manager  = lo_api_component->get_window_manager( ).
          lo_window1 =
          lo_window_manager->create_popup_to_confirm(
                 text = lt_text
                 button_kind = if_wd_window=>co_buttons_okcancel
                 message_type = if_wd_window=>co_msg_type_information   " this is info msg u can give error message here
                 close_button = 'X'
                 window_title = 'Confirmation message box'
    *       lo_window->subscribe_to_button_event
          lo_window1->subscribe_to_button_event(
            button = if_wd_window=>co_button_ok
            action_name = 'SUBMIT_REQUEST'                     " Submitting Request. " u have to create SUBMIT_REQUEST Action
            button_text = 'Yes'                                             " And Place the code in that action which u want to execute when yes
            action_view = l_api
            is_default_button = abap_false
    *       lo_window->subscribe_to_button_event
          lo_window1->subscribe_to_button_event(
            button = if_wd_window=>co_button_cancel
            action_name = 'CANCEL_REQUEST'                     " Calling Action On clicking NO. "u have to create CANCEL_REQUEST
            button_text = 'NO'                                              "Action
            action_view = l_api
            is_default_button = abap_true
          lo_window1->open( ).
    reply if u need some more clarifications.,
    Thanks & Regards
    Kiran

  • Firing a view based on a selection from a popup window

    Hi,
    I have a main window in which there is "Display Details" button and a view container to hold a view. On clicking this display button I'm showing a pop-up window which will show the user the options to select a particular view. After the selection and clicking on OK in the pop up window the corresponding view should be shown the view container.
    I tried this by firing an outboung plug to the corresponding view based on the selection in the popup window. The problem is I cannot create a navigation link in the window as the popup view is not part of the main window.
    Could you please provide me your insights on how to handle this scenario?
    Regards,
    Vivek

    Hi Vivek,
    Please refer this article: [Creating Navigations and Embedding Views at Runtime - Web Dynpro ABAP|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/50f3660d-ad29-2b10-2482-8120e56942dd?QuickLink=index&overridelayout=true]. Also refer [Thomas' reply in this thread|Embed a view dynamically in a ViewContainerUIElement;.
    Regards

  • How do I get a popup window to stay open with a validation failure?

    Environment:
    APEX 3.1.1.00.09 on AIX 5.3
    Oracle 10.2.0.2 EE on AIX 5.3
    Sample app on apex.oracle.com:
    Workspace: galway
    User: gwicke
    Pass: gwicke
    Steps:
    1- run Page 3
    2- select J & B Marketing from drop down
    3- select only contract from drop down
    4- click on Edit Existing Contract
    5- click on Add New Builder
    6- Enter the same builder from calling page: Builder Name: Alvarez Construction City: Baton Rouge State: LA
    7- click Add Builder
    The original version of this page would add the new builder to the database, pass the information back to the calling page and close the popup window. Cool.
    I have added a validation on the popup page (Page 4) to check for an existing builder with the same name and city.
    What I'd like to have happen is the popup window stay open so the user can see the error message with the instructions for them to click on the CANCEL button and then select the builder from the drop down list. When they click the CANCEL button I need to have the window close.
    What is happening is the window is closing as soon as the Add Builder button is clicked.
    This is because there is a region called 'scripts' that contains javascript to submit the page and close the window and the condition on the region is only that the Builder Name is not null. So, the good news is that I understand why the window is closing but I'm not sure the best way to keep it open when the error condition happens.
    Thanks very much for your help. I'm sure you recall everything about this app you helped me with many months ago. NOT!! :-)
    -gary

    Gary, I think I've got it working the way you want.
    1. I added a conditional branch to page 4 which fires on the not exists builder condition condition.
    2. I disabled the reset page process. With that running, the conditional branch to page 4 woul always fire because the builder name and city were always cleared by the time the branch executed.
    3. I noticed that the new builder did not show up in your select list until I refreshed page 2. I haven't had a chance to look at that. Maybe a branch back to page 2 from page 4 after successfully loading a new builder will take care of that.
    Bob

  • Dynamic Action on "Get Focus" After Closing a Popup Window

    Hi,
    From one of APEX Application Pages I am calling a Popup Window where users can create a new record. In the Popup Window once the record is created and window is closed, I want to refresh the region on the main page to show the record created in the popup window.
    How do I create a dynamic action which will fire when the main APEX window gets the focus (after the popup window is closed). ?
    Any pointers will be greatly appreciated.
    Thanks & Regards,
    Ashish Agarwal
    http://www.asagarwal.com

    Assuming that you have a dynamic action in the parent page which refreshes the region
    <li> Make a note of the event which triggers your dynamic action, lets call this event A.
    <li> Create a JS function in parent page which triggers event A when called.
    For example if your Dynamic Action trigger is a button(id ="P100_REFRESH") press event
    Your JS function could be
    function Trigger_refreshRegion()
      $('#P100_REFRESH').click();
    The way in which you simulate the Dynamic action deoends on the firing event that you have used, so modify it appropriately.
    <li>Now in the pop up page, if you are closing the page in JS using smthing like window.close() or so,
    just call the parent page's refresh JS function there using the
      opener.Trigger_refreshRegion(); //whatever was the name of the function that you created.

  • Deadlock between "Save as" dialog box and another popup window in Firefox

    I have only seen this problem with recent versions of Firefox on Mac OS X, and I have run into it several times in the last few months (I am using Firefox 9), where Firefox seems to get into a dead-lock, and I can't find anyway round this except killing and restarting Firefox.
    The dead-lock happens when I am in the "Save as" dialog box -- i.e. the popup when I try to save something. If I get a pop-up window warning me that the script on some webpage is unresponsive, this leads to a dead-lock. The reason is this popup expects a response from me -- to stop or let the script continue, but it is unable to accept my response, I assume because the "Save As" dialog box has the focus, but I am unable to continue with the "Save As" dialog (I simply get a beep if I press the save or cancel buttons), presumably because of the "unresponsive" popup is expecting my response.
    I don't know if the "unresponsive script" popup happens because I am taking too long with the "Save As" dialog, or if it is prompted by the script from another page (I have many tabs opened)
    Is there anyway to get around this without killing the Firefox process? Also, can this problem be fixed so that the dead-lock does not occur?

    As I said, the problem is not because Firefox is hanging, or because I cannot save my files. It is happening because the "unrespnsive script" popup is allowed to occur while I am in the "Save As" dialog -- i.e. I have chosen to save something, e.g. a web page, and this prompt the "Save As" dialog, i.e. where I specify the file name and where to save to -- this is working fine.
    However, when you are in the "Save As" dialog, the "Save As" window is the only window of Firefox that you can interact with. However, if the "unresponsive script" popup window happens to pop-up when you are inside the "Save As" dialog (which does not occur very often, and I have not encounter it except on recent versions of Firefox o the Mac; I have used Firefox on Windows and Linux for many years), then you get into this dead-lock, because you cannot answer the "unresponsive script" pop-up (i.e to continue or terminate the script), as you cannot interact with the new pop-up window, but at the same time, you cannot continue with the "Save As" dialog -- you can interact with the "Save As" window (i.e. press buttons etc.), but the actions are ignored.
    To be clear, what I suspect I am seeing is a bug in the User interface code for the Mac version of Firefox.
    I have noticed yesterday that I got an "unresponsive script" pop-up on the Windows version of Firefox immediately after I have finished my "Save As" dialog. I have no way of being certain (unless I look at the code), but my guess is that the "unresponsive script" pop-up was delayed until after I finished the "Save As" dialog on the Windows version, i.e. option 3 in my previous post, but this does not seem to happen on the Mac version.

  • Refresh only page item while submitting data from the popup window

    Hi All,
    I'm pretty new to Apex .....
    I have a form with text items as first few entries and then a radio button list and few text items again. On selecting certain radio button I have a popup window which acts as an interface for the next text item in the calling page. The purpose of having the popup window is that the text item following the radio button takes the input with certain character delimiters along with the data. Instead of using delimiters while entering the data I want a meaningful data to be keyed in the popup window and all the string operation to be done as a background process. I have been successful this far. I'm using the below javascript on click of the submit button.
    javascript:doSubmit();
    window.opener.doSubmit('REFRESH');
    window.close();
    On doing this I'm losing the values submitted for the items prior to the radio button(including radio button). Please note, I have a dynamic action set on page load to reset the values. Is it possible to refresh just the page item from the popup window.
    Also, I tried excluding the window.opener.doSubmit('REFRESH'); from the above javascript. It sets the item with the expected value (viewed it in the session items, however I would like to view the concatenated string on my calling page) but following this there is an insert operation which uses all the necessary items in the form. All values except the value returned from the popup window is populated into the table. Am I missing something.
    Any help in this regard is appreciated.
    Thank you!!!
    Regards,
    Ganesh

    Value set using Javascript is only in your browser page but is not yet available in the session. This is why the report doesn't return the expected output.
    Before refreshing the report you would need to set the session state of this item.
    You can set it after you assign the item a new value or before the report is refreshed
    For Interactive Reports, this is available built in
    you can go to Report Attributes >Advanced Attributes -> Page Items to Submit and specify P2_X1 for the field(and any other page item that the report is dependent on)
    For standard reports, you can create a Dynamic Action that is triggered "before refresh" of the report's region, and choose PLSQL as the action types, give a dummy BEGIN NULL END; for the code and specify this item name in the page item to submit field so that it sets the items's value in session.

  • Popup window  opens in the second page  - plz help gurus.

    Hi All,
    I'm calling a transaction through ITS. There is a hyperlink in a report brings up PDF in the popup window. Popup window comes up in the second page of the report after closing in the first page of the report. Popup comes in all the consecutive pages of the report once I click on the hyperlink. This is really frustrating. Pls let me know if i need to do any configuration to avoid this problem. 
    Thanks,
    Kumari

    Hello Kumari,
    are you using the SAP GUI for HTML (webgui)? Normally, no hyperlinks are used except on documents inside an HTMLviewer (like in TX TRIP), or when Drag & Relate is activated.
    I suppose the link is part of a document that is shown in an HTMLviewer. Though this document does not belong to the ITS or the SAP GUI for HTML it uses ITS's URLs to address a new page or document. But, with this URL the status of the ITS or the application does not change, thus showing the popup over and over.
    If you have a tool to trace the HTTP protocol you can check for the URLs that are send on a particular action. I
    Best regards,
      TJ

Maybe you are looking for