You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Panov Andy <ve...@gmail.com> on 2015/09/07 18:19:34 UTC
Wicket 7 TableTree
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 "user-subscribe@wicket.apache.org" <- S
is missed in word user.
Re: Wicket 7 TableTree
Posted by Martin Grigorov <mg...@apache.org>.
Hi,
On Mon, Sep 7, 2015 at 6:19 PM, Panov Andy <ve...@gmail.com> 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 "user-subscribe@wicket.apache.org" <- S
> is missed in word user.
>
Fixed!
Thanks!
Re: Wicket 7 TableTree
Posted by Sven Meier <sv...@meiers.net>.
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 "user-subscribe@wicket.apache.org" <- S is missed in word user.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org