Question
Problem Referencing Parameter-ized Data Page from Pega JSP tags
Processing Data Pages in HTML (Rule-Obj-HTML) using Pega JSP Tags works as expected for Data Pages that do not use parameters, i.e., a Data Page works like any other clipboard page:
<pega:withPage name="D_InterestedParties">
<pega:forEach name=".pxResults">
<pega:withEmbedded name="$this" >
<pega:reference name=".PartyName" />
<pega:reference name=".PartyType" />
</pega:withEmbedded>
</pega:forEach>
</pega:withPage>
But what if the Data Page does have parameters?
Pega JSP tags like <pega:reference/> or <pega:withPage/>, etc., don't seem to like the D_DataPageName[ParameterName:"value"] parameter syntax (https://pdn.pega.com/use-parameters-when-referencing-data-page-get-right-data).
For Example
A reference tag <pega:reference name='D_TestCPL[Param1:"TEST"].pxResultCount' /> gives the error
Section 'TestDP' execution error on page 'pyTempPage' of class 'Work-'. : The reference D_TestCPL[Param1:"TEST"].pxResultCount is not valid. Reason: declare page parameters not supported by PropertyReference
Similarly a reference to <pega:withPage name='D_TestCPL[Param1:"TEST"]'> gives the error
Section 'TestDP' execution error on page 'pyTempPage' of class 'Work-'. : invalid page name: D_TestCPL[Param1:"TEST"]. Details: Invalid value for aName passed to com.pega.pegarules.data.internal.clipboard.ClipboardPageImpl.setName(String).
Hi Frank,
I believe that this is not a supported feature of Parameterized Data Pages. I would have to double check with @SALIK, but I'm fairly positive that you cannot directly reference a Parameterized Data Page in a section.
It looks like you want to iterate over a data page that is parameterized potentially... I believe the way that I have historically done this is to create a second un-parameterized data page and load it based on a known clipboard page value (ie: D_TestCPLRouting, read only, loaded from Data Transform, Primary = D_TestCPL[Param1:pyWorkPage.param1Val])
Then iterate over D_TestCPLRouting.
Does this make sense?
Update: I checked the PDN Content on parameterized data pages and can confirm that you cannot refer to a data page with the inline parameter syntax in any UI rules.