Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Sort Tree Nodes of Browse Dialog in pathfield

Avatar

Level 9

Hi All,

I was trying the thing mentioned in the link[by directly uploading the package provided] 

http://experience-aem.blogspot.in/2014/04/aem-cq-56-sort-tree-nodes-of-browse-dialog-pathfield.html in OOTB 5.6.1 instance.

After I uploaded the package, hit the page http://localhost:4502/cf#/content/geometrixx-outdoors-mobile/en/men/pants.touch.html[Advanced Tab, Login page selection] in OOTB instance to check if it is working or not. But it doesn't seem to be working.

Is it something like 

- It is not applicable to the thing I am checking?

- Anything else needs to be done?

Any thoughts on the above will be helpful.

1 Accepted Solution

Avatar

Correct answer by
Employee

Hi, The blog post is about using pathfiled in component dialogs; in any component dialog using pathfield, make sure a "dialogopen" listener is registered 

dialogopen="function(){ExperienceAEM.sortTags(this, false);} "

In your case i guess it's a page dialog, getting items from /libs/foundation/components/page/fieldset_sitestructure.json.jsp

I am not suggesting any modification to /libs, but for it to work a "dialogopen" event has to be registered

View solution in original post

12 Replies

Avatar

Level 9

Hi All,

Any thoughts on the above will be helpful.

Avatar

Correct answer by
Employee

Hi, The blog post is about using pathfiled in component dialogs; in any component dialog using pathfield, make sure a "dialogopen" listener is registered 

dialogopen="function(){ExperienceAEM.sortTags(this, false);} "

In your case i guess it's a page dialog, getting items from /libs/foundation/components/page/fieldset_sitestructure.json.jsp

I am not suggesting any modification to /libs, but for it to work a "dialogopen" event has to be registered

Avatar

Level 9

Hi sreeknc,

Thanks a lot for your reply.

I do have any idea on the explanation you have provided. I thought I just need to install the package mentioned there and changes will be reflected.

Will try to go through these concepts and post back my queries/doubts.

Avatar

Level 9


Hi Scott,


First of all, thanks a lot for your reply.

I took a look at the documentation you have mentioned, but not able to understand anything.


I implemented the article on my local instance, by following your article and it seems to be working fine.http://helpx.adobe.com/experience-manager/using/creating-custom-cq-tree.html.

I was trying to understand the code you have written in http://helpx.adobe.com/experience-manager/using/creating-custom-cq-tree.html. Went through multiple times, but could not get a very good understanding.

Finding it tough to get that thing to work.

Avatar

Level 9

Hi Sreeknc,

Thanks a lot for your reply.

1] So, from what I understand is for the package provided in that link, I have to make some modifications to make it work? (such that the tree nodes apppear either in ascending or descending order as shown in http://experience-aem.blogspot.in/2014/04/aem-cq-56-sort-tree-nodes-of-browse-dialog-pathfield.html)

2] Also, what I am trying to achieve in my OOTB 5.6.1 instance is to have the tree nodes appear either in ascending or descending order , whenever such an option to select tree nodes appear.So, this code will not suffice and I have to make changes to it?

3] I went through the code provided in the link and could just get a overall picture of the logic. If you could briefly explain, would be helpful.

Your thoughts/pointers/sample code would be really really helpful.

Avatar

Level 9

Hi Sreeknc,

Any thoughts on the above post will be really helpful.

Avatar

Level 9

Hi All,

http://experience-aem.blogspot.in/2014/04/aem-cq-56-sort-tree-nodes-of-browse-dialog-pathfield.html

I was trying to implement this article in OOTB 5.6.1 instance. But I am struggling to get this to work on my instance.

I followed steps 1-4 provided in the article.

Doubts as below :

1] I am not sure where the code in step 5 has to be pasted.

2] In the diagram below step 5 ,there is a  tree structure created. I could not understand what exactly the nodes in tree structure below "select-path" indicate. If anybody could let me know what exactly it is. It would be really helpful.

3] If I want to create that tree structure, need details on the below:

select-path : what should the node type be ?

dialog : should the node type be cq:Dialog for this ?

items : should the node type be cq:WidgetCollection for this ?

tab1 : should the node type be cq:Widget for this ?

items : should the node type be cq:WidgetCollection for this ?

path : should the node type be cq:Widget for this ?

listeners : should the node type be nt:unstructured for this ?

4] What code should be pasted/written in select-path.jsp.

Any thoughts/pointers on this will be really helpful.

Avatar

Level 9

Hi All,

Any thoughts on the above will be really helpful.

Avatar

Level 9

Hi All,

Any thoughts on the above will be really helpful.

Avatar

Level 9

Hi All,

If someone could help me on this, so that I can implement it on my local instance.

It would be really helpful.

Avatar

Level 10

In the solve remark - you have to ensure that dialogopen event is defined.

Take a look at the out of the box samples - more information on that here:

http://dev.day.com/docs/en/cq/current/developing/widgets.html

. Did you take a look at this community artilce. It will help you in general component development for AEM - including working with event handlers, how to define them using scripts, and how to invoke backend services to get JCR data:

http://helpx.adobe.com/experience-manager/using/creating-custom-cq-tree.html

Also - be sure to use the AEM widget API reference located here:

http://dev.day.com/docs/en/cq/5-6/widgets-api/index.html

Avatar

Level 9

Hi Scott,

First of all, thanks a lot for your reply.

I took a look at the documentation you have mentioned, but not able to understand anything.

I implemented the article on my local instance, by following your article and it seems to be working fine.http://helpx.adobe.com/experience-manager/using/creating-custom-cq-tree.html.

I was trying to understand the code you have written in http://helpx.adobe.com/experience-manager/using/creating-custom-cq-tree.html. Went through multiple times, but could not get a very good understanding.

Finding it tough to get that thing to work.