0

lost grouping information

asked 2012-01-13 20:33:21 +0800

khcyt gravatar image khcyt
216 1 1

Hello,

if I clone an object of type Listbox or Grid, why is the group information is lost? See attached test code.
I have tested with version 3.6.4 and zk sandbox

Kai

<window height="600px" width="600px">
    <listbox id="lb1">
        <listgroup label="Group 1"/>
        <listitem label="Item 1.1"/>
        <listitem label="Item 1.2"/>
        <listgroup label="Group 2"/>
        <listitem label="Item 2.1"/>
        <listitem label="Item 2.2"/>
    </listbox>
    <button label="Clone Listbox">
        <attribute name="onClick">
        Listbox lb2=lb1.clone();
        alert("Listbox 1 hasGroup => "+ lb1.hasGroup()+ " and Listbox 2 hasGroup=> "+ lb2.hasGroup());
        </attribute>
    </button>
    <grid id="grid1">
        <rows>
            <group><label value="Group 1"/></group>
            <row><label value="Row 1.1"/></row>
            <row><label value="Row 1.2"/></row>
            <group><label value="Group 2"/></group>
            <row><label value="Row 2.1"/></row>
            <row><label value="Row 2.2"/></row>
        </rows>
    </grid>
    <button label="Clone Grid">
        <attribute name="onClick">
        Grid grid2=grid1.clone();
        alert("Grid 1 rows hasGroup => "+ grid1.getRows().hasGroup()+ " and Grid 2 rows hasGroup=> "+ grid2.getRows().hasGroup());
        </attribute>
    </button>

</window>

delete flag offensive retag edit

2 Replies

Sort by ยป oldest newest

answered 2012-02-02 08:07:56 +0800

ashishd gravatar image ashishd flag of Taiwan
1972 6

This seems like a bug to me. Could you post to the tracker so everyone can track it?

link publish delete flag offensive edit

answered 2012-02-03 08:12:55 +0800

khcyt gravatar image khcyt
216 1 1

I've added a bug report. ZK-820

Kai

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: 2012-01-13 20:33:21 +0800

Seen: 120 times

Last updated: Feb 03 '12

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