Sunday, April 7, 2019

Non autogenerated section "pega:forEach" JSP directive

If there is a scenario where we need to display employee details (pagelist data) in a non-auto-generated section with custom code. We can make use of the below two JSP directives:
  • <pega:forEach></pega:forEach>
  • <pega:reference></pega:reference>

  1. Non auto-generated section means in HTML tab of section : "Auto-generated HTML" checkbox is unselected.
  2. Treat these JSP directives as scriplets embedded into HTML code.
  3. Using <pega:forEach> we can iterate over the pagelist.
  4. Using <pega:reference> we can get the value of the single value property.
  5. In the below example, pages and classes is as below:
    EmployeeList => Code-Pega-List
    EmployeeList.pxResults=> Data-Employee
  6. Refer to screenshot below on how we can use these JSP tags.

1 comment:

  1. Hi.
    How to capture index of the current page being looped? My requirement is to display serial number column.


HowToPega : All rights reserved and the contents are copyrighted to Pavan Kumar Naidu