that's because we optimized some javascript so that it cannot override the JS object from the prototype directly.
jumperchen ( 2013-01-22 11:05:38 +0800 )edit-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi,
there seems to be some problem with widget functions overriding starting from zk 6.5.1. This used to work in zk 6.5.0:
zk.$import('zul.inp.Doublebox', function(cls) {
zul.inp.Doublebox.prototype.coerceFromString_ = function(value) {
blabla
...
}
} );
However, after upgrading to 6.5.1 and 6.5.1.1 it doesn't (my custom coerceFromString_ function does not get invoked any longer).
Has anybody experienced this problem? Should I open a bug report?
With kind regards
César Varona
You may use zk.override() to do so.
For example,
<zk>
<script>
zk.$import('zul.inp.Doublebox', function(cls) {
var oldDoublebox = {};
zk.override(zul.inp.Doublebox.prototype, oldDoublebox, {
coerceFromString_:function(value) {
alert(value);
}
});
} );
</script>
<window title="My First Window" border="normal" width="200px">
Hello, World!
<doublebox/>
</window>
</zk>
that's because we optimized some javascript so that it cannot override the JS object from the prototype directly.
jumperchen ( 2013-01-22 11:05:38 +0800 )editAsked: 2013-01-22 10:14:47 +0800
Seen: 17 times
Last updated: Jan 22 '13