Dynamic action: apexafterrefresh not firing

See https://apex.oracle.com/pls/apex/f?p=57688:32

See the discussion on Cascading LOV - dynamic action time-out

I extended this approach to a report and another list cascading and things do not work as expected. Here are the components

1. the list of values for X 1 is 1,2,3

2. the list of values for X 2 is X1.1/.2/.3, cascade parent's X 1

3. the list of values for X 3 is X 1. X 2, cascade of parents are X 1 and X 2

WHAT SQL statement is

with 
 l1 as (select level l from dual connect by level<=3),
 l2 as (select level l from dual connect by level<=3)
select
 l1.l l1,
 l1.l||'.'||l2.l l2,
 l1.l||'.'||l1.l||'.'||l2.l l3,
 null link
from l1,l2
order by l1.l,l2.l

"Link target page attributes column and the current link class = 'find' x: l1 =" "#L1 #" x: l2 = "#L2 #" x: l3 = "" #L3 # " "

Dynamic action D1 is on fire on jQuery selector a.search with the following real click

1 setpoint: Javascript expression $(this.triggeringElement).attr("x:l1"). Affected item: P3_X1. Remove the change event: no

2. run Javascript code:

$("#P3_X3").one("apexafterrefresh",function () {
  $s("P3_X3",$(this.triggeringElement).attr("x:l3"));
});

3 setpoint: Javascript expression $(this.triggeringElement).attr("x:l2"). Affected item: P3_X2. Remove the change event: no

4 cancel the event

In my real example, there are reports configured to refresh when X 3 changes and that part works when I change X 3 manually. I'm just unable to set X 3 with these series of dynamic action of shooting.

Here's what I expect to happen

1. true action 1: this sets X 1, which is updated X 2

2. true action 2: This defines a unique event set on fire after the update to set its value X 3

3. true action 3: this sets X 2 and updates X 3.

This is supposed to raise the apexafterrefresh event and set the value from X 3 to x: l3, but it remains empty.

What Miss me? I tried all sorts of things as defining the change event to delete Yes and triggering events manually. change(), change the order of actions, but nothing works. I just can't do the value of X 3 when the dust settles.

Help? Thank you

Hello

had a look at your 57688:32 and copied on app # 19453 playing around.

  1. P32_X3 must only specify P32_X2 as 'Cascading LOV Parent article (s)' otherwise it will refresh when P32_X2 is changed and when P32_X1 is changed. But P32_X1 will trigger a change in P32_X2 anyway (which causes a refresh of P32_X3). I changed P32_X3 and to P32_X1 'Elements of Page to submit' in order to access the value of the LOV.
  2. You code referenced JavaScript P3_... instead of P32_... I changed to P32_...
  3. I also changed the order of the actions in your dynamic action
    1. First register your handler "apexafterrefresh" otherwise you can run into problems of synchronization
    2. Removed your action 'Set value' for P32_X2. See below.
    3. I also created a "apexafterrefresh" for P32_X2, because the definition of P32_X1 clears the value of P32_X2 and you must wait for the update cascading
    4. I also changed the JS code to use the variable auto instead of this, because within the apexafterrefresh, this will point to your agenda of the page list selection and not to the original report column.
var self = this;
$("#P32_X2").one("apexafterrefresh",function () {
console.log(this, self);
$s("P32_X2",$(self.triggeringElement).attr("x:l2"));
});

$("#P32_X3").one("apexafterrefresh",function () {
console.log(this, self);
$s("P32_X3",$(self.triggeringElement).attr("x:l3"));
});

Hope that gives you a direction to fix it in your application.

Concerning

Patrick

Member of the APEX development team

Tags: Database

Similar Questions

  • APEX 5: Dynamic Action do not run on DEMAND Condition = VALUE

    After migration from APEX to APEX 5 dynamic action 4.2.5 which performed in 4.2.5 won't work in 5 APEX.

    Event DA: BEFORE the PAGE is SENT

    Condition: Ask = value

    Value: SAVE

    Page contains the button SAVE, in the debug REQUEST window appears like SAVE, but DA does not occur.

    When the condition is not defined, DA works correctly in the APEX 5.

    Is this a bug in 5 APEX?

    Hey Bozo,

    Bozo says:

    How to have this in mind, can be made to run before Page submit DA specified button click?

    It depends on what you want to achieve a click of button and what you want to achieve with DA.

    The purpose of the button and DA can be combined in a javascript function or in the DA himself.

    How this can be achieved in the DA itself is:

    • Instead of shooting the DA "before submit Page', fire the DA to the click event of button. (to do this change the button action to listen for events from DA)
    • In the first real action, run everything you want to achieve with DA.
    • Write another real action, to submit the page and set the application to any value you want. (ensure that the processes we submit are conditional on the overall application, instead of the State of the button)

    Kind regards

    Kiran

  • Dynamic action does not not on the first attempt to load page. Work after refreshing the page

    4.2.1

    Hello

    I have a page with a list of selection Order_id and a display _item Product_name.  There is action dynamic PL/SQL that fills the element displayed when the order_id is changed. The problem is that when I opened the page for the first time, if I change the select order_id list, nothing happens. But if I refresh the page once, and then it starts work and the display_item is filled.

    No idea what could be the problem?

    Thank you

    Ryan

    ryansun wrote:

    On a more serious note,.

    1 when you load the page for the first time and try selecting the order_id, nothing don't be past, try refreshing the page once and you will see the option to display with the null value. What I do is. I have two tables

    Orders

    1

    2

    3

    Products

    1A

    2B

    2 Z

    3 C

    When I select the command 1, then since there is only one line of products, the displayed item will indicate A populous. If I select 2, since there are two product lines, I should see the list box.

    Doesn't seem to work and I'm sure, I'm doing something wrong.

    Difficult to be certain that as it appears that someone has been editing the page before you start watching (rather than copy the page experience their own copy). Your article P1_PRODUCT_NAME_DISPLAY he a point value / Expression 1 column = Expression 2 condition P1_HIDE_SHOW = 1 condition on that? Or any other condition of rendering?

    These conditions do not match the dynamic actions. They are applied only during the page see the transformation when the page is displayed first; When it is linked to another page; or after a branch to him. They are not applied dynamically during the activity of the user on the page. In this case, that the status is set to false when the page is rendered first, the same element does not exist in the page sent to the browser. If you want these items to appear conditionally because of the interaction with another user control, then you must initially return the elements and control their visibility using hide/show the dynamic actions.

  • Confirm the dynamic action does not not as expected in the APEX 4.2.5

    This looks like a bug in APEX 4.2.5.  I have a page with a "Cancel" button that redirects to another page.  There is a dynamic action that fires on the button with a confirmation action and the text ' are you sure?  However, if the user selects OK or cancel in the confirmation dialog box makes no difference - the redirect is always performed.

    I found this question after the migration of a page that worked to 4.1.1-to-4.2.5.00.88 APEX and were also able to replicate on apex.oracle.com here:

    https://Apex.Oracle.com/pls/Apex/f?p=19896:2

    (Press the Cancel button in the top right of the page redirects to page 1, regardless of the user's response to confirm the popup.)

    I don't need someone to suggest the alternative code, I know how to build my own confirmation processing.  I want to just raise this as a bug as possible and see if there is a solution to make the dynamic action works as it should.

    NB I found this in the patch notes for 4.2.5.00.88 on a fix for a similar problem:

    http://www.Oracle.com/technetwork/developer-tools/Apex/application-express/Apex-425-patch-set-notes-2186274.html

    15984978

    Dynamic action front-Submit with a confirmation message does not

    Hi Tony,.

    I think the problem is that the action of the button is defined as 'Redirect page in this Application', but it must always be "defined by the dynamic Action" as soon as you have set dynamic actions 'click' to a button. Normally, which is automatically changed as soon as you create your first dynamic action of a button, and I just confirmed by creating a test button in your application that has been defined as «Redirect...» ». After that I created a dynamic action the action of the button is set to "defined by the dynamic Action.

    Is it possible that you have modified the action of the back button to «Reorient...» » ? The question why «redirect...» "does not work, it's that we cannot guarantee in what order the browser will process click on events defined with onclick in the tag button itself and those events attached as a click event handlers. This is why it is necessary that everything is defined as dynamic actions. Only in this case you will be able to cancel the treatment.

    Concerning

    Patrick

    Member of the APEX development team

    My Blog: http://www.inside-oracle-apex.com

    APEX Plug-Ins: http://apex.oracle.com/plugins

    Twitter: http://www.twitter.com/patrickwolf

    Post edited by: Patrick Wolf

  • Show / hide the dynamic Actions does not work in Windows 7 IE10 and APEX 4.2.1

    Hello

    I have a page in the APEX 4.2.1 reactive Blue theme, where show or hide page elements based on changes to other page elements and their values, in terms of JavaScript expression.

    It's that everything works well in Chrome 31.0.1650.63 m and 25.0.1, Firefox but not Internet Explorer 10. I thought it might be linked to this solution to the problem of Ajax IE10 | Code of Jason and tried their recommendation, but appears not to have contributed.

    Help please!

    Thank you

    Alex.

    I found the problem and it was my fault. One of my dynamic actions using JavaScript expression conditions was missing quotes in $v ("P1_ITEM1"), breaking the rest of the related JavaScript code. Chrome and Firefox did not care, but IE seems to be less tolerant of mistakes like that.

    Scott, thanks anyway. It is useful to know that I have that option as well.

  • Comparison of 2 numbers in dynamic action does not work

    Hello
    I am trying to create a customer validation between the 2 items (type number). If item1 > item2 then alert (the value of item1 should not exceed item2).
    So I created a dynamic action (lose focus) about item1 with pl/sql expression: p_item1 >: p_item2 as the condition.

    the problem is that the dynamic action never fires. When you set the condition never, he shoots very well. When I put the condition of value in the expression 1 = expression2, he never fires
    but when the value of expression1! = expression2, he shoots very well. It seems to me little matter what values I use they never match. is this a problem of format because I have no relative model
    the two elements.

    any idea on what is happening?

    Thank you

    Published by: ICeT on August 16, 2011 13:18

    Hello

    You may notice that the item values are always STRING. So comparing: P1_ITEM1 >: P2_ITEM2 is a string comparison.

    If you want to compare only the numbers that you need to explicitly type conversion: TO_NUMBER(:P1_ITEM1) > TO_NUMBER(:P2_ITEM2)

    brgds,
    Peter

    -----
    Blog: http://www.oracle-and-apex.com
    ApexLib: http://apexlib.oracleapex.info
    BuilderPlugin: http://builderplugin.oracleapex.info
    Work: http://www.click-click.at

  • Dynamic action does not not with the Date

    Hi all

    In my form, I created a dynamic action to be pulled on losefocus on the date of the birth column. The action returns the age in the age column. It only works if I use the date of birth hard-coded as follows:

    SELECT
    SYSDATE - AGE TO_DATE('01-JAN-2007','DD-MON-YYYY')
    OF THE DOUBLE

    It does not work if I use the actual date of entry as follows:

    SELECT
    SYSDATE - AGE TO_DATE(:P2_DOB,'DD-MON-YYYY')
    OF THE DOUBLE

    My version of the apex is 4.02 and database 11g.

    Could someone point out what I'm missing.

    Thank you
    Zahid

    Hi Zahid,

    When you want to use the values of the element of the page in a dynamic action of pl/sql, you must go to the section "Articles to submit the Page.

    brgds,
    Peter

    -----
    Blog: http://www.oracle-and-apex.com
    ApexLib: http://apexlib.oracleapex.info
    BuilderPlugin: http://builderplugin.oracleapex.info
    Work: http://www.click-click.at

  • Dynamic action - SQL - not returning the result as expected

    Hello

    I have a dynamic Action that runs some SQL codes and must return a string to a text box...

    the sql code that the action runs when a button is reached is:

    Select REPLACE ("|: P292_QPRODUCTS |) '''', ':', ' ' || : P292_QAOPRODUCTS | ""ProductsID"(="') from DUAL "

    P292_QAOPRODUCTS = DATABASE: JAVA

    P292_QAOPRODUCTS = AND (user can also choose OR)

    In the command SQL is what I see:

    "DATABASE" AND "ProductsID" = "JAVA".

    In the text box apex that action must set the value of the use of SQL I see only:

    ''

    any ideas?

    see you soon

    t

    Hello

    Could you share the 'Settings' and 'Affected Elements' sections of the property page of DA?

    You can also try a PLSQL and Code PL/SQL type as:

    Start

    Select REPLACE ("|: P292_QPRODUCTS |) '''', ':', ' ' || : P292_QAOPRODUCTS | ""ProductsID"(="') "

    in: DOUBLE P292_TEXT_BOX;

    end;

    Don't forget to fill in the field "Page elements to return" with the name of P292_TEXT_BOX.

    Concerning

  • Dynamic action does not work with the item change event

    Hi guys,.

    I have a problem with the dynamic Action. On my page, I have three points. (P2_X-> display only, P2_Y-> P2_Z-> button, TextField) and two dynamic actions. One of them is running javascript. When I press the button (P2_Z) this dynamic action affects textfield (P2_Y) value to display only the value (P2_X). (This dynamic works). And there is another dynamic action for the option to display P2_X. This dynamic action fires to P2_X point value changes. This DA (dynamic action) runs a plsql code and inserts the value of the P2_X element in a table (test_tbl). But when I try to do it always inserts the null value.

    The plsql code is below:

    Start
    INSERT INTO TEST_TBL
    VALUES (: P2_X);
    COMMIT;
    end;


    You have an idea? If you need, I can give the user for apex.oracle.com past.

    Thank you

    Hello

    Do you have the "points Page to submit" to the process of PL/SQL, the value of the correct item? (P2_X)

    Concerning
    J :D

  • Why dynamic action does not recognize a condition

    Running Apex 4.2 (build 4.2.1.00.08) on Windows 7, IE running.


    I'm trying to control the shape with.

    specifically, I have a field that I need peopled before running the main process.

    I have an alert action DA when the Condition is a PL? SQL expression, the content is - ': P16_FILE_NAME is null.


    With the empty field, it triggers the alert.


    I put text in the field and press the button that activates him DA, and it ALWAYS triggers the alert.


    I tried a celine that page just a couple of fields and a few buttons.


    Same conditions, the DA is to fire and give a warning about the presence of the Null field.


    Button 1 - DA real action1, send page, tick alert of DA real action 2.

    2 - the button submit page.

    Buttons 3 - copy of field1 in field 2, question to submit is 1 point field to return called Field2.


    If I enter a value field 1 and press the 1 button it says field1 is empty.

    If I press the 1 button once again, no other change is more, he says field1 is empty


    If I clear the field and press button 1 what he says is not empty, if I press it again it says it's empty.


    If I put something in Field1, and then press the 2 key, it does nothing except submit page.

    If I then press the 1 button it says that is not empty.

    Claire field and press the 1 button again twice and now is that it is empty again.


    Put soemthing in Field1 and press the 3 button to copy to Field2

    Press the 1 button and it says it's empty.


    The only way seems to recognize as being complete is if a send page was made in a separate order of DA.


    If the page submit that real action is in the same DA as the real action of check, it will not recognize the page submit until the second button.


    It must recognize, as shown in the session state as not empty and the field of the screen is also not empty, and yet he says it is empty.


    Anyone got any ideas on why this is?

    Dave T NZ wrote:

    With regard to the Condition of the DA, according to documentation, he said: "a condition is a small unit of logic which helps you control the display of regions, the items, tabs, and buttons, as well as execution of processes, validations and calculations."

    If the condition controls the execution of the DA.  Also, I can verify that by putting the condition ever and no more, it fires.

    No, in the case of the DAs, conditions of control if the code of DA is included in the page. In this regard DA conditions are more like "display of regions," the "execution of the process.

    Don't forget, the processes are executed in the database for the page and accept the transformation, while the DAs are executed in the browser when the rendered page in page of treatment. If the condition is not true then the code of DA is not included in the page sent to the browser, so it can never run, and it will not appear on the page until after another page show where the condition is true.

  • On the link command Action is not firing

    Hello

    I use JDev Version 11.1.1.6

    I have CommandLink where I wrote a method at the bean for Action. And the same command binding has the showpopup behavior

    My hypothesis was during the click on command action method first fires link then goes off then the showpopup behavior.

    But when I click on method action link command is not shooting, only showpopup behavior is pulled.

    is TI WHEREAS behavior?

    Thank you very much

    ~ Pierre Badri

    As already mentioned, the showPopupBehavior prevents the action send to the server.

    You can remove the showPopupBehavior from your link and show the popup from within java code in your bean.

    RichPopup.PopupHints ph = new RichPopup.PopupHints ();

    Popup.Show (pH);

    Timo

  • minor bug: status of dynamic Actions is not displayed correctly when DA disabled

    Hello

    It displays 'Parole' instead of 'Never' to the page of the Page definition.

    Hi Edward,.

    Thank you us report this, I agree, it should be compatible with other types of component and display "Never" in this situation. I submitted the bug #10149191 for this.

    Just to note (and I'm sure you're already aware of this), but it is not inconsistent in 'View of the component' on the definition page. In "Tree View", you see the name of the component in italics if it is conditional and then hovering over it you can see that the type of condition is 'never '.

    Kind regards
    Anthony.

  • Dynamic action on IR regio

    I'm on APEX 4.2 and have created a dynamic Action on the IR area. I have the same 'Page Load' game and have also checked 'Fire on page Load' on the part of the exception. It works fine when the IR page is initially displayed, but the dynamic Action is not fired when the user presses the line selector previous IR on the bottom of the page. How can I get it works on this action as well?

    bobmagan wrote:

    I'm on APEX 4.2 and have created a dynamic Action on the IR area. I have the same 'Page Load' game and have also checked 'Fire on page Load' on the part of the exception. It works fine when the IR page is initially displayed, but the dynamic Action is not fired when the user presses the line selector previous IR on the bottom of the page. How can I get it works on this action as well?

    Edit the event DA to cool after (depending on when you want to run), the Type of selection to the regionand the region of your IR region.

  • custom not pulling dynamic action

    Using Apex 4.2.2 on 11g

    I have a standard report A1

    There is a link to the A1 report column which updated the action dynamic table C1 using a custom.

    The link of the report A1 column has the value javascript URL: $.event .trigger ('RefreshTrend_2', [{key_2:' #COL01 #'}]);

    and there is a dynamic action RefreshTrend_2 D1, which sets the value of the graphic filter P17_KEY_2 to the value of the key_2 variable javascript and then refresh table C1

    Dynamic action is customized with a type DOMObject of the document and no condition

    It works fine, but when I add another combination of State/chart (report A2, table C2) with a similar dynamic action (D2), D2 is a copy of D1 with the values for the variables and chart area has changed.

    The A2/C2 feature works very well on its own, D2 is fired when I click on the link in the column, but not when there are 2 dynamic actions customized / document on the page.

    This column on A2 link triggers the dynamic action D2 if dynamic action D2 contains a higher than D1 sequence (if I move over D1 in the list, it will trigger, but then D1 will not fire for the link in the column on the A1)

    Am I missing something?

    Thank you

    Kathryn

    It turns out that dynamic action set to fire on the loading of the page made reference to a javascript variable not defined (page element is not filled yet at the time of the loading of the page), so everything after that is ignored and the second dynamic action does not occur.

    I turned off the fire on loading the page for dynamic and all actions work

  • Dynamic action, not shooting after having sailed on the next page of report

    I have a report and I want to show some additional details about a record when the mouse over a specific area.
    It works but only on the first page of the report to. After accessing the second report page dynamic action does not occur.
    After a page réactualisiez on the dynamic action fires.

    Here is an example on apex.oracle.com.

    https://Apex.Oracle.com/pls/Apex/f?p=28683:25

    When you hover the mouse over the image a 'test' alert (i) is displayed. Go to page 2 of the report, and nothing happens.

    What I did:

    Create a public page with a classic report with the request:
    select 
     "CUSTOMER_ID",
     "CUST_FIRST_NAME",
     "CUST_LAST_NAME",
    '&lt;img class="abstract" src="/i/menu/blue_info_16x16.gif"/&gt;' as "ID"
    from #OWNER#.DEMO_CUSTOMERS
    Create a dynamic action.
    Sign up for the mouse
    jQuery selector: .abstract
    Action: alert ('Test')

    Is this a bug or is there a different approach to this?

    Hi René,.

    Change DA dynamic extended event.

    Additional help is available here:
    http://docs.Oracle.com/CD/E37097_01/doc/doc.42/e35125/advnc_dynamic_actions.htm#CIHGAFFI

    BR,
    Marko Goricki
    --------------------
    http://apexbyg.blogspot.com/

Maybe you are looking for