Enable Page Variables to Provide Initial Values for a Fragment's Input Parameters
You can pass a page variable as an input parameter from the page to a fragment that it references in order to provide initial values for the fragment's input parameters.
Say you have a page that displays employee data in a table, including employee contact information defined in a fragment. When a user selects a row in the table of employees, the selected employee's contact information is displayed from the fragment. To pass the selected employee's ID from the page to the fragment, you might define a page-level variable (for example, selectedEmp
) and pass its value to a fragment variable enabled as an input parameter (for example, empId
) via the expression [[$variables.selectedEmp]]
.