Expand my Community achievements bar.

SOLVED

How to use a List of nodes as the Source in the Core Form Options component?

Avatar

Level 2

The Core Form Options component has a dialog field called Source which allows you to select a list of nodes from the path browser to make up the options in a dropdown list.

I have a node of jcr:primaryType = nt:unstructured with multiple child nodes of the same type that have String properties for text and value. When I try to select the parent node from the dialog, it does not show up in the path finder. I am able to manually enter the path to the parent node in the dialog field, and the dropdown list correctly populates, but only in authoring mode. When published, the dropdown field does not show on my page, presumably because it cannot resolve the path to the node.

Are there certain properties I'm missing on the node(s)? What do I need to do to get this to work correctly? I am on 6.4.2.

1 Accepted Solution

Avatar

Correct answer by
Level 2

The dropdown is now correctly populating in my published instance. I believe the issue was related to the webserver cache. I'm still not sure why the pathfinder does not allow me to select the node itself, but filling out the path manually and uploading the node to the published server via a content package to activate seems to work.

View solution in original post

8 Replies

Avatar

Level 10

Are you using a component dialog field here?

Avatar

Level 2

In the Form Options component dialog, I am using the dialog field called Source and I have it set to 'List'. After selecting List, a new path field shows up which should allow me to select a path in my JCR where I've created nodes to represent dropdown items, but the nodes do not show up so I have to manually enter the path. Entering the path manually successfully populates the dropdown list in authoring mode, but not in published mode. I am not sure if the issues related to the nodes not showing in the path finder and the dropdown not showing in published mode are related. For now I would just like to get the dropdown items to show up in published.

Avatar

Level 2

Bump. I still haven't been able to get the dropdown list to populate in a published environment. Here is what my dialog fields look like:

Screen Shot 2019-03-11 at 13.37.04.png

/content/countries is a node in my JCR with child nodes that look like this:

Screen Shot 2019-03-11 at 13.38.49.png

Is there something I'm missing?

Avatar

Level 10

You stated -- "I still haven't been able to get the dropdown list to populate in a published environment."

Are you trying to set a component dialog on PUBLISH?

Avatar

Level 2

These are the steps I am taking:

1. Author the page with the form component from the authoring server

2. Manually type in /content/countries into the 'List' field because the pathfinder cannot find that node in the JCR

3. View the page in authoring mode and see that the dropdown list correctly populates with the data from the child nodes under /content/countries

4. Publish the page

5. View the page in the published environment and see that the dropdown field does not show at all (I think the dropdown hides itself if it thinks there aren't any options provided)

6. Try to activate/publish the /content/countries node using the Tree Activator, however the Tree Activator cannot find the node either

7. Package the /content/countries node from authoring and upload/install the node to the published server (4503) to activate it that way

8. See that the dropdown still does not show on the published page

Avatar

Level 10

Can you please show a screen shot of the component and its nodes you are using. There may be another way to do what you are trying to accomplish.

In case you missed something - here is the technical docs - aem-core-wcm-components/content/src/content/jcr_root/apps/core/wcm/components/form/options/v2/option...

Avatar

Correct answer by
Level 2

The dropdown is now correctly populating in my published instance. I believe the issue was related to the webserver cache. I'm still not sure why the pathfinder does not allow me to select the node itself, but filling out the path manually and uploading the node to the published server via a content package to activate seems to work.

Avatar

Level 10

I am happy to hear its working for you.