Expand my Community achievements bar.

SOLVED

Image last selected path

Avatar

Level 3

Is it achievable for image component to have last selected path as the default path to select from.

Workflow using AEM 5.6.1:

  1. Add image component to the page
  2. Select an image from /dir1/dir2/dir3/image.png
  3. Add new image component to the page
  4. When you start selecting the image path it's starting from the directory /dir1/dir2/dir3

Thanks in advance!

1 Accepted Solution

Avatar

Correct answer by
Level 7

Hi,

The answer is yes, this could be done. All you have do is add a defaultValue property to your field and initially it should be empty. Now you need to add a listener to the dialog which would capture the path and set it in the default value property of the dialog in the onsubmit event. This is one way of doing it.

Thanks

Tuhin

View solution in original post

1 Reply

Avatar

Correct answer by
Level 7

Hi,

The answer is yes, this could be done. All you have do is add a defaultValue property to your field and initially it should be empty. Now you need to add a listener to the dialog which would capture the path and set it in the default value property of the dialog in the onsubmit event. This is one way of doing it.

Thanks

Tuhin