0

How to increase the delay time in Combobox, while invoking onChanging event.

asked 2010-03-09 06:34:25 +0800

baskaraninfo gravatar image baskaraninfo
536 2 2 9

I have been using Combobox with autodrop option.

When I typed the following sentence:
"my first item search"

Combobox invokes onChanging events as shown as below:

ie., EventName : combo value (getText())

onChangingEvent : m
onChangingEvent : my f
onChangingEvent : my firs
onChangingEvent : my first
onChangingEvent : my first item
onChangingEvent : my first item sea
onChangingEvent : my first item search

onChanging event occur very frequently, eventhough typed at high speed. I want to delay the onchanging event invoking or set high delay time period for onChanging event.

Any way to achieve this?

Thank you.

delete flag offensive retag edit

6 Replies

Sort by ยป oldest newest

answered 2010-03-14 23:09:58 +0800

PeterKuo gravatar image PeterKuo
481 2

You may try to modify InputWidget.js
this._tidChg = setInterval(this.proxy(this._onChanging), 500);

link publish delete flag offensive edit

answered 2010-03-15 01:48:14 +0800

baskaraninfo gravatar image baskaraninfo
536 2 2 9

Thank you, PeterKuo :)

I have been using ZK Enterprise Edition - 3.6.3
I have searched for InputWidget.js file without any success.

Is it only from ZK5 version?

Can anyone help me to locate this file?

Thank you.

link publish delete flag offensive edit

answered 2010-03-15 01:59:59 +0800

PeterKuo gravatar image PeterKuo
481 2

Yes, it for zk5.
After modification, remember to clean local cache.

link publish delete flag offensive edit

answered 2010-03-15 03:03:07 +0800

baskaraninfo gravatar image baskaraninfo
536 2 2 9

updated 2010-03-15 03:17:20 +0800

Thank you, PeterKuo, for confirming that :)

Is there any way to achieve this in 3.6.3 EE version?

P.S:
In 3.6.3 version, I had checked with tb.js inside zul.jar file without any success.

Thank you.

link publish delete flag offensive edit

answered 2010-03-15 21:16:55 +0800

PeterKuo gravatar image PeterKuo
481 2

modify vd.js, vd.org.js under zul.jar

modify setInterval

remember to clean cache, and refresh before redeploy.

677 zkTxbox.onfocus = function (evt) {
678 var inp = zkau.evtel(evt), //backward compatible (2.4 or before)
679 cmp = $outer(inp);
680 if (!$tag(inp)) return; //Bug 2111900
681 if (zkau.onfocus0(evt)
682 && inp && inp.id && zkau.asap(cmp, "onChanging")) {
683 //handling onChanging
684 inp.setAttribute("zk_changing_last", inp.value);
685 if (!zkTxbox._intervals[inp.id])
686 zkTxbox._intervals[inp.id] =
687 setInterval("zkTxbox._scanChanging('"+inp.id+"')", 5000);
688 }
689 zk.addClass(cmp, getZKAttr(cmp, "zcls") + "-focus");
690};

link publish delete flag offensive edit

answered 2010-03-17 01:52:26 +0800

baskaraninfo gravatar image baskaraninfo
536 2 2 9

Thank you, PeterKuo :)

It works perfectly.

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2010-03-09 06:34:25 +0800

Seen: 961 times

Last updated: Mar 17 '10

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More