Subscribe via Feed

XPages Multi-level Category Filtering - categoryFilter enhancement in Notes Domino 852

Paul Hannan, Aug 18, 2010 9:53:45 AM

The multi-level category filter is a new enhancement in Notes Domino R852. It's an addition to the categoryFilter feature in the View data source that allows you to filter a view by the category and then the sub-category. It's a neat way for refining your view document collection even further than just by the main category.

For example, setting categoryFilter="Fruit" will display all documents under the 'Fruit' category, while categoryFilter="Fruit\Apples" displays the documents under the 'Fruit' category and the 'Apples' subcategory.

For a slightly more advanced example, take the XPages Demo App from OpenNTF - and hitting the category filtering example - http://yourDominoServer/xpages.nsf/viewFilteringCategory.xsp 

This sample xpage has a viewPanel that displays a Notes view which has categories as well as subcategories. There is also a combo box which drives the categoryFilter - when a selection is made a refresh happens to the view panel and it then displays only the documents of that category. 

...                                 value="#{viewScope.filterCat01}">
                    
                    

                    
                        
                    

                                            refreshMode="partial" refreshId="viewPanel4CategorizedView">
                    

                   
                

               
                
...
                    
                                                    viewName="xspFiltersViewCategory"
                            categoryFilter="#{javascript:viewScope.filterCat01}">
                        
...

With 852, we can now take advantage of this new multi-level category by adding another selectitem to the combobox that combines the main category with the subcategory to filter the view.
...                                 value="#{viewScope.filterCat01}">
                    
                    

                    
                        
                    

                                            refreshMode="partial" refreshId="viewPanel4CategorizedView">
                    

                                            itemLabel="***Multilevel Categories*** ">

                    
                        +"\\"+
@DbColumn(@DbName(),"xspFiltersView",2))}]]>

                    

                

...

 

 

One limitation you might experience with this enhancement is when the sorting of the subcategory column is determined partly by a preceding column in the categorized Notes view. Here the subcategory filtering will work up to a certain point (where the subcategory sorting is changed by a preceding column sorting) in XPages. For this issue (PHAN87ALDT) we're seeking to address in the next release of Notes Domino.

 

Hope this helps.

p.

 

 

 



4 responses to XPages Multi-level Category Filtering - categoryFilter enhancement in Notes Domino 852

Paul Hannan, August 19, 2010 6:53 AM

@Dick - there is a way but you're using a different property to categoryFilter. You need to use 'keys' for sorted un-categorized columns.
For filtering two columns you can use vectors - I've an example somewhere on this. I'll post it to the blog soon.
p.


Dick Stagnone, August 18, 2010 6:18 PM

Are there any examples out there which demo filtering of more than two columns, uncategorized columns. Looking for something similar to Excel filters.


Paul Hannan, August 18, 2010 1:45 PM

@Sean, is that metric or imperial measurement to the 24th? ;-)
And more 99% fact than rumour! :D
p.


Sean Cull, August 18, 2010 1:17 PM

7200 seconds and counting until the 24 th ( as runmoured )