Depending on the user logged in, I need to filter out some entities from the list views and search results, so that some users only see some of the entities.
In a previous post Javier showed me how to filter out entities of a collection, and that's ok, but what I really need is apply such filter to the list of entities that come up when clicking on a module too (e.g. filtering entities of the same model the user is looking at).
How can I filter, programmatically, which entities should be shown?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I attached you a fragment of my book with an example of filtering data by user. Although the code is using OpenXava 4.x, all the code is perfectly valid with current v7.
Depending on the user logged in, I need to filter out some entities from the list views and search results, so that some users only see some of the entities.
In a previous post Javier showed me how to filter out entities of a collection, and that's ok, but what I really need is apply such filter to the list of entities that come up when clicking on a module too (e.g. filtering entities of the same model the user is looking at).
How can I filter, programmatically, which entities should be shown?
Hi Lucio:
You can achieve that combining a IFilter with a baseCondition in the @Tab:
https://openxava.org/OpenXavaDoc/docs/tab_en.html
I attached you a fragment of my book with an example of filtering data by user. Although the code is using OpenXava 4.x, all the code is perfectly valid with current v7.
Help others in this forum as I help you.