353 Lotus blogs updated hourly. Who will post next? Home | Downloads | Events | Jobs | Twitter | Bookmarks | Pods | Forum | Blogs | Search | myPL | About 
 
Latest 7 Posts
Chris Toohey: Video - XPage Custom Controls for IBM Lotus Notes and Domino
Sun, Jun 12th 2011 78
Tim Tripcony: What the heck is a bean?
Sun, Jun 12th 2011 75
Students using XPages video and more...
Thu, Jun 9th 2011 58
Steve Castledine: XPages Layout Framework Template (OneUI) Video
Tue, Jun 7th 2011 81
Video: Using the XPages Extension Library Dojo Grid and REST Services Controls
Mon, Jun 6th 2011 49
The MWLUG 2011 XPrize Design Competition
Mon, Jun 6th 2011 30
[Lotusphere 2011 Rewind] - XPages Extension Library: Making Application Development Even Easier
Mon, Jun 6th 2011 71
Top 10
XPages multi-column filtering using a vector of non-categorized columns
Fri, Aug 20th 2010 83
Steve Castledine: XPages Layout Framework Template (OneUI) Video
Tue, Jun 7th 2011 81
XPages Multi-level Category Filtering - categoryFilter enhancement in Notes Domino 852
Thu, Aug 19th 2010 79
Chris Toohey: Video - XPage Custom Controls for IBM Lotus Notes and Domino
Sun, Jun 12th 2011 78
Tim Tripcony: What the heck is a bean?
Sun, Jun 12th 2011 75
[Lotusphere 2011 Rewind] - XPages Extension Library: Making Application Development Even Easier
Mon, Jun 6th 2011 71
XPages and Beginner's Java Part II on Notes In Nine
Fri, Oct 8th 2010 67
Calling all ISV's, Consultants and Others offering XPages Products and Services
Thu, Mar 31st 2011 67
Intec Blog: Maximising the Benefits of XPages in 8.5.2 Whitepaper
Sun, Jun 5th 2011 65
XPages Week in Review No. 4
Tue, Oct 19th 2010 62


XPages multi-column filtering using a vector of non-categorized columns
Paul Hannan    

As requested and hot on the heels of yesterday's post on multi-level categoryFiltering enhancement, here is an example of how you can filter multiple sorted non-categorized columns with a vector. And here we're using the 'keys' property which allow you to filter a view of sorted non-categorized columns.

For this example you won't have to wait until 852 is out next Tuesday, this is something you can do right now. And again we're going to use the XPages Demo App from OpenNTF to show this in action.

So here's what we got.

Firstly we got three comboboxes and the selection of these will form our vector for which the view with the three corresponding columns will be filtered. Each value is bound to a scoped variable.

<xp:comboBox id="comboBox1" value="#{requestScope.val01}">
 <xp:selectItem itemLabel="Select Text"itemValue=""/>
 <xp:selectItems>
  <xp:this.value>
   <![CDATA[${javascript:
    @Unique(@DbColumn(@DbName(),"xspFiltersView",1))}]]>
  </xp:this.value>
 </xp:selectItems>
</xp:comboBox>
<xp:comboBox id="comboBox2" value="#{requestScope.val02}">
<xp:selectItem itemLabel="Select Text"     itemValue=""/>
<xp:selectItems>
 <xp:this.value>
  <![CDATA[${javascript:
    @Unique(@DbColumn(@DbName(),"xspFiltersView",2))}]]>
  </xp:this.value>
</xp:selectItems>
</xp:comboBox>
<xp:comboBox id="comboBox3" value="#{requestScope.val03}">
 <xp:selectItem itemLabel="Select Text"    itemValue=""/>
 <xp:selectItems>
  <xp:this.value>
   <![CDATA[${javascript:
    @Unique(@DbColumn(@DbName(),"xspFiltersView",3))}]]>
  </xp:this.value>
</xp:selectItems>
</xp:comboBox>
<xp:button value="Filter View" id="button2">
 <xp:eventHandler event="onclick"
    submit="true" refreshMode="complete" immediate="false"
    save="true">
 </xp:eventHandler>
</xp:button>

 

Then we use the scoped variables to calculate vector.

<xp:viewPanel rows="30" id="viewPanelFilter1">
...
 <xp:this.data>
  <xp:dominoView var="xspFiltersView" viewName="xspFiltersView">
   <xp:this.keys>
    <![CDATA[#{javascript:
     var vtr:java.util.Vector = new java.util.Vector();
     var t1 = requestScope.val01;
     var t2 = requestScope.val02;
     var t3 = requestScope.val03;
     @If(t1 !=null,vtr.addElement(t1),vtr.addElement(""));    
     @If(t2 !=null,vtr.addElement(t2),vtr.addElement(""));
     @If(t3 !=null,vtr.addElement(t3),vtr.addElement(""));
     return vtr}]]>
   </xp:this.keys>
  </xp:dominoView>
 </xp:this.data>
...

So let's have a look at this in action. We got our three comboboxes which we're using to form our vector.

Selecting a value from the first combobox and then hitting the Filter View button composed the vector to filter the view with the value from the first column and then null for the following two columns.

Selecting a value from the second combobox along with the first computes the vector with two values and null for the third column.

Filling out the vector with a third selection completes the filtering options.

Hpe this helps.

p.

 



---------------------
http://xpagesblog.com/xpages-blog/2010/8/20/xpages-multi-column-filtering-using-a-vector-of-non-categori.html
Aug 20, 2010
84 hits



Recent Blog Posts
78


Chris Toohey: Video - XPage Custom Controls for IBM Lotus Notes and Domino
Sun, Jun 12th 2011 10:40p   Bruce Elgort
[read] Keywords: domino ibm lotus notes
75


Tim Tripcony: What the heck is a bean?
Sun, Jun 12th 2011 10:31p   Bruce Elgort
For those of you who are wondering about what the heck managed beans are and how they related to all things XPages I highly recommend reading Tim Tripcony's blog entry entitled "What the Heck is a Bean" which he orginally posted on May 5, 2011. Also, the Mastering XPages book does a good job of explaining managed beans. I am very thankful for both Tim's article and the Mastering XPages book as both of these resources helped me out today preparing some material for my "Social Business Toolki [read] Keywords: xpages
58


Students using XPages video and more...
Thu, Jun 9th 2011 9:59a   Bruce Elgort
In the Fall of 2010 students in the ICT Technology cirriculum at ROC Mandriaan have developed a real-world relationship management system XPages application for the Round Texel Regatta with mentoring from "Lotus Loves People". Here is a video of the students talking about the app (English subtitles are supplied): Here is a copy of the slide deck showing the app that they build: XPages Project Mondriaan ROC View more presentations from Rob Bontekoe And also a blog entry by Rob Bontekoe. T [read] Keywords: ibm lotus xpages application google twitter
81


Steve Castledine: XPages Layout Framework Template (OneUI) Video
Tue, Jun 7th 2011 4:08p   Bruce Elgort
Steve Castledine demonstrates how to use the XPages Layout Framework Template which is available on OpenNTF.org [read] Keywords: xpages openntf
49


Video: Using the XPages Extension Library Dojo Grid and REST Services Controls
Mon, Jun 6th 2011 10:46p   Bruce Elgort
[read] Keywords: xpages dojo
30


The MWLUG 2011 XPrize Design Competition
Mon, Jun 6th 2011 2:53p   Bruce Elgort
Hot off the press: XPages brings Domino Web application development to an entirely a new level. It allows you to modernize your existing Domino applications and provide an incredible user experience and interface. XPages allows you to take advantage of the unique capabilities of the Domino platform and build powerful and dynamic applications that can easily beat out competitive solutions. As part of the Midwest Lotus User Group Conference 2011, MWLUG is sponsoring the MWLUG XPrize Design Compet [read] Keywords: domino lotus xpages application applications development interface
71


[Lotusphere 2011 Rewind] - XPages Extension Library: Making Application Development Even Easier
Mon, Jun 6th 2011 8:22a   Bruce Elgort
IBM's Paul Hannan and Maire Kehoe presented this excellent session at Lotusphere 2011 on the XPages Extension Library: AD116 XPages Extension Library: Making Application Development Even Easier View more presentations from pdhannan [read] Keywords: ibm lotusphere xpages application development
65


Intec Blog: Maximising the Benefits of XPages in 8.5.2 Whitepaper
Sun, Jun 5th 2011 6:17p   Bruce Elgort
Premier IBM Business Partner Intec has a fantastic updated whitepaper entitled "Maximising the Benefits of XPages in 8.5.2: Almost a year ago I wrote a whitepaper called "Maximising the Benefits of Lotus Domino 8.5.x with XPages". This was an open discussion of the pros and cons of XPages, based on Domino 8.5.1. I have updated the whitepaper to take into account the significant enhancements in XPages in 8.5.2 and a year's more experience of developing applications in XPages. XPages is stil [read] Keywords: domino ibm lotus xpages application applications
62


Tim Tripcony: Taking Themes to the Next Level
Sun, Jun 5th 2011 12:58p   Bruce Elgort
If you have not yet looked into the power of using themes in your XPages applications, may I suggest that you download and review a presentation given by Tim Tripcony of GBS at the BLUG and UKLUG conferences entitled "Taking Themes to the Next Level - Getting more out of XPages the easy way". The slide deck covers: What is a Theme? How are Themes typically used? How do Themes actually work? Going beyond the typical to... Keep your XPage markup clean Enhance application performance Maintain [read] Keywords: xpages application applications development
48


Mark Barton: Creating Barcodes with an XPage / Reading them with Flex
Sat, Jun 4th 2011 11:26a   Bruce Elgort
Mark Barton has a must read blog entry on generating barcodes with XPages: Due to the ability for an XPage to easily leverage Java code it is quite straightforward to integrate an existing Java library, so when the XPage is called a rendered barcode is returned. For this demo I have decided to use a commercial library &ndash; the code will operate in a demo mode and is reasonably priced if you decide to buy it. For this demo I am only interested in the Datamatrix barcode so I downloaded th [read] Keywords: xpages java




Created and Maintained by Yancy Lent - About - Blog Submission - Suggestions - Change Log - Blog Widget - Advertising - FAQ - Mobile Edition