0

setVisible is not working

asked 2011-06-10 04:39:30 +0800

RakeshManne gravatar image RakeshManne
93 1

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>

delete flag offensive retag edit

4 Replies

Sort by ยป oldest newest

answered 2011-06-10 06:15:28 +0800

raj gravatar image raj
126 1

updated 2011-06-10 06:16:30 +0800

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

link publish delete flag offensive edit

answered 2011-06-10 06:45:23 +0800

caclark gravatar image caclark
1753 2 5
http://clarktrips.intltwi...

updated 2011-06-10 06:45:56 +0800

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.

If you want people to help you, readable code is a big benefit.

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>

Press the Try me! button and report back the results.

link publish delete flag offensive edit

answered 2011-06-10 07:53:43 +0800

raj gravatar image raj
126 1

sorry caclark i forgot to keep in that format ...

by the next time i will follow it..

link publish delete flag offensive edit

answered 2011-06-13 00:39:09 +0800

RakeshManne gravatar image RakeshManne
93 1

Thank you raj.it's working.....

link publish delete flag offensive edit
Your reply
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

RSS

Stats

Asked: 2011-06-10 04:39:30 +0800

Seen: 483 times

Last updated: Jun 13 '11

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