-
FEATURED COMPONENTS
First time here? Check out the FAQ!
setVisible is not working second time. Following is the test code...
<zk>
<label value="Advanced Filter"></label>
<combobox>
<comboitem label="-Add a Filter-"></comboitem>
<attribute name="onSelect">
<![CDATA[
ID.setVisible(true);
]]>
</attribute>
</combobox>
<div align="left" width="100%">
<grid vflex="true" fixedLayout="true" id="ID"
visible="false">
<rows>
<row>
<hlayout spacing="4%">
ProductName
<textbox width="150px" />
<button label="Cancel" mold="trendy">
<attribute name="onClick">
<![CDATA[
ID.setVisible(false);
]]>
</attribute>
</button>
</hlayout>
</row>
</rows>
</grid>
</div>
</zk>
Hay Rakesh ...
<zk>
<label value="Advanced Filter"></label>
<combobox>
<comboitem label="-Add a Filter-" id="cmb"></comboitem> // i changed here i mentioned the id of the comboitem and used invalidate method....
<attribute name="onSelect">
<![CDATA[
ID.setVisible(true);
cmb.invalidate(); // changed
]]>
</attribute>
</combobox>
remaining same....
cheers Sajid
A couple of suggestions:
1) Don't ever type/paste code into the forum without wrapping it in the code tags. You see the line below the editor (I think it's above the editor when you're creating a new thread):
Please provide reproducible code and ZK version if possible,use [ code ][ /code ] to wrap your code.
2) Open a browser window/tab to http://www.zkoss.org/zksandbox/ and paste this code into it:
<zk> <label value="Advanced Filter"></label> <combobox> <comboitem label="-Add a Filter-"></comboitem> <attribute name="onSelect"> <![CDATA[ ID.setVisible(true); ]]> </attribute> </combobox> <div align="left" width="100%"> <grid vflex="true" fixedLayout="true" id="ID" visible="false"> <rows> <row> <hlayout spacing="4%"> ProductName <textbox width="150px" /> <button label="Cancel" mold="trendy"> <attribute name="onClick"> <![CDATA[ ID.setVisible(false); ]]> </attribute> </button> </hlayout> </row> </rows> </grid> </div> </zk>
Thank you raj.it's working.....
Asked: 2011-06-10 04:39:30 +0800
Seen: 483 times
Last updated: Jun 13 '11