since ‎22-02-2021
‎12-03-2021
rajaram33
Level 1
Re: data-sly-list iteration for a JsonArray
Avatar

rajaram33

rajaram33
- Adobe Experience Manager
Kiran please suggest how to parse the list in this case in htl which has the json array populated at model.I am struglling at htl to get the value

Views

94

Likes

0

Replies

0
Re: data-sly-list iteration for a JsonArray
Avatar

rajaram33

rajaram33
- Adobe Experience Manager
I tried adding Json Array to array list but when i try to access it in htl like this ${child.label} Value: ${child.href}

Views

98

Likes

0

Replies

0
Re: data-sly-list iteration for a JsonArray
Avatar

rajaram33

rajaram33
- Adobe Experience Manager
Hi @BrianKasingli @KiranVedantam1992 ,I tried as suggested by creating a Link with hashmap public List> getListItem(JSONObject taxanomyDat) { log.info("Inside Model getDemoItem"); List> prodArrayList = new ArrayList>(); Map siteLink = new LinkedHashMap(); siteLink.put("label1", "www.gmail.com"); siteLink.put("label2", "www.yahoo.com"); prodArrayList.add((HashMap) siteLink); return prodArrayList; } public List> getDemoItem() { return demoItem; } And in HTL i am not sure What mistake i am doing or...

Views

118

Like

1

Replies

1
Re: data-sly-list iteration for a JsonArray
Avatar

rajaram33

rajaram33
- Adobe Experience Manager
Hi Brian,

Views

109

Likes

0

Replies

0
Re: data-sly-list iteration for a JsonArray
Avatar

rajaram33

rajaram33
- Adobe Experience Manager
Let me try both options and get back soon please do not close this as resolved

Views

133

Likes

0

Replies

0
data-sly-list iteration for a JsonArray
Avatar

rajaram33

rajaram33
- Adobe Experience Manager
Hi AEM Gurus, I have a JSON Array like below sample {"sites": {"label": "Parent LABEL","mobileLabel": "Parent Mobile Label","items": [{"href": "www.google.com","id": "goog","label": "Google Search"},{"href": "www.yahoo.com","id": "yah","label": "yahoo site"},{"href": "www.wikipedia.com","id": "wiki","label": "wikipedia"}]}}Now i am trying to Iterate and get the values from this JSON array using data-sly-list something like as shown in below structure${key.label} - ${key.id}I know we can iterate ...

Views

228

Likes

0

Replies

8
Fetching Parent Page Properties from Experience Fragment Component
Avatar

rajaram33

rajaram33
- Adobe Experience Manager
Hi All,I have a header component which uses a experience Fragment and in this XF i have a header component mapped. This Experience Fragment is been used inside my home page editable template. Now i am trying to access a page properties from my home page inside this header component mapped to Experience FragmentPage Template > XF > Header Component(Access Page Properties).Below is my code inside the header component model@Self Resource resource; @PostConstruct protected void init() { try { Inheri...

Views

127

Likes

0

Replies

1
Likes from