0

Why tree's items are displayed like a pointer in MVVM?

asked 2012-05-28 05:02:14 +0800

edwpotapoff gravatar image edwpotapoff
43 1

Example zul:

            <tree model="@load(vm.definitions)" selectedItem="@bind(vm.selected)" checkmark="true">
                <treecols visible="false">
                    <treecol label="" />
                </treecols>
                <treechildren>
                    <template name="model" var="definition">
			<treeitem>
                            <treerow>
                                <treecell label="@load(definition.name)" />
                            </treerow>                        
                        </treeitem>
                    </template>
                </treechildren>
            </tree>

items in View Model:

    private TreeModelDefinition definitions;

and TreeModelDefinition:

public class TreeModelDefinition extends AbstractTreeModel<Definition> {

        public boolean isLeaf(Definition e) {
          ...
        }

        public Definition getChild(Definition e, int i) {
            ....
        }

        public int getChildCount(Definition e) {
            ...
        }
}

delete flag offensive retag edit

13 Replies

Sort by ยป oldest newest

answered 2012-06-22 07:53:27 +0800

szarza gravatar image szarza
72 3
http://balteus.blogspot.c...

Ok.. That was all!! By removing treechildren, it works! ... Without having to implement an ItemRenderer (and @Wire the tree in my vm), just using the template....

Thank you very much!

link publish delete flag offensive edit

answered 2012-06-26 18:49:15 +0800

Senthilchettyin gravatar image Senthilchettyin flag of India
2623 3 8
http://emrpms.blogspot.in...

Hi

Can someone please give us the complete code for this example

link publish delete flag offensive edit

answered 2012-08-07 22:28:17 +0800

pasqualeleone gravatar image pasqualeleone flag of Italy
81 2

Hi,
Can pls share this example.
I'm also studying tree model.

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-05-28 05:02:14 +0800

Seen: 730 times

Last updated: Dec 26 '12

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