-
FEATURED COMPONENTS
First time here? Check out the FAQ!
1 | initial version | |
Please refer to Client-side Reference about responding to client-side activity. onShow
is called after the widget becomes visible.
Below is a simple example that will alert each time the window becomes visible again.
<zk xmlns:w="client">
<script defer="true">
var oldShow = zul.wnd.Window.prototype.onShow;
zul.wnd.Window.prototype.onShow = function() {
oldShow.apply(this, arguments);
alert('Window becomes visible');
}
</script>
<tabbox>
<tabs>
<tab>Tab 1</tab>
<tab>Tab 2</tab>
</tabs>
<tabpanels>
<tabpanel>
<window title="test" border="normal">
Main Window
</window>
</tabpanel>
<tabpanel>
</tabpanel>
</tabpanels>
</tabbox>
</zk>
2 | No.2 Revision |
Please refer to Client-side Reference about responding to client-side activity. onShow
is called after the widget becomes visible.
Below is a simple example that will alert each time the window becomes visible again.
<zk xmlns:w="client">
<zk>
<script defer="true">
var oldShow oldWindow = zul.wnd.Window.prototype.onShow;
zul.wnd.Window.prototype.onShow = function() zul.wnd.Window.prototype;
zk.override(zul.wnd.Window.prototype, oldWindow, {
oldShow.apply(this, arguments);
onShow: function(ctl) {
alert('Window becomes visible');
}
});
</script>
<tabbox>
<tabs>
<tab>Tab 1</tab>
<tab>Tab 2</tab>
</tabs>
<tabpanels>
<tabpanel>
<window title="test" border="normal">
Main Window
</window>
</tabpanel>
<tabpanel>
</tabpanel>
</tabpanels>
</tabbox>
</zk>