Hi all,

i have a problem implementing filters to my datatable.
What i want is a filter reacting on changes in the filter textfields. Let me call it 'live-filter'. So when you type, the table is filtered via dataprovider.

I implemented the filter from the phonebook example, but this method just reacts on form submit.

The next thing i tried is using a dataview instead of a datatable so i can reach directly the filter textfields. Then i added a AjaxOnUpdateBehavior to them, which submits the filterform via 'AjaxRequestTarget'.appendJavascript(document.formxy.submit();).

The problem resulting: too many database queries in too short intervals. Sometimes he ignored letters from the textfield when you type a little bit faster.

so i tried implementing java.util.Timer with a little delay. So my thought was that you type sth and after the delay it begins to call the database filtering with everything you typed so far.

But when i schedule a timertask, nothing ever happens. The interesting thing is that logs from within the timertask's run() method are displayed to the console.

It seems that only the formsubmit(appendjavascript) is ignored.

Could it be that it does nothing because of the extra thread started for the Timer?

Do you know any solutions?

Or do you know any 'normal' and better ways to implement such a 'live'filter?


Thanks

Sascha


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to