Dynamic multifilter | Adobe Higher Education
Skip to main content
Level 6
November 10, 2022

Dynamic multifilter

  • November 10, 2022
  • 1 reactie
  • 1296 Bekeken

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?

Er kunnen geen reacties meer worden geplaatst op dit onderwerp.

1 reactie

Mani_kumar_
Community Advisor
Community Advisor
November 13, 2022

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.

 

anasusticAuteur
Level 6
November 14, 2022

Thanks a lot @mani_kumar_ 

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.

Mani_kumar_
Community Advisor
Community Advisor
November 14, 2022

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.