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



Feb 9, 2012, 11:01 AM
22 Posts

Active / dynamic / type ahead search

  • Category: Other
  • Platform: Windows
  • Release: 8.5.3
  • Role: Developer
  • Tags:
  • Replies: 2
Hi
 
I have a database that I would like to search - I have this working perfectly but currently need to press the search button to get the results. What I would like is the view to be refreshed per key press - this would make the view "dynamic / active". Too be clear - if the user wants to search for "Brian" then when s/he presses B I would like all the documents where the given name starts with B to be displayed in the view. When r is pressed then the view only contains documents  where the first name starts with "Br" and so on. I do realise this would be a very resource intensive search (I assume we could make it better using partial refreshes) but this feature would be a killer application to get XPages to be used in our company :o)
 
Thanking you for any help given 
Ursus 
 
ps: I did do a bit of searching in various forums but just couldn't find the answer I needed.  
 
Feb 9, 2012, 2:25 PM
261 Posts
Re: Active / dynamic / type ahead search
Ursus,
 
It depends on the specifics of the application you want to use this in (e.g. number of documents), but you could solve this in a number of ways:
  • Use FullText searches and perform a new query with every character entered.
  • Cache all the data you need in an object array or HashMap in one of the scopes and re-search the data in-memory every time a new character is entered.
  • Use a clientside approach by using a Dojo Grid and add a (clientside) filter option (see here for some explanation about filters).

Mark

 
Feb 10, 2012, 10:20 AM
22 Posts
Re: Active / dynamic / type ahead search
Hi Mark
 
thank you very much for your answer. I will have to go with option 1 as, although 2 and 3 look very interesting, I would not know where to start. This is my 1st xPage application :o) 
 
Do you perhaps have an example database? 
 
Thanking you in advance 
Ursus 

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