-
Bug
-
Resolution: Fixed
-
Normal
-
3.6.4, 5.0.10
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
<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>