Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

AEM6.3 coral touch ui building custom predicate for Pathbrowser or pathfield

Avatar

Avatar
Validate 25
Level 4
srinivas_chann1
Level 4

Likes

21 likes

Total Posts

222 posts

Correct Reply

6 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Ignite 5
Ignite 3
View profile

Avatar
Validate 25
Level 4
srinivas_chann1
Level 4

Likes

21 likes

Total Posts

222 posts

Correct Reply

6 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Ignite 5
Ignite 3
View profile
srinivas_chann1
Level 4

19-11-2019

Hi ,

On touch ui dialog ,I am using pathbrowser with predicate as "nosystem"  this shows all the sub-nodes available on the page components. But the issue I have is,it shows the sub-nodes of the components available on the page also ,which we don't need.

We would want to restrict the node level  only to nodes below par to "/content/page/jcr:content/par/..."  .

<reference

                                        jcr:primaryType="nt:unstructured"

                                        sling:resourceType="granite/ui/components/coral/foundation/form/pathbrowser"

                                        fieldLabel="Reference"

                                        margin="{Boolean}true"

                                        name="./path"

                                        predicate="nosystem"

                                        rootPath="/content"/>

Please let me know how this could be achieved.  I saw few examples as https://stackoverflow.com/questions/41677562/how-to-filter-the-pages-visible-in-an-aem-granite-ui-pa...

But i would  want a full sample code of AbstractNodePredicate  which i could use and change. Please help

Thanks

Replies

Avatar

Avatar
Validate 25
Level 4
srinivas_chann1
Level 4

Likes

21 likes

Total Posts

222 posts

Correct Reply

6 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Ignite 5
Ignite 3
View profile

Avatar
Validate 25
Level 4
srinivas_chann1
Level 4

Likes

21 likes

Total Posts

222 posts

Correct Reply

6 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Ignite 5
Ignite 3
View profile
srinivas_chann1
Level 4

20-11-2019

I noticed that for pathfield it is mentioned with property as filter. So in that case i need to write custom filter ,could some provide  sample code will be helpful.

<reference

                                        jcr:primaryType="nt:unstructured"

                                        sling:resourceType="granite/ui/components/coral/foundation/form/pathfield"

                                        fieldLabel="Reference"

                                        margin="{Boolean}true"

                                        name="./path"

                                        filter="nosystem"

                                        rootPath="/content"/>