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

Avatar

Avatar

Rob_Curran__T4G

Avatar

Rob_Curran__T4G

Rob_Curran__T4G

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?

View Entire Topic

Avatar

Avatar

FreedomMarketin

Avatar

FreedomMarketin

FreedomMarketin

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).