Save Filtering during navigation

Hi!

I have an overview-View which contains filters, once i filter it shows search result. If i click a search result and return to the overview, the filter is gone.

I think this is because the View per default is request scoped?

No i am evaluating how i safe the filter. The filter should not be persitent for ever, only per Session, thats why i thought to get the View Session Scoped. Another idea was to save the selected filters in the browsers local storage or cookie.

I would like to participate from your experience, does anyone has a best pratice info for me?

Either UIScope / RouteScope if it’s something private or use the URL to make it bookmark able

1 Like

Ah thats smart using the URL! Yep thats a really good idea, thank you very much!

Hi Nico,

If you store the filter values in the session and users navigate with the browsers back/forward button, users may sometimes report unexpected results because they don’t notice what filters are set (or not set).

If you use url parameters, back/forward buttons will have predicable behavior.

1 Like

Thanks for sharing your experience. Works really really well with URL Parameter, this also helps to save bookmarks/favorites in browser.