Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-597

Tree not rendering correctly after event

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 5.0.10
    • 5.0.9, 5.0.10
    • Components
    • Mac OS X (Snow Leopard), Firefox 8 and Chrome 15

      The tree is rendered wrong after being changed in an event.

      Slightly modified ZK Sandbox example of a Tree
      <!-- replace the http://www.zkoss.org/zksandbox/#g11 example with the following code -->
      <hlayout width="100%" height="500px">
      <vlayout hflex="1" vflex="1">
      	Four style of trees :
      	<radiogroup
      		onCheck='tree.setZclass("z-"+self.selectedItem.value)'>
      		<vlayout>
      			<radio label="Default" value="tree" selected="true"/>
      			<radio label="Dot Tree" value="dottree" />
      			<radio label="XP Explorer" value="filetree" />
      			<radio label="Vista Explorer" value="vfiletree" />
      		</vlayout>
      	</radiogroup>
      </vlayout>
      <tree id="tree" hflex="2" vflex="1">
      	<treecols sizable="true">
      		<treecol label="Name" />
      		<treecol label="Description" />
      	</treecols>
      	<treechildren>
      		<treeitem>
      			<treerow>
      				<treecell label="Item 1" />
      				<treecell label="Item 1 description" />
      			</treerow>
      		</treeitem>
      		<treeitem>
      			<treerow>
      				<treecell label="Item 2" />
      				<treecell label="Item 2 description" />
      			</treerow>
      			<treechildren>
      				<treeitem>
      					<treerow>
      						<treecell label="Item 2.1" />
      					</treerow>
      					<treechildren>
      						<treeitem>
      							<treerow>
      								<treecell label="Item 2.1.1" />
      							</treerow>
      						</treeitem>
      						<treeitem>
      							<treerow>
      								<treecell label="Item 2.1.2" />
      							</treerow>
      						</treeitem>
      					</treechildren>
      				</treeitem>
      				<treeitem>
      					<treerow>
      						<treecell label="Item 2.2" />
      					</treerow>
      					<treechildren>
      						<treeitem>
      							<treerow>
      								<treecell label="Item 2.2.1" />
      							</treerow>
      						</treeitem>
      					</treechildren>
      				</treeitem>
      			</treechildren>
      		</treeitem>
      		<treeitem label="Item 3" />
      	</treechildren>
      </tree>
      </hlayout>
      

      Tested in ZK Sandbox (5.0.9) and also with nightly build (2011-11-14).

      Steps to reproduce:
      1- Change the tree style by selecting a radio other than "Default"

      Expected behaviour:
      The icons should change but not the tree's dimensions.

      Result:
      The fisrt time that the event is fired, the tree is displayed wrong; all subsequent events restores the correct dimensions.

            jumperchen jumperchen
            mngsk mngsk
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: