1 Reply Latest reply on May 11, 2011 3:46 PM by Mark Paluch

    Usage of rich suggestion box

    narvava Newbie

      Hi All, I am developing an application using richfaces and seam. For search criteria, currently I am using explicit search and displaying the data in datatable to select single row. As I explore, rich suggestion box does my job much easiar than this. I have more than one lack rows to retrieve for each search. I don't think firing query for each letter onkeyup would be a good solution in this case.


      Could anybody suggest what could be the best solutions in terms of performance to implement rich suggestionbox. Could anybody please post some code, if anybody has already implemented using seam and richfaces in this case(querying more than 1 lack records frequently)




        • 1. Usage of rich suggestion box
          Mark Paluch Master

          Hi Naresh,

          you're right, when you don't fire a query on each onkeyup/down. A suggestionbox usually has a listener, which is notified when the user is typing. Either, when your complete result list would not eat all you memory (e. g. some 100 to 1000 elements) you could preload the list and return in the suggestion-listener the needed result (some kind of in-memory sort). The other way would be to let the user type some chars and then make a query to a well indexed data source (DB, Fulltext-Index like Lucene). A complete solution needs some sort of cache to prevent your resources be killed by the system itself...


          Best regards,