Hi,

you'll have to override AbstractTree#newContentComponent(), e.g.:

    protected Component newContentComponent(String id, IModel<Foo> model) {
        // any component will do, for now just reuse a 'Folder'
        return new Folder<Foo>(id, this, model) {

            protected IModel<?> newLabelModel(IModel<Foo> model) {
                 // 1) how to display the node's content
                 return new PropertyModel<String>(model, "bar");
            }

            protected boolean isClickable() {
                // clicks on all node's content allowed
                return true;
            }

            protected void onClick(AjaxRequestTarget target)
            {
                // 2) node was clicked
            }
        };
    }

Hope this helps
Sven


On 07.09.2015 18:19, Panov Andy wrote:
Hi.
I'm trying to use Ajax TableTree.
If I understand it correctly I should use TreeColumn for one of column to display parent\child elements on HTML. But I can't find what I should override to change text on this column. Currently it's look like .toString() used.

Please answer my questions:
1) How to display custom text for nodes.
2) How to catch ajax click on node.

And if you can fix it, on page http://wicket.apache.org/help/email.html wrong Users subscribe email used "[email protected]" <- S is missed in word user.



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to