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

Custom Search Form - Options Predicate with JSON Source Fails - AEM 6.2

Avatar

Avatar
Validate 10
Level 2
Rob_Curran__T4G
Level 2

Likes

6 likes

Total Posts

46 posts

Correct Reply

3 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 10
Level 2
Rob_Curran__T4G
Level 2

Likes

6 likes

Total Posts

46 posts

Correct Reply

3 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
Rob_Curran__T4G
Level 2

24-06-2016

Customizing the "Assets Admin Search Rail" search form.

Adding a new options predicate with a "JSON Path" source results in a filter that doesn't work.

Specifically, add an "Options Predicate" and configure the following settings:

  • Field Label - whatever
  • JSON Path - Path to json object in repo (eg. /apps/appname/rights.txt)  which as the following content:

// Rights Management

{

"options": [ { "value": "royalty_free", "text": "Royalty Free" }, { "value": "rights_managed", "text": "Rights Managed" }, { "value": "restricted", "text": "Restricted" } ] }

 

  • Property Name - /jcr:content/metadata/client/usage_rights

This will result in a filter showing up with the correct options based on the JSON.  However, selecting them has not impact on the filter and the selected options does NOT show up in the search bar above.

 

Alternatively, if you create a node structure for the options instead it does work as desired.

Add a new options predicate to the search form. However instead of setting the JSON Path, set the Option Path parameter to point to a node containing the appropriate options.  In this case the selected options in the filter DO impact the results and the selections do show in the search bar at the top.

I'd like to drive options predicates from JSON.  Why doesn't this work?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 5
Employee
ukgaurav
Employee

Likes

15 likes

Total Posts

86 posts

Correct Reply

31 solutions
Top badges earned
Boost 5
Boost 3
Boost 10
Boost 1
Affirm 5
View profile

Avatar
Boost 5
Employee
ukgaurav
Employee

Likes

15 likes

Total Posts

86 posts

Correct Reply

31 solutions
Top badges earned
Boost 5
Boost 3
Boost 10
Boost 1
Affirm 5
View profile
ukgaurav
Employee

28-06-2016

Review Attached exercise doc. Should be helpful.

-Gaurav

Answers (2)

Answers (2)

Avatar

Avatar
Boost 5
Employee
ukgaurav
Employee

Likes

15 likes

Total Posts

86 posts

Correct Reply

31 solutions
Top badges earned
Boost 5
Boost 3
Boost 10
Boost 1
Affirm 5
View profile

Avatar
Boost 5
Employee
ukgaurav
Employee

Likes

15 likes

Total Posts

86 posts

Correct Reply

31 solutions
Top badges earned
Boost 5
Boost 3
Boost 10
Boost 1
Affirm 5
View profile
ukgaurav
Employee

17-10-2016

is this query still open or if you are able to find solution

Avatar

Avatar
Establish
Level 3
FreedomMarketin
Level 3

Likes

23 likes

Total Posts

27 posts

Correct Reply

22 solutions
Top badges earned
Establish
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Establish
Level 3
FreedomMarketin
Level 3

Likes

23 likes

Total Posts

27 posts

Correct Reply

22 solutions
Top badges earned
Establish
Boost 5
Boost 3
Boost 10
Boost 1
View profile
FreedomMarketin
Level 3

07-09-2016

To save anyone the trouble of downloading the word doc above, it does not provide any help to address the original question.  Generic training doc that points to a non-existent JSON (at least in 6.1).