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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Passing items to Modal Dialog

FlammiferJan 14 2018 — edited Jan 15 2018

Sometimes APEX just confuses me.

I am simply passing the page value to modal dialog when using link from button. Setting values there with values on this page.

Doesn't work, blank.

I have select list, which passes its value to item on modal (of course, I use 'Always, replace any...') .

If I use static value for any item, as a source, and pass from this page to modal via link, then it will get there and set modal's item. But if its a select list as a source item, then no.

I am 100% this should work and has always worked.

EDIT: this is insane, because, say I have Display Only item on page 1...
I use static as Source and write 1234. If I link to modal page and set some value there with this value... It will show 1234 in modal dialog item.
But if I use PL/SQL expression as source for item on Page 1, and use : P01_SOME_SELECT_LIST  and pass this to modal, then modal item will be empty. But here's the catch - on Page 1 I can actually see that item really has a value of SOME_SELECT_LIST.

I don't understand this. Is this a bug?

Comments

Scott Wesley

The link is usually in context of the time of page render. So what value did session state have then, not after the user has modified values.

Does this sound like your situation? If so, opening the modal needs to take this into account.

See

Passing Data in and out of APEX Dialogs – HardLikeSoftware

Flammifer

I probably explained incorrectly. Its actually not link, but button with dynamic action Redirect to Page in This Application. Then opens modal, and sets its items with values.
This has never been an issue before. Also, it passes statically set value of item, but doesn't pass anything else, even though item is visibly containing value. That doesn't make any sense.

Its the same thing if you would want to pass some ID from page to another page be it modal or non-modal, nothing more.

Scott Wesley

No, it's not described well.

Are you sure your select list item has that value available?

Is "Display extra values" set to yes?

C Sykes

If the modal is being opened by a dynamic action, try this to see if your item needed pushing into session.

Create a new true action at the top of the dynamic action (fires first).

Change the type to PL/SQL Code.

In the code box, type NULL;

In the 'Page items to submit' text area, type the name of your select list.

If there was any problem with the value not being in session, this should push it in.  If it still doesn't work, then that wasn't the problem I guess.

1 - 4
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Feb 12 2018
Added on Jan 14 2018
4 comments
3,016 views