Expand my Community achievements bar.

SOLVED

Image multifield not showing on the page

Avatar

Level 5

Hello , 

I am trying to do nested multifield with Text and Image. I have created the dialog like the below and the values are stored in crxde. And I'm using sling model to display those multifield values on page. Text values are displaying but not the image . Can anyone help me. How to display image into page using Sling model in multifield. 

VanithaB1_0-1645424604307.pngVanithaB1_1-1645424647744.pngVanithaB1_2-1645424754828.png

 

In Crxde the imageReference image url is storing. So I want to write a sling model to retrieve that url and show that corresponding image to my image. But I don't know how to write sling model for image can anyone help me please?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor
3 Replies

Avatar

Correct answer by
Community Advisor

Avatar

Community Advisor

1. Check if the image property is injected into your sling model class with same name or not.

2. Make sure you have getter method to read the injected image property in HTL code.

 

If possible please attach the sample code of your sling model to analyse more.

Hope this will be helpful happy coding

 

Please find the reference link for reading the multifield in AEM

https://levelup.gitconnected.com/aem-how-to-use-nested-multifields-in-your-components-using-a-sling-...

 

Avatar

Level 5

Hi @Mani_kumar_ Thank you. The above issue is resolved. I'm trying one custom component (nested multifield) after I added the image I can't see it's thumbnail in the drag & drop section like the below. Can you guide me, how to create image thumbnail for this ?

 

VanithaB1_1-1645514862692.png

Here I have selected the image and it got rendered on the page but when I close and open again I can't see the image.

VanithaB1_2-1645514928466.png