0

Wrong dot tree lines opening closed tree nodes in a z-dottree class tree

asked 2011-06-03 14:21:22 +0800

gsim gravatar image gsim
81

updated 2011-06-06 02:28:24 +0800

Hi all!

I have found this issue but I'm not sure if it's a bug or I am doing something wrong:

In a tree with zclass="z-dottree", when opening closed treeitems either from server via Treeitem.setOpen() or directly in a zul page, the tree dot lines are not correctly rendered. I get something like:

Node 1 (opened node)
├ Node 1.1
Node 1.2
Node 2

instead of:

Node 1 (opened node)
├ Node 1.1
Node 1.2
Node 2

This code reproduces the issue:

<tree zclass="z-dottree">
    <treecols>
        <treecol label="Name"/>
    </treecols>
    <treechildren>
        <treeitem>
            <treerow>
                <treecell label="Item 1"/>
            </treerow>
            <treechildren>
                <treeitem>
                    <treerow>
                        <treecell label="Item 1.1"/>
                    </treerow>
                </treeitem>
                <treeitem>
                    <treerow>
                        <treecell label="Item 1.2"/>
                    </treerow>
                </treeitem>
            </treechildren>
        </treeitem>
        <treeitem id="ti2" open="false">
            <treerow>
                <treecell label="Item 2" onClick="ti2.setOpen(!ti2.isOpen())"/>
            </treerow>
            <treechildren>
                <treeitem>
                    <treerow>
                        <treecell label="Item 2.1"/>
                    </treerow>
                </treeitem>
                <treeitem>
                    <treerow>
                        <treecell label="Item 2.1"/>
                    </treerow>
                </treeitem>
            </treechildren>
        </treeitem>
        <treeitem open="false">
            <treerow>
                <treecell label="Item 3"/>
            </treerow>
            <treechildren>
                <treeitem>
                    <treerow>
                        <treecell label="Item 3.1"/>
                    </treerow>
                </treeitem>
                <treeitem>
                    <treerow>
                        <treecell label="Item 3.1"/>
                    </treerow>
                </treeitem>
            </treechildren>
        </treeitem>        
    </treechildren>
</tree>

In the previous example, when clicking on "Item 1" everything is correctly rendered, but opening Item 2 (via setOpen()) or Item 3 (via own component event) renders wrong dot tree lines.

The issue can be reproduced also in the zk tree dynamic styling demo:
1. Close all nodes
2. Change style to Dot Tree
3. Open the nodes

Has anyone of you found this problem?

Thanks,
Will.

delete flag offensive retag edit

8 Replies

Sort by » oldest newest

answered 2011-06-07 02:07:54 +0800

gsim gravatar image gsim
81

did anyone find something about this?

thx
will

link publish delete flag offensive edit

answered 2011-06-07 09:42:57 +0800

riczun gravatar image riczun
36 2
www.riczun.nl

I am having the same problem. Which version of ZK do you have?

I have 2 projects with almost the same menu's. In ZK 5.0.6 my menu is the wrong one as you describe. My another project is still version 5.0.5 and there i don't have any problem!

link publish delete flag offensive edit

answered 2011-06-07 11:08:25 +0800

valmar gravatar image valmar
925 2 13
http://www.timo-ernst.net

I have similar issues with Tree since ZK 5.0.6: http://www.zkoss.org/forum/listComment/16400
Something's seriously messed up there since that update.

link publish delete flag offensive edit

answered 2011-06-08 01:42:12 +0800

gsim gravatar image gsim
81

Thanks for your responses.

I am using ZK 5.0.7 now and also tested in 5.0.6.
In both versions the lines are messed up.

Should I add a bug issue?

link publish delete flag offensive edit

answered 2011-06-08 03:47:21 +0800

riczun gravatar image riczun
36 2
www.riczun.nl

I havent tested it with ZK 5.0.7, but you did it, it looks like a bug to me!

link publish delete flag offensive edit

answered 2011-06-08 07:12:17 +0800

valmar gravatar image valmar
925 2 13
http://www.timo-ernst.net

I think setting up a bug report would be appropriate.

link publish delete flag offensive edit

answered 2011-06-09 05:42:29 +0800

jimmyshiau gravatar image jimmyshiau
4921 5
http://www.zkoss.org/ ZK Team

Hi all,
I have posted a track in the following link
https://sourceforge.net/tracker/?func=detail&aid=3314143&group_id=152762&atid=785191

link publish delete flag offensive edit

answered 2011-06-09 07:03:42 +0800

gsim gravatar image gsim
81

Thanks Jimmy, I didn't have the time to post the bug in the tracker.

Will.

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-03 14:21:22 +0800

Seen: 854 times

Last updated: Jun 09 '11

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