Reuse a Fragment
Because a fragment is essentially a reusable piece of UI, you can use it in a page as well as in multiple pages, even other fragments.
Say you define a fragment to show an employee's contact information. You can pull in the fragment in multiple pages, where ever you want an employee's contact details to show. For example, you can use the fragment in a page that displays an employee's contact details as well as in another page where the contact details can be edited.
You can also use a fragment multiple times in the same page, typically when you provide different sets of input parameters to the same fragment. It's also possible to create pages starting with the contents of an existing fragment, essentially using the fragment as a page template.
Because fragments are defined at the application level, they can be used in any page, in any flow within the application.
- To use a fragment in multiple pages:
- To use a fragment multiple times on the same page:
- Open the page you want to add the fragment to.
- In the Page Designer, drag and drop the fragment from the Components palette onto the canvas.
- To add the fragment to another area of the page, drag it from the Components palette and drop it where you want it to display.
- To use a fragment within a fragment: