ZK modify delay time for onChange instant event

For zk input widgets (like Textbox, Combobox, Datebox, ….) is possible to set the instant property to true in order to raise the onChange event without change the focus.
By default the onChange event is raised after 350 millisecond.
It’s possible modify the delay time by setting the value in your zul file.

Here an example how to do that:


<zk xmlns="http://www.zkoss.org/2005/zul" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
	xsi:schemaLocation="http://www.zkoss.org/2005/zul  http://www.zkoss.org/2005/zul/zul.xsd "
	xmlns:n="native">

	<script type="text/javascript"><![CDATA[
		zk.afterLoad("zul.inp", function () {
				zul.inp.InputWidget.onChangingDelay=1000;
		});
	]]></script>	
		
....
</zk>
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s