-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Is there a ZK setting to control the server side calls that are made for every event on the screen. Here in the combobox listing as you can see no onChange event is defined but still there is a server call being made for the onChange event. Is there a way to prevent the same.
<combobox value="@bind(vm4.activePatient.patientSex)" mold="rounded" readonly="true">
<comboitem label="Male" value="Male" />
<comboitem label="Female" value="Female"/>
</combobox>
onChange is an important event so it will always be fired, if you really want to prevent it, you can override the client side fire function:
<zk xmlns:w="client">
<combobox onChange="System.out.println(123);"
onChanging="System.out.println(456);">
<attribute w:name="fire"><![CDATA[
function (evtnm, data, opts, timeout) {
if (evtnm == 'onChange') {
return;
}
this.$fire(evtnm, data, opts, timeout);
}
]]></attribute>
</combobox>
</zk>
Asked: 2013-02-19 20:21:02 +0800
Seen: 31 times
Last updated: Apr 04 '13
Why are you trying to avoid onChange? The onChange is needed for the bind. The event is always defined, you can catch it or not.
shumy ( 2013-03-15 01:37:28 +0800 )edit