-
Bug
-
Resolution: Unresolved
-
Later
-
6.5.1
-
None
according to doc, http://books.zkoss.org/wiki/Small_Talks/2010/April/Client_Side_Programming#Watch:_ZK_Client_Engine_Event
w:onShow should be fired after a widget becomes visible,
however following case doesn't work
<zk xmlns:w="client"> <tabbox> <tabs> <tab w:onSelect='alert("select 1")'>Tab 1</tab> <tab w:onSelect='alert("select 2")'>Tab 2</tab> </tabs> <tabpanels> <tabpanel > <window title="test" border="normal" w:onShow='alert("show 1")' w:onClick='alert("click 1")'> Main Window </window> </tabpanel> <tabpanel> <window title="test" border="normal" w:onShow='alert("show 2")' w:onClick='alert("click 2")'> Main Window 2 </window> </tabpanel> </tabpanels> </tabbox> </zk>
and following code in the doc gets zk red js error dialog after click hide and show
<window xmlns:w="http://www.zkoss.org/2005/zk/client"> <button label="show" onClick="b1.setVisible(true);" /> <button label="hide" onClick="b1.setVisible(false);" /> <!-- onShow is not called when first time rendering. It is called while setVisible="false", and then setVisible="true" --> <button label="if onShow" id="b1" style="position:relative;zoom:1"> <attribute w:name="onShow"> alert("listened to onShow"); </attribute> <attribute w:name="bind_"> function () { this.$bind_(); zWatch.listen({onShow: this});} </attribute> </button> </window>