Expand my Community achievements bar.

SOLVED

Retrive Image

Avatar

Level 2

I created two image tabpanel in a component.

i can able to retrieve only one, how i can retrieve two value in JSTL.

Dialog as follows.

<backImage
 jcr:primaryType="cq:Widget"
 cropParameter="./backImage/imageCrop"
 ddGroups="[media]"
 fileNameParameter="./backImage/fileName"
 fileReferenceParameter="./backImage/fileReference"
 mapParameter="./backImage/imageMap"
 name="./backImage/file"
 requestSuffix="/backImage.img.png"
 rotateParameter="./backImage/imageRotate"
 sizeLimit="100"
 title="Background Image"
 xtype="html5smartimage">
 <items jcr:primaryType="cq:WidgetCollection">
  <resType
   jcr:primaryType="cq:Widget"
   ignoreData="{Boolean}true"
   name="./backImage/sling:resourceType"
   value="foundation/components/image"
   xtype="hidden"/>
 </items>
</backImage>

<frontImage>
 jcr:primaryType="cq:Widget"
 cropParameter="./frontImage/imageCrop"
 ddGroups="[media]"
 fileNameParameter="./frontImage/fileName"
 fileReferenceParameter="./frontImage/fileReference"
 mapParameter="./frontImage/imageMap"
 name="./frontImage/file"
 requestSuffix="/frontImage.img.png"
 rotateParameter="./frontImage/imageRotate"
 sizeLimit="100"
 title="Background Image"
 xtype="html5smartimage">
 <items jcr:primaryType="cq:WidgetCollection">
  <resType
   jcr:primaryType="cq:Widget"
   ignoreData="{Boolean}true"
   name="./frontImage/sling:resourceType"
   value="foundation/components/image"
   xtype="hidden"/>
 </items>

</frontImage>

I can retrieve only value using${properties.fileReference}.

if i give ${properties.backImage} - am getting blank value.

Can we use ${properties.backImage/fileReference}?

Do we need to use same name as in foundation/components/image?

Can any one please explain how i can retrieve two images?

 

Thanks in advance.

1 Accepted Solution

Avatar

Correct answer by
Level 10
5 Replies

Avatar

Level 2

Thanks Edubey,

I can retrieve images and it's showing in page.

But in dialog, it's showing some other images.[img]Screen Shot 2015-08-12 at 12.10.33 PM.png[/img]

Avatar

Level 10

Can you try to delete this component and re-author it. Let me know if you are able to replicate it.

Avatar

Level 2

I deleted and re-author component, now images are not showing in dialogs.

it's available in page.

Avatar

Correct answer by
Level 10