Expand my Community achievements bar.

SOLVED

Unable To Get Implicit Objects In WCMPojo

Avatar

Level 5

I am using a component where there is need of dynamic dropdown. The options are configured in the page properties. But I am unable to get currentPage Object in datasource.html file. Below is the structure of my component.

1623959_pastedImage_0.png

And datasource calling the wcmpojo class. Below in the flow.

enter image description here

datasource.html

<sly data-sly-use.data="${'apps.myprj.components.content.tabcontent.HtlDatasourceExample'  @ text=currentPage.path}"> </sly> 

HtlDatasourceExample is getting call and returning correct response if values are hardcoded.

Issue is unable to get sling objects in HtlDatasourceExample such as currentPage.

Thanks

1 Accepted Solution

Avatar

Correct answer by
Community Advisor
1 Reply

Avatar

Correct answer by
Community Advisor