CollectionLoader managing

Hi,

I’m trying to filter the Collection Loader of a view list without success.

The query from the xml is a simple: “select e from table e”.

Now… I need to filter the results list based on the value of a field (the username of the logged user wich is a field of this table).

I solved the problem building a generic filter and applying it into the onBeforeShow listener event.

The problem is: if a generic filter is set after the page loads I lose the filter on the username. I need the eventual filter to work in conjunction with the previous filter on the username.

JMIX version is 2.2.1

Thank you very much!

You can add filter direct into query

select e from Customer e where e.manager.username= :current_user_username

See JPQL Extensions :: Jmix Documentation