Open popup on loading of the page, but with conditions

Hello.

I use JDeveloper 11.1.1.7.0

I need to open a popup on the page load. This problem is recurring, and there are a few messages and discussions in the forum about this. But I need to go further on this subject.

My case is:

  • Loading of the page, I have to check some conditions.
  • If it's true, popup is open.
    • Popup is YesNo type, and I have a dialogListener to treat the user's response. Finally, the page is loaded.
  • If false, the popup is not open.

To do this, I use beforePhase like that

<f:view beforePhase="#{myBeforePhaseMethod}" />

Inside the method, I use PopupUtil.invokePopup (...)


Well, my problem is that when the user answers Yes or No, Treaty dialoglistener the answer, page reload, beforePhase is re-run and popup is displayed again.

How can I solve this? How to display the pop-up window only once?

Thank you. Best regards

This ingenious solution has worked.

First of all, check phaseId in the beforePhase method. Check the phase is MADE

if (!phaseEvent.getPhaseId().equals(PhaseId.RENDER_RESPONSE))
return;

Then, use a flag to avoid the popup shows more than once, like that

String popUpShown = (String)ADFUtils.getPageFlowScopeValue("POPUP_SHOWN");
          if (popUpShown == null)
            popUpShown = "NO";
          if (popUpShown.equals("NO")) {
            ADFUtils.setPageFlowScopeValue("POPUP_SHOWN", "YES");
            PopupUtil.invokePopup( ... );
          }

Any other suggestions or problems it may have are appreciated.

Tags: Java

Similar Questions

  • How to set ' hide / show ' regions during the loading of the Page mode 'hide '.

    How to 'Hide' under regions on a page on the loading of the page, but don't show the region above in mode 'show' on a page?

    I have multiple regions, one under the other on a Page. All models on those who are assigned to the regions 'Hide and Show '. When the initial page loading - my goal is-displays only the Top more Region in "Show" mode, while setting all the other (regions to 'Hide' in low mode).

    Can someone please suggest ideas on how to achieve this? Dynamic action? or other approaches? Examples/steps please would be greatly appreciated.

    My request for a theme is set to 23 Crimson. Apex 4.1.x

    Thank you.

    VSKumar

    Hello

    What needs to be done is:
    Set up the STATIC ID for all regions with the exception of the first region.

    For example:
    REGIONTWO
    REGIONTHREE
    REGIONFOUR
    REGION 5

    Then go to the properties of the Page to the section head and footer. In the footer section, add the following:

    
    

    You can for example see http://apex.oracle.com/pls/apex/f?p=60428:5

    P.S. If you switch to another topic you should check if the classes are the same. Otherwise it will not work.

    Kind regards
    Aljaz

    Published by: Aljaz on 6.3.2012 0:04

  • Error opening the page of modal (plugin skillbuilder) during the loading of the page

    Hi all

    I use 4.2.1. (on 11 GR 2), theme 25.
    SkillBuilder Modal plugin v2 page

    Modal pages are working on all sorts of events, great, but if I try to open the other via a D.A. on loading the page, it fails with ' Eception TypeError: loading of the object has no method 'stopImmediatePropagation""error (in the browser console). "
    < edit >
    just found out that this error is caused by the "cancel event' DA action that should be fired after the modal dialog box open. If I omit this event Cancel modal page is not loaded, but also no error appears.
    < / Change >

    Any ideas on how to solve this problem? In the end, I just want to open a modal window after loading the page depending on the value of an item set when loading the page (the branch sets an element value to indicate that the modal window must be open).


    Concerning
    Bottom

    Published by: bottom of Klerk on 2013-apr-11 07:43

    Bottom,

    The modal shows do not charge is actually quite simple. Look at the generated code for the dynamic action and note in particular the code "javascriptFunction":

    {"name":"modal on load","bindEventType":"ready",actionList:[{"eventResult":true,"executeOnPageInit":false,"stopExecutionOnError":true,javascriptFunction:function(){
       if (this.browserEvent !== 'load'){
          apex.jQuery(document).apex_modal_page('openPageFromApexThis', this);
       }
    },"attribute02":"STATIC","attribute03":"f?p=54687:38:115741808752478:::38:::","attribute05":"data-url","attribute06":"div#success-message","attribute07":"AUTO","action":"PLUGIN_COM_SKILLBUILDERS_MODAL_PAGE"}]}];
    

    You can see that there is an explicit for the browserEvent criterion, and it must be different from "load."

    Of course, when you create a dynamic action with type "Page load", the browserevent will be "load", so no popup and no errors. Running a page in debug and research in the javascript console, you can also click through events fired, for example, I have this in the console:

    Dynamic Action Fired: modal on load (PLUGIN_COM_SKILLBUILDERS_MODAL_PAGE) Object { triggeringElement=document, affectedElements=[1], action={...}, more...}
    

    Firebug allows me to click on the object and display its properties. One of them is the "browserEvent" and set to "load".
    This prevents also the modal open when you actually set the real action of pull on the loading of the page.

    I tested a bit after commenting on prevention onload, and while I'm sure there are reasons why it was built in like that, I have immediate problems. The modal open during loading and anything funky happens, not even when you navigate around in the iframe.
    This does not however only if you want the modal to react on the loading of the page that your only option is to change the the plugin plsql code. I would say: test it enough!

    Go to the plugin, change it. Under Source > Code PLSQL find this:

       l_result.javascript_function :=
          'function(){' || l_crlf ||
          '   if (this.browserEvent !== ''load''){' || l_crlf ||
          '      apex.jQuery(document).apex_modal_page(''openPageFromApexThis'', this);' || l_crlf ||
          '   }' || l_crlf ||
          '}';
    

    and change it to this:

       l_result.javascript_function :=
          'function(){' || l_crlf ||
          --'   if (this.browserEvent !== ''load''){' || l_crlf ||
          '      apex.jQuery(document).apex_modal_page(''openPageFromApexThis'', this);' || l_crlf ||
          --'   }' || l_crlf ||
          '}';
    

    As you can see, I only commented those 2 lines, but it should allow the modal to open the loading of the page. I hope this helps you forward a bit.

  • Whenever I click on any button of the trial download on the adobe Web site you I get redirected to a page where the 4 squares are moving to load the page, but never load it, I left my browser on for hours and yet it still doesn't work anyone can help?

    Whenever I click on any button of the trial download on the adobe Web site you I get redirected to a page where the 4 squares are moving to load the page, but never load it, I left my browser on for hours and yet it still doesn't work anyone can help?

    clear your adobe.com cookies or use a different browser.

  • Problem with the Accordion widget open flashing and closed when the loading of the page

    Why do my flashes of accordion, widget open and close during the loading of the page (see http://vincentballmusewebsite2013test.businesscatalyst.com/digital-illustration.html#.UVDr Ehx7JyII) tried everything to solve this, and Adobes customer service is terrible, they don't get back to you when they say they will.

    Please help me someone,

    Thank you

    We have a difficulty which will be included in the process of testing for version 5.0. Except for a few unexpected correction main side effect, it will be part of 5.0.

    Private for 5.0 beta program will probably start in a few weeks or more. To try the fix and/or to provide feedback on the new features and bugs that you encounter, you can join the program of private beta (Non-disclosure Agreement required) via the Help menu of Muse. Members of the program will be notified when Muse 5.0 Beta 1 is available.

  • lightbox video autoplay sometimes plays on the loading of the page. is there a way to stop it?

    I have a vimeo video in a lightbox, which is set to AutoPlay.

    most of the time it works fine, but if the page takes a while to load, the video starts to play before the page is completely loaded and hidden by the Viewer. in this case, you must open the lightbox and close again to stop the video. Is it possible that I can keep the video to play prior to the loading of the page?

    example of page here: New Home

    Thanks in advance

    Find a work around:

    Added to it as a HTML block at the end of the HTML code (used a mucow to include at the END of html, after charge of Jquery)

    Used this as my iFrame script (same URL as above, but less the '? ') AutoPlay = 1 ".

    And made sure my button that opens the album had the graphic style "BigButton" referenced in this block of js

    So loading the video page not auto run initially, then click on the button of the window, it passes the src of the iframe to the autoplay, one.

    Hope this helps someone :))

    @SanJit_Das I would like to know if there is a better way.

  • Generally when I go in windows or by mail, the computer will pick up, and then when it opens, I can't keep the page at a particular place

    Original title: blocking or scrolling

    Generally when I go in windows or by mail, the computer will pick up, and then when it opens, I can't keep the page at a particular place. It scrolls upwards or downwards, when I try to open a place to file an open letter from mail, or trying to do some work. Please notify.

    Hello

    1 how long have you been faced with this problem?
    2 don't you make changes on the computer before this problem?
    3 what e-mail client or browser you use?

    Step 1: Check if the problem persists in the clean boot state.

    From your computer by using a minimal set of drivers and startup programs so that you can determine if a background program is interfering with your game or program. This type of boot is known as a "clean boot".

    Reference:
    How to configure Windows XP to start in a "clean boot" State
    http://support.Microsoft.com/kb/310353

    When you are finished troubleshooting, follow these steps to reset the computer to start as usual:
    1. click on start and then click Run.
    2. type msconfig and click OK.

    The System Configuration Utility dialog box appears.

    3. click on the tab general, click Normal Startup - load all services and device drivers and then click OK.
    4. When prompted, click on restart to restart the computer.

    Step 2: Also, viruses or malware scan and check.
    http://www.Microsoft.com/security/scanner/en-us/default.aspx
    http://www.Microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=ad724ae0-e72d-4f54-9ab3-75b8eb148356

    Step 3: Also, look for error messages in the event viewer. If you find error messages after return the exact error message so that we can help you better.

    Reference:
    Using the event viewer
    http://www.Microsoft.com/resources/documentation/Windows/XP/all/proddocs/en-us/snap_event_viewer.mspx?mfr=true
    Understanding of event viewer
    http://www.Microsoft.com/resources/documentation/Windows/XP/all/proddocs/en-us/event_overview_01.mspx?mfr=true
    Procedure to view and manage event logs in Event Viewer in Windows XP
    http://support.Microsoft.com/kb/308427

  • laptop (Dell Inspiron) with Windows 7 Home Premium is now slow to most of the activities - loading of the pages in the browser, etc.

    I heard that after a few years of use, Windows-based computers lose their ability to function. This happened to me before and I bought a new laptop. Now, I think that it happens again. The laptop (Dell Inspiron) with Windows 7 Home Premium is now slow to most of the activities - loading of the pages in the browser, etc... He is also declining my VPN connection occasionally, but also my direct connection is very slow. Latency shows speedtest software provided by the ISP in addition of 250 ms, download speed of 1 MB/s (compared with 8 planned) and 0.05Mbps download. The ISP has corrected this once, but I'm wondering now if it is the computer which is slow rather than on the network because my laptop works well on the same network/router. Is there one solution to this other than another new laptop?

    Jonathan,

    You say that your computer is slow, but all of the examples you give are rather than slow computer operations slow network communications.  To avoid any unnecessary work, check how fast the computer is on the tasks that don't use any network.

    If it works fine for tasks not network then you can concentrate on the problems of network as being the only concern.

    It has also become very slow for no network tasks you should study other causes.  Just as an example: If, like me, you sleep / turn off the computer when you are not using it then defrag will never work, so you can run it manually to make sure that doesn't cause problems.   Describe your symptoms in this thread so that someone can advise on the best course of action.

    In the unlikely case where you must run Dell Factory Image Restore, then the instructions are in your manual PC *.  Before doing this, run Dell Datasafe Local Backup then click on Backup, recovery to create - media allows you to create a bootable USB of the partition that you can use the normal procedure that failing Dell Factory Image Restore [to do this, even if you have already solved your problems so that you could face if the hard drive has failed never completely].

    * Procedure Dell Factory Image Restore [excerpt from the manual for Dell Inspiron 1545]

    1. turn on the computer.

    2 when the Dell logo appears, press several times to access the Advanced Boot Options window.

    Note: If you wait too long and the operating system logo appears, continue to wait until you see the Microsoft Windows desktop; then, shut down your computer and try again.

    3. Select repair your computer.  The System Recovery Options window appears.

    4. Select a keyboard layout and click Next.

    5. to access the recovery options, log in as a local user. To access the command prompt, type administrator in the user name field, and then click OK.

    6. click on Dell Factory Image Restore. The Dell Factory Image Restore welcome screen appears.

    Note: Depending on your configuration, you may need to select Dell, then Dell Factory Image Restore factory tools.

    7. click on next. Data delete screen is displayed.

    Note: If you do not wish to continue Factory Image Restore, click Cancel.

    8. check the box to confirm that you want to continue reformatting the hard drive and restoring the system software to the factory condition, then click Next.  The restore process begins and may take five or more minutes. A message appears when the operating system and the applications installed in the factory have been restored to the State of the plant.

    9. click Finish to restart the system.

  • Check if the user has selected box element apex before the loading of the page

    4.2.1

    THM:2

    Hello world

    I have two classic reports with different conditions but even select the columns based on a sql that uses the apex_item.checkbox2 element that allows users to select the lines and run some process. I also have a radio unit that hides and shows these two reports. However, it is possible that the user select a few lines and without doing anything click on the radio button that will present the page and all the lines that earlier he had chosen will be lost. I want that we should be able to pop an alert if there are checkboxes checked and the user tried to hit the button of the radio looks like the APEX_APPLICATION. G_F01. Count is not available at the time the page is submitted. We thought to use a pl/sql to see if APEX_APPLICATION DA. G_F01. Count > 0 then trigger an alert to confirm.

    Any ideas on how to do this?

    Thank you

    ryansun wrote:

    Hi FAC586 - basically, there are two parts of the report, were grouped products consolidated (as master) and the other report has all the products of the child. So based on the option the user selects that he sees who discovers and processes information.

    I tried to create the DA, but he does not seem to fire and I'm sure it would be because I have something wrong.

    No, in this case, there was a typing error in my JS expression above (this is what happens when there is no example in the trial against...)

    Must be:$('td[headers="COL_ALIAS"] input:checked').length > 0

    I have page submit on the evolution of radio, given that other elements of the actual application, don't do with this feature which is filled on the loading of the page.

    It does not work. If the present radio on the presentation changes group cannot be controlled by the dynamic action to confirm that it has already been committed before the confirmation message is displayed. Presentation must be made by further action of real on the DA. By the way other values is possible by using dynamic actions or region to submit elements of Page properties.

    But here it is necessary, if the user has activated all the lines, then changes the selection of the radio, it should show an alert to confirm. In addition, what happens if we have a very select in the box by a header label already. Can I use the same label to identify the COL_ALIAS?

    Do not understand the question.

    Don't know what I'm doing wrong.

    As I noted above, an important part of your problem is that you asking what amounts to a series of questions XY rather than the big picture given by presenting the necessary resources. You have been really good on the creation of examples on apex.oracle.com, but they are all fragments of the righteous, which makes things difficult when you try their synthesis in something that works as a coherent whole. Various bits and pieces that have been revealed in recent weeks, it seems like this could be treated using dynamic measurements without having to send the page until the final choice has been made.

  • "Assignment of a top layer of the object on the master" (master page numbers) I understand the layer must be up to show above images placed on the pages, but how can I do this?

    I have added page numbers to my master pages. They appear on the pages, but I have images on the individual pages which cover the numbers. I understand that I must assign a top layer of the object, but I don't understand how to do it. Please help me? Please explain a just clear as possible, I read the other replies but still do not understand. Wish it was as simple as select object, do a right-click, edit the layer!

    Thank you very much!

    1. open the layers panel (window > layers)

    2. in the control panel menu, choose new layer. In the dialog box, you can name the layer if you like Page numbers.

    3. on your main page, select the text block with the selection tool (black arrow tool) page numbers.

    4. If you now look at the layers panel, you will see a small square right of one of your layers (or 1 layer if you have not created any new layers). Drag instead of the layer of Page numbers. [Explanation: the square is a "proxy" for the selected objects.] [Drag to the other layer moves the objects on this layer.]

    Good luck!

  • Get NPES trying to create a line of the iterator of table on the loading of the page.


    Hi all

    I'm new to ADF and try to learn from its concepts. I've created a workflow with the train and using 7 jspx pages as the train stops. When I move from one stop to the next stop, the data are made to the database.

    My use case is, I want to fill an iterator of table on the loading of the page based on the data provided on the previous stop.

    I tried to use the code to find the iterator and create the line the view object in support Builder bean as well as file impl application module(call the executable action method) but every time I got the same null pointer exception.

    The code used for creating line iterator:

    BindingContext bindingContext = BindingContext.getCurrent ();
    BindingContainer DCBindingContainer = (DCBindingContainer) bindingContext.getCurrentBindingsEntry ();
    IdIterator DCIteratorBinding = bindingContainer.findIteratorBinding("iteratorName");

    ViewObject vo = idIterator.getViewObject ();

    Line rw = vo.createRow (); It is the line where I'm getting null pointer exception.

    Trace of the exception:

    at oracle.adf.model.bean.DCDataVO.initFKs(DCDataVO.java:621)

    at oracle.adf.model.bean.DCDataVO.createInstance(DCDataVO.java:592)

    at oracle.jbo.server.QueryCollection.createRowWithEntities(QueryCollection.java:1993)

    at oracle.jbo.server.ViewRowSetImpl.createRowWithEntities(ViewRowSetImpl.java:2492)

    at oracle.jbo.server.ViewRowSetImpl.doCreateAndInitRow(ViewRowSetImpl.java:2533)

    at oracle.jbo.server.ViewRowSetImpl.createRow(ViewRowSetImpl.java:2514)

    at oracle.jbo.server.ViewObjectImpl.createRow(ViewObjectImpl.java:11079)

    Please correct me if I'm wrong, but that's what I think I understand that, iterator links are not initialized correctly on appeal by Builder or application module impl of the file that I use.

    I will need to create a listener of phase of page for the task flow and and use the method afterPhase to call my method for line creation and insertion in the table iterator. ?

    But this approach causes the phase listner class to call for each workflow page I don't want I need to fill out the table only for a single page and not to other pages of six.

    Please help me in this problem by providing suggestions and pointers.

    My version of JDev is 11.1.1.6.

    Thanks in advance.

    ~ Abhishek

    Hi Ben,

    Thanks for your reply. But it did not solve my problem.

    To solve my problem, what I did is mentioned below:

    In my support for this page two, I create a listner beforePhase method and named her beforePhase displaying page jspx tag property.

    when the phaseId is RENDER_RESPONSE, so I call my method to set the extracted database of the values in the table iterator. and it updated the iterator with new values.

    Thank you all for your answers.

  • No data found in report csv or pdf on first loading of the page

    No data found in report csv output on the first load of the page. Report appears on the page, but no data is available in csv or pdf output. I still need to send the page and then it shows the data in the downloads. The page contains a form (read-only) with a report that refers to 4 page elements by using something like the following:

    and b.employee_no = v ('P5_EMPLOYEE_NO')
    and c.fisc_year_pk = v ('P5_FISC_YEAR_PK')
    and b.job_class = v ('P5_JOB_CLASS')
    and b.organization = v ('P5_ORGANIZATION')

    Yet once again, report to page appears except there is no data in the downloads. Can someone help me solve this problem? I'm under Oracle APEX 4.2.1 in Oracle database 11 g 2.

    Thank you.

    Sounds like a question of classic session state.

    You must eat the page elements using calculations of page rendering to ensure they are set to session state.

    Or if the download is triggered by a button, you should check that the elements of the page are subject to session state, perhaps via an action of PL/SQL.

    Scott

  • Perform research on the loading of the page

    Hi all

    I have build a UI panel with query table using criteria defined in the t display

    My requirement is such that when I run my default page research should get executed and information must be

    I tried different placement methods execute with params as default activity in taskflow and at the level of the vo in view criteria giving the null value to the declared variable but none worked

    Can someone tell me exactly what a change it takes so the search will be executed on pageload. I have only one field of research.

    Thank you
    Arun

    Hello

    If I understand your question, you need data to be placed on the loading of the page without search right?

    Try to set the query automatically tab ViewCriteria edition--> UI tips Section.

    Thank you
    Raj Gopal K

  • Tabluar form hide/show items on the loading of the page

    Hi all

    Apex 4.1

    I use JS to display or hide fields, based on the values of other fields, cela in a tabular presentation. So it is used as a work-around as dynamic actions are not able to do out of the box on tabular forms (that I know of).
    The code I use is something like this:

    In the page header:

    function test (pThis) {}
    get the index of line curren on changes
    var currIndex = $('select[name="'+pThis.name+'"]').index ($x (pThis.id));
    If (pThis.value < 0) {}
    . style.display $('input[name="f06"]') [currIndex] = 'block ';
    }
    else {}
    . style.display $('input[name="f06"]') [currIndex] = 'none ';
    }
    }

    In the attributes of the item in the column 'source '.
    OnChange = "JavaScript:test (this); »

    This fires that when the source column is changed, but not working when you load at the start page when it is filled with already stored reports. So it works only when a field is changed to the hand.

    How can I force this action shot the loading of the page so the rule (hide fields) also gets applied to existing records?

    Concerning
    Bottom

    Down de Klerk wrote:
    Hi all

    Thanks for the comments.
    So far I m unable to make it work. Fire code (debug using alert messages, and these show upwards), but the suggested procedure does not work.

    I tried all kinds of entry points, as for example the test via dynamic when a button is clicked, tried action on loading the page, and also via the $(document) .ready (function
    The function is executed and nothing happends, no error does not code so should be ok.
    I'll investigate further and let you know what happends. Don't know if the class type of the associated field f06 might have something to do with it, but one is LOV/Select list type

    This code is looking for input i.e. text, checkbox etc and will not find a slelect list.

    You must change the jquery like this selector

     $(document).ready(function () {
          jQuery.each($('select[name="f06"]'), function () {
               hide_field(this);
          });
     alert("function executed");
     });
    
  • How can we dynamically open an external URl of the page of the OFA

    Hi team
    Hello, how can we dynamically open an external URl of the page of the OFA
    For example: my datas table DB are like that
    Employee no       Url
    1     https://www.google.co.in/
    2     https://www.facebook.com/
    3     https://www.yahoomail.com/
    When I don't ask used no 1 of my Search Page
    In the result of my search page table, I get
    1 https://www.google.co.in/
    NOTE: Here item URL is type bean link when I click on the link it should open google page in separate browser
    At the same time, when I question used no 2 which is shown below, then it should open facebook page in a separate browser.
    2 https://www.facebook.com/

    When I try this
    Destination URI - https://www.google.co.in/
    It opens no separate browser, but for employees don't I question as open 1,2,3 only the same page of google in the separate browser for everyone, it is static, I want to dynamically open the URL depend on my employee to query no. If I query emp No 2 it must open facebook page this is my requirement. How can I pass the URL as a parameter?

    Please share your knowledge and experience and your advice my on this issue
    How can I complete my task
    I hope that my requirement is clear, if not please let me know I explained more anyway :)

    Is it Possible to achieve this OAF Page
    Thank you for all your suggestions on this
    Thanks in advance

    A.T. :)

    .findIndexedChildRecursive ("ResultTable");

    Here, you should have the exact itrm link id and not the region containing the lino

    Would it be more likely ImagePath I think ResultTable corresponds to the id of the table of search results

Maybe you are looking for

  • Call vi façade update object in a loop of sub - vi running?

    Hi all. I have a call subvi with a "Start the Test" button on the front panel. I spent a control reference for the Start button in a slot - vi which runs in a while loop. The while loop monitors the Start button and other things. Problem: Once the su

  • Offset of DirectX 10 problem mouse

    Hi, I am running Windows 7 Home Premium 64-bit edition. I have an Intel i7 940, 12 GB of ram and a 250 of nvdidia graphics card. My problem with DirectX 10 games running. When I run a game like Crysis for example. my mouse is actually down and to the

  • Analysis &amp; postprocessor

    Dear all, I would like to know the use of an equation in "Add the phrase" any analysis and "Post processor"? What will be the difference that can be viewed in the Grapher view? » Thanks in advance, Samir.

  • I have an old copy of vista to someone else to use as I have is no longer on my pc that I've upgraded to windows 7

    I can give a copy of windows vista that I no longer use that I updated to windows 7 to a friend and he will be able to install it alomg with the activation key unless it is denied by microsoft.

  • Triple the screen on Windows Vista problem

    Moose title: Triple display problem I have a laptop Toshiba A505D and I connect a HP 2159 m 21 "LCD monitor on the left side and keep there for a second monitor, I have a hub of Toshiba DynaDock USB which has built in video card that I run a second 2