Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Trying to set the image path Dynamically

Avatar

Avatar
Validate 1
Level 2
keerthid7215849
Level 2

Likes

9 likes

Total Posts

29 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
keerthid7215849
Level 2

Likes

9 likes

Total Posts

29 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile
keerthid7215849
Level 2

21-06-2017

Hi,

I'm trying to set the image in the smart image panel according to the dropdown value.

I tried to the change the value like below

"dialog.getField("./file").fileReferenceField.setValue(result.image);"

dialog.getField("./file").referencedFileInfo.dataPath = result.image;

dialog.getField("./file").originalRefImage.dataPath = result.image;

Nothing worked. Can anyone help me to achieve this.

Thank you in advance

Replies

Avatar

Avatar
Validate 1
Level 2
keerthid7215849
Level 2

Likes

9 likes

Total Posts

29 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
keerthid7215849
Level 2

Likes

9 likes

Total Posts

29 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile
keerthid7215849
Level 2

22-06-2017

This is kind of urgent requirement for me to do. Any help!!

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,408 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,408 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

22-06-2017

Check this post adding images dynamically in smart image http://experience-aem.blogspot.com/2013/12/aem-cq-56-adding-images-in-multifield.html

var image = this.find('xtype', 'imagemultifieldsmartimage')[0];

       var fileRefParam = image.fileReferenceParameter;

        image.fileReferenceParameter = fileRefParam.substr(fileRefParam.lastIndexOf("/") + 1);

        image.processRecord(recCopy, imagePath);

        image.fileReferenceParameter = fileRefParam;

Avatar

Avatar
Establish
MVP
Veena_Vikram
MVP

Likes

471 likes

Total Posts

1,039 posts

Correct Reply

121 solutions
Top badges earned
Establish
Coach
Contributor 2
Seeker
Ignite 5
View profile

Avatar
Establish
MVP
Veena_Vikram
MVP

Likes

471 likes

Total Posts

1,039 posts

Correct Reply

121 solutions
Top badges earned
Establish
Coach
Contributor 2
Seeker
Ignite 5
View profile
Veena_Vikram
MVP

22-06-2017

Hi Keerthi

     Could you please provide little more insight to your query ?

1) Are you using touch UI ?

2) How are you fetching the image dynamically ? What will be the object type you might have to set to the field you are trying to set ?

    

     Let us know is you have any additional customization you are trying to do to achieve this

Thanks

Veena

Avatar

Avatar
Validate 1
Level 2
keerthid7215849
Level 2

Likes

9 likes

Total Posts

29 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
keerthid7215849
Level 2

Likes

9 likes

Total Posts

29 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile
keerthid7215849
Level 2

22-06-2017

Hi Veena,

I'm trying this in classic UI and fetching as JSON through ajax.

I wrote a listener for the drop down with"selectionchanged" event. Once the dropdown value changes, the value append to the request and the response is JSON with all the element. In that imagepath is one of them. I'm setting all the values to particular fields. Now got struck with the smartimage field. I wanna set the path in smartimage as the other fields. This is my requirement.

Thanks