This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Jun 26, 2012, 12:54 AM
32 Posts
topic has been resolvedResolved

View filtering - key by vector. Sorting / Date

  • Category: Extension Library
  • Platform: All
  • Release: 8.5.3
  • Role: Developer
  • Tags: vector,filtering
  • Replies: 2
Hi,
 
I am using the example of view filtering - key by vector as explained in the demonstration application for xPages.
 
I have 4 columns of data, 2 of which require filtering.  I implemented this with the first 2 columns hidden, and this has been working fine displaying the date column (3) and the description (4).  The problem is that the data is sorted as per the first 2 columns, not the date column.
 
So I decided to restructure the columns, moving the date first (and visible), the next 2 (not visible) and the description as the last, and was always going to pass an empty string for the first element.
 
My sample code is as follows:
------------------------------------------------------------------
var vtr:java.util.Vector = new java.util.Vector();

var t1 = sessionScope.App;
var t2 = sessionScope.Module;

vtr.addElement("");
@If(t1 !="All" & t1 != null ,vtr.addElement(t1),vtr.addElement(""));   
@If(t2 !="All" & t2 != null ,vtr.addElement(t2),vtr.addElement(""));

return vtr;
------------------------------------------------------------------
This has now broken it all.  I wondered if it was because of the date field, not being text?  Am I on the right path?  Any thoughts on how to fix it?  My ultimate goal is just to have the data sorted by date.  I did try using the Sort column property of the view panel however that ignored me.
 
A
 
Jun 27, 2012, 7:19 AM
8 Posts
Re: View filtering - key by vector. Sorting / Date
i guess its the culprit. you can split the date element into year / mo / day and have it sorted that way
Jun 28, 2012, 11:43 PM
32 Posts
Re: View filtering - key by vector. Sorting / Date
Thanks Glen - great idea.  I have given that a bash, so I now have 5 vectors and it is working!
 
Not sure about any impacts on performance, will see how it performs on larger volumes of data.

Thanks again.  
 
 

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal