Skip to Main Content

Passing page items

Suppose you have an editable page item, and you want to open a Modal Dialog where you then want to use the value of that page item (and return the edited value).
Since you need to set the session state of that item before opening the Modal Dialog, you cannot use a simple Redirect.
This can be done, but you need some Dynamic Actions and a page item to store the URL of the Modal Dialog.

Demo:
  • Edit the value of Text (P1205_TEXT) on this page.
  • Click on the Open Modal P1202 button.
  • The DA Open Modal P1202 dynamic action sets the value of P1202_TEXT to the (edited) value of P1205_TEXT. Note that you could add this item to the URL which is generated in the next step, but then you would run the risk that the value is too long for the URL and will be truncated.
  • The DA Open Modal P1202 dynamic action then sets the value of P1205_MODAL_P1202_URL to a URL for the modal page. Note the use of p_triggering_element which is set to the HTML DOM ID of the Open Modal P1202 button. Also note the values for Items to Submit and Items to Return.
  • The DA Open Modal P1202 dynamic action then executes apex.navigation.redirect to open the modal page, using the URL stored in P1205_MODAL_P1202_URL.
  • Edit the value of Text (P1202_TEXT) on the modal page.
  • Click Save on the modal page, which submits the modal page.
  • The page process Close Dialog on page 1202 closes the dialog, and returns the value of item P1202_TEXT.
  • The DA Dialog Closed dynamic action then puts the value of P1202_TEXT into P1205_TEXT. Note the jQuery Selector which is set to the HTML DOM ID of the Open Modal P1202 button.
 
Modal Dialog URL

Code

Item

Identification
Name
Display As

Item

Identification
Name
Display As

Button

Name
Button Name
Text Label / Alt
Layout
Sequence
Display in Region
Behavior
Action
Execute Validations
Advanced
HTML DOM ID (= old Static ID)

Dynamic Action

Identification
Name
Execution Options
Sequence
When
Event
Selection Type
Button
Advanced
Event Scope
True Action
Identification
Action
Settings
Code
Execution Options
Sequence
Fire On Initialization
True Action
Identification
Action
Settings
Code
Execution Options
Sequence
Fire On Initialization

Item

Note: This object is located on page 1202
Identification
Name
Display As

Button

Note: This object is located on page 1202
Name
Button Name
Text Label / Alt
Layout
Sequence
Display in Region
Behavior
Action
Execute Validations

Process

Note: This object is located on page 1202
Identification
Name
Type
Process Point
Sequence
Process Point
Run Process
Settings
Items to Return

Dynamic Action

Identification
Name
Execution Options
Sequence
When
Event
Selection Type
jQuery Selector(s)
Advanced
Event Scope
True Action
Identification
Action
Settings
Set Type
Return Item
Suppress Change Event
Execution Options
Sequence
Fire On Initialization
Affected Elements
Selection Type
Item(s)