Expand my Community achievements bar.

SOLVED

Pathfield element in a dialog box

Avatar

Level 2

We have a list of images prepared by a component as shown in the figure below

 

Now we are facing a situation where we need to select these images by browsing the repository.

But if we use a path field component for this functionality (we have set the root folder for this structure),  the pathfield explorer window is not showing the image nodes.

For example, from the image, the explorer window will only show till best-A and best-B and not the the nodes below these.

Is this as expected? If so please give some pointers to solve our issue.

Thanks in advance

1 Accepted Solution

Avatar

Correct answer by
Level 10

pathfield will list all nodes and not the content nodes. in your case all the images are present under 'jcr:content' which is a content node of best-A and best-B and hence it would not be displayed. 

Please upload all your images under dam and use pathfield to select the image from the list.

View solution in original post

4 Replies

Avatar

Level 10

WHen you use Path Finder in a dialog - the author clicks on it and gets images located in the JCR

Now you can see that the images are present. To see how you can build a dialog that uses a PathFinder - see this AEM community article: 

Creating Adobe Experience Manager Components that use Standard Tag Libraries

Avatar

Correct answer by
Level 10

pathfield will list all nodes and not the content nodes. in your case all the images are present under 'jcr:content' which is a content node of best-A and best-B and hence it would not be displayed. 

Please upload all your images under dam and use pathfield to select the image from the list.

Avatar

Level 2

bsloki wrote...

pathfield will list all nodes and not the content nodes. in your case all the images are present under 'jcr:content' which is a content node of best-A and best-B and hence it would not be displayed. 

Please upload all your images under dam and use pathfield to select the image from the list.

 

Hi Lokesh,

Thanks a lot.
This is the exact issue i'm facing, my best-A and best-B are holding a list of references (jcr:content) to dam resources (this list is created with a component). I'm trying to show these nodes to another component.

To make things easy for the author  my first preference was "pathfield" for this, but from your reply, I understand that this may not solve my issue.
Is there any pointers to solve the issue with current structure as I need to follow the current structure.

 

Avatar

Level 10

As lokesh and Scott mentioned you cannot use pathfield for content nodes,

You can create a simple OSGI service, this service will read all node value inside Best A, Best B and and these value will be shown in a drop down. You need to dynamically populate a drop down for with these value. Take a look @ https://helpx.adobe.com/aem-forms/6/dynamically-populate-dropdowns.html which will dynamically populate  a drop down with some values.