Pathfield element in a dialog box | Community
Skip to main content
jond1978
Level 2
October 28, 2015
Solved

Pathfield element in a dialog box

  • October 28, 2015
  • 4 replies
  • 2442 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Lokesh_Shivalingaiah

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.

4 replies

smacdonald2008
Level 10
October 29, 2015

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

Lokesh_Shivalingaiah
Lokesh_ShivalingaiahAccepted solution
Level 10
October 29, 2015

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.

jond1978
jond1978Author
Level 2
October 29, 2015

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.

 
edubey
Level 10
October 30, 2015

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.