0

Zk setting to prevent server calls onChange event.

asked 2013-02-19 20:21:02 +0800

srividya gravatar image srividya
1

updated 2013-04-04 07:00:25 +0800

sjoshi gravatar image sjoshi flag of India
3493 1 8
http://zkframeworkhint.bl...

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>
delete flag offensive retag edit

Comments

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

1 Answer

Sort by ยป oldest newest most voted
2

answered 2013-03-26 09:07:51 +0800

benbai gravatar image benbai
2228 6
http://www.zkoss.org

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>
link publish delete flag offensive edit
Your answer
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
1 follower

RSS

Stats

Asked: 2013-02-19 20:21:02 +0800

Seen: 31 times

Last updated: Apr 04 '13

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