The Path Filter component displays controls that allow an end-user to refine search’s based on pre-defined Asset folder path restrictions. Path filters can either be single select or multi-select; at this time only checkboxes support multi-select.
AEM 6.3.2.2 bug warning
The Granite UI pathfield (which this component relies on) does function properly in AEM 6.3.2.2 (AEM 6.3 SP2 + Cumulative Fix Pack 2) causing the component dialog to improperly save path values during dialog authoring.
Please upgrade AEM to 6.3.3 (AEM 6.3 SP3) or later. See Github Issue #346 for details.
Authoring
Dialog / Filter tab
Type
The form controls to display for this filter.
- Checkboxes (Multi select)
- Radio buttons (Single select)
- Drop-down (Single select)
- Slider (Single select)
- Toggle (Single select)
Title
Label for the filter.
Auto-Search on Change
Select to automatically perform a search whenever the end-user selected filter criteria of this component changes.
Start Expanded
Select to initially display the component filter in an expanded mode, showing the selection options.
Source
Enumerates available filter options (ie. values)
- Local
- User-defined list of Labels and comma delimited Paths
- Paths MUST start with
/content/dam
- Paths MUST start with
- Active: Check to default this value to selected.
- Disabled: Check to prevent users from changing this selection.
- User-defined list of Labels and comma delimited Paths
- Datasource
- Sling resource type for the Granite UI DataSource to populate the options.
- This resource type is implemented and provided by the IT delivery team.
Dialog / Search Behavior tab
Auto-Search on Change (v1.3.0)
Select to automatically trigger as search any time the selected value changes.
Update on Search
Specifies if the component’s view should be refreshed after each search.
- Never
- The Default value.
- Do not replace the view of the component on search.
- Typically set to Never unless the search options vary based on the current search state.
- Replace
- Replace the view of the component on search.
Technical details
- Component:
/apps/asset-share-commons/components/search/path
- Sling Model:
com.adobe.aem.commons.assetshare.search.predicates.impl.PathPredicateImpl
This filter leverages AEM Query Builder’s PathPredicateEvaluator.
Example generated Query Builder predicate output:
1_group.1_path=/content/dam/my/assets
1_group.2_path=/content/dam/my/other/assets
This filter component forces the following AEM QueryBuilder Path Predicate properties:
exact
=false
- if exact is true/on, the exact path must match, but it can contain simple wildcards (), that match names, but not “/”; if it is false (default) all descendants are included.*
flat
=false
- searches only the direct children (like appending “/” in xpath) (only used if ‘exact’ is not true, optional)*
self
=true
- searches the subtree but includes the base node given as path (no wildcards)