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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Dynamic multifilter

Avatar

Level 5

I would like to be able to build a dynamic multifilter component. Some of these multiple criteria come from AEM Tags and some can be dates and/or time. The idea is when one tag is selected then the next filter opens with more selection then the next and so on. The result from this filtering pattern is a list of resulting resources that meet all the selected criteria. The selected criteria can me written/read from the URL.

What would be a good approach to bild a dynmaic filter pattern that I could use for filtering different types of resources?

4 Replies

Avatar

Level 8

If the data is in AEM using querybuilder API with proper indexed data should work fine.

Make a custom servlet which call the different service layers depends on the filter and retrieve those back to front end as JSOn object and make every subsequent call be an asynchronous call to the servlet.

 

Avatar

Level 5

Thanks a lot @Manikumar 

Can you please elaborate what you had in mind when you write "call the different service layers depending on the filter"?

Yes, all the information is in AEM. All the tags and dates are properties of the resources I would like to filter.

Avatar

Level 8

1. Write servlet which is common to all the filter 

Ex: /aem/search/servlet

2. Servlet should be responsible for capturing the type of filter user selected (filter1, filter2)

3. Based on the filter/filters selected have a service with different query builder queries.

4. Map the result back to UI

 

Based on my understanding I hope this is what it works

Let me know if you need more information we can connect directly.