You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Stvan <st...@mail.ru> on 2012/04/27 08:53:10 UTC

How reload LinkTree

Im try to use LinkTree for display database content. If used DefaultTreeModel
as in example, new data not added in tree on page refresh. Its normal. Ok,
im try to use LoadableDetachableModel for tree model. Now, data reload on
refresh, but data reload also on each click on tree nodes, as result, nodes
can't be expanded.
Im need reload data on two cases, on ajax request and on page refresh. How I
can do this.
Thanks and sorry for my english.

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-reload-LinkTree-tp4591901p4591901.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: How reload LinkTree

Posted by Sven Meier <sv...@meiers.net>.
If you change nodes in your tree model, you have to fire appropriate 
change notifications, e.g. with DefaultTreeModel#nodesChanged(). 
Additionally for Ajax request you must call LinkTree#updateTree() to let 
it update its components.

Making this work with dynamic data from a database is no easy task, so 
I'd recommend using an alternative implementation:
     http://code.google.com/p/wicket-tree

Note that this solution is part of Wicket 6.

Sven

On 04/27/2012 08:53 AM, Stvan wrote:
> Im try to use LinkTree for display database content. If used DefaultTreeModel
> as in example, new data not added in tree on page refresh. Its normal. Ok,
> im try to use LoadableDetachableModel for tree model. Now, data reload on
> refresh, but data reload also on each click on tree nodes, as result, nodes
> can't be expanded.
> Im need reload data on two cases, on ajax request and on page refresh. How I
> can do this.
> Thanks and sorry for my english.
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-reload-LinkTree-tp4591901p4591901.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org