Hi,

there is a org.jahia.data.containers.ContainerChainedFilter class that let
you build or, and, and not, ... combinations between several filters. Then
you can add the chained filter to the ContainerFilters instance as one
single filter.

Something like :

ContainerFilterByContainerDefinition allNewsFilter = ...;
ContainerFilterByCategories notWantedCategoriesFilter = ...;
int[] logics = {ContainerChainedFilter.AND,ContainerChainedFilter.ANDNOT};
ContainerFilterInterface[] filters =
   {allNewsFilter,notWantedCategoriesFilter};
ContainerChainedFilter filterChain = new  
   ContainerChainedFilter(filters,logics);


Regards,

Khue Nguyen



-----Original Message-----
From: Diego Rossi [mailto:[EMAIL PROTECTED] 
Sent: mardi, 23. mai 2006 15:03
To: [email protected]
Subject: Using ContainerFilterByCategories with [not in] clause

Hi, I would like to know if there's a way for using
ContainerFilterByCategories for obtaining containers that are not in the
set of categories passed to the containerFilters: example: retrieving
all the newsContainer that are not in the category 'headlines'.
Is there eventually another way for achieving this goal so to have the
containerList prefiltered in the template / jsp ?
Thankyou very much, bye. 



Reply via email to