Expand my Community achievements bar.

SOLVED

read properties from content/usergenerated folder into page

Avatar

Level 3

Hi All,

need to read properties from /content/usergenerated/asset-share-commons/en/assetrequest/cq-gen1678948801943 folder and display it on new page on submit of form .

 

created form using core components , on every form submit data will be stored under /content/usergenerated/asset-share-commons/en/assetrequest/cq-gen1678948801943/newid folder with new id.

 

Screenshot 2023-04-11 at 10.56.14 PM.png

 

i have added custom button 'Open Asset Form' on inbox action bar , 

Screenshot 2023-04-11 at 9.49.28 PM.png

Now the requirement is on click on Open Asset Form button redirecting to new page ,where i wanted to display properties stored under usergenerated.

 

can someone please guide me how to achieve this.

 

Thanks,

Durga kavali.

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@kavalidurga :Can you tell me how this workflow getting triggerd?

 

You can check in your workflow item or workflow id shows that /var/workflow .. Can you goto that path and check whether the path availble there or not 

 

Thanks,

Siva

Thanks,
Siva

View solution in original post

5 Replies

Avatar

Community Advisor

Hello @kavalidurga,
I think your problem is you have no clue which ID you will choose under cq-gen1678948801943 folder? Or you want to show all the properties under usergenerated parent node?

Avatar

Level 3

on every submit new folder will create under cq-gen1678948801943 as shared , i need to read properties stored under this new folder , folder id is just some random unique number.

Avatar

Community Advisor

@kavalidurga :

 

If i understand your requirement, On every submit , there is a entry created under /content/usergenerated/asset-share-commons/en/assetrequest/cq-gen1678948801943/  with new ID . 

 

Now when you click on open asset form , it will redirect to another page where you would like to display the data.

 

one of the way to achieve is, Assuming it , in your workflow , you will be getting  the /content/usergenerated/asset-share-commons/en/assetrequest/cq-gen1678948801943/newid . upon clicking on the openasset form, send the path as queryparamter while redirecting to another page.

 

In that page, you can have a javascript which will invoke upon the page load, and make an ajax call to Sling servlet with parameter.

Develop an sling servlet ( pass the path as request parameter) and write your logic read the data and respond back.

You can display the response from Sling servlet on to the page.

 

Thanks,

Siva

 

 

 

Thanks,
Siva

Avatar

Correct answer by
Community Advisor

@kavalidurga :Can you tell me how this workflow getting triggerd?

 

You can check in your workflow item or workflow id shows that /var/workflow .. Can you goto that path and check whether the path availble there or not 

 

Thanks,

Siva

Thanks,
Siva