4

I am building a simple search functionality which can search records in salesforce using the record name. The search should happen as I key in the letter in search box. I searched in google a bit and found out this article by Jeff Douglas - http://blog.jeffdouglas.com/2010/07/13/building-a-dynamic-search-page-in-visualforce/.

The approach in the above link uses Javascript to accomplish this functionality. I was wondering if there is any other way we can implement this functionality ?

6

In theory, yes, but realistically, no. The Visualforce reRender engine causes input elements to lose focus, repeated calls in a short period can cause the view state to become disorganized, actionFunction/actionSupport events are about 10 times slower than using AJAX, and workarounds tend to cause the input field to be wiped out, etc. I've tried this before, and I've seen it implemented before; it's absolutely abysmal in terms of performance. It's far easier to just use JavaScript. There's a reason why it's hard to find a working example written in pure Visualforce.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.