On 2011/05/19 16:15 PM, Tim Hooper wrote:
I have a PickList (org.apache.click.extras.control.PickList) with thousands of
items in it.  When using it, it worked fine when adding items from the left to
right window of the PickList , but would take several minutes to remove even a
single item (using IE 7 and 9, firefox only took about 6 seconds).

I'm not too good with JavaScript...but...I was able to trace through the
JavaScript and find the line of code that causes the slowness.

It's in: /click/extras-control.js
Function: pickListMoveItem()

The line of code is: to.options[toIndex] =
   new Option(hidden.options[i].text, hidden.options[i].value);

As you've found out that line will add the item to the "to" list. Perhaps there is a more effecient algorithm for copying items from one list to another?

On the other hand having thousands of items in a select is likely to be a issue with users? Maybe you could have a separate screen with some filtering to pick options?

regards

Bob

Reply via email to