Question

5
Replies
4095
Views
RaviK518 Member since 2016 40 posts
MSoft
Posted: 3 years ago
Last activity: 2 years 11 months ago
Closed

How to set data into PageList using java Step in Activicty

I have a PageList by name MyPageList which has got two Properties
by name SNO and Name .

I am trying to populate Data to MyPageList using java Step under Activicty

I have tried as shown below

ClipboardPage tmp = tools.findPage("pyWorkPage");
ClipboardProperty zList=tmp.getProperty("MyPageList");
ClipboardPage cd = tools.getThread().createPage("TEK-RouterEx-Data-Heros", "currentDevice");
cd.putString("HeroName","1");
 zList.add(cd);

The Exception Stack trace is

Caused by: com.pega.pegarules.pub.PRRuntimeException: Section 'Test123' execution error on page 'pyWorkPage' of class 'TEK-RouterEx-Work-FirstCase'. : The reference .MyPageList.HeroName is not valid. Reason: list property 'MyPageList' must have an index
at com.pegarules.generated.html_section.ra_stream_test123_f9d3e2801dc82f66824ceff5acd763a5.execute(ra_stream_test123_f9d3e2801dc82f66824ceff5acd763a5.java:104)
at com.pega.pegarules.session.internal.mgmt.Executable.getStream(Executable.java:4038)
at com.pega.pegarules.session.internal.mgmt.autostreams.AutoStreamRuleRuntime.getSectionStream(AutoStreamRuleRuntime.java:149)
... 158 more
Caused by: com.pega.pegarules.pub.clipboard.InvalidReferenceException: The reference .MyPageList.HeroName is not valid. Reason: list property 'MyPageList' must have an index
at com.pega.pegarules.data.internal.clipboard.PropertyReferenceImpl.resolveEmbeddedPages(PropertyReferenceImpl.java:1819)
at com.pega.pegarules.data.internal.clipboard.PropertyReferenceImpl.doGet(PropertyReferenceImpl.java:1369)
at com.pega.pegarules.data.internal.clipboard.PropertyReferenceImpl.doGet(PropertyReferenceImpl.java:1349)
at com.pega.pegarules.data.internal.clipboard.PropertyReferenceImpl.get(PropertyReferenceImpl.java:782)
at com.pega.pegarules.data.internal.clipboard.PropertyReferenceImpl.get(PropertyReferenceImpl.java:766)
at com.pega.pegarules.data.internal.clipboard.PropertyReferenceImpl.get(PropertyReferenceImpl.java:753)
at com.pega.pegarules.data.internal.clipboard.ClipboardPageImpl.getProperty(ClipboardPageImpl.java:1052)
at com.pega.pegarules.data.internal.clipboard.ClipboardPageImpl.getProperty(ClipboardPageImpl.java:993)
at com.pegarules.generated.html_section.ra_stream_test123_f9d3e2801dc82f66824ceff5acd763a5.pxDropdown_1

Could you please tell me how to resolve this

Low-Code App Development Data Integration Java and Activities
Moderation Team has archived post
Share this page LinkedIn