Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Dynamic action: apexafterrefresh not firing

partlycloudyApr 22 2015 — edited May 19 2015

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

See discussion at Cascading LOV - Dynamic action delay

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

1. List of values for X1 is 1,2,3

2. List of values for X2 is X1 .1/.2/.3, cascading parent is X1

3. List of values for X3 is X1.X2, cascading parents are X1 and X2

Report SQL 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

Column link has target of current page and link attributes class="search" x:l1="#L1#" x:l2="#L2#" x:l3="#L3#"

Dynamic action D1 is set to fire on click of jQuery selector a.search with the following TRUE actions

1. Set Value: Javascript expression $(this.triggeringElement).attr("x:l1"). Affected Element: P3_X1. Suppress change event: no

2. Execute Javascript code:

$("#P3_X3").one("apexafterrefresh",function () {

  $s("P3_X3",$(this.triggeringElement).attr("x:l3"));

});

3. Set Value: Javascript expression $(this.triggeringElement).attr("x:l2"). Affected Element: P3_X2. Suppress change event: no

4. Cancel event

In my real example, there are reports that are set to refresh when X3 changes and that part works when I change X3 manually. I am just unable to set X3 with these series of dynamic actions firing.

Here is what I expect to happen

1. True action 1: This sets X1, which refreshes X2

2. True action 2: This sets a one-time event set to fire after X3 is refreshed to set its value

3. True action 3: This sets X2 and refreshes X3.

This is supposed to fire the apexafterrefresh event and set the value of X3 to x:l3 but it remains blank.

What am I missing? I tried all sorts of things like setting Suppress Change Event to Yes and manually triggering the .change() events, changing the order of the actions but nothing works. I just can't set X3's value when the dust settles.

Help? Thanks

This post has been answered by Patrick Wolf-Oracle on Apr 23 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 22 2015
Added on Apr 22 2015
9 comments
2,007 views