Actually - it's even easier than what I did before.
So long as the ITreeProvider implement can change the source of its data
then all that's required is an target.add() on the tree component!
As per usual Wicket makes it really simple but I go looking for harder
solutions :)
On 29/12/2019 5:40 pm, Chris Colman wrote:
Sorry for the duplication. These messages did not appear in the mail
group until about 8 hours after they were posted. I thought I must
have 'misdirected' the first one. Was there a problem with the mail
group today?
Anyway - I eventually worked out how to do it!
The secret was in the source code of the TreeModelProvider class -
which we don't use but it has a method called
update(AbstractTree<T> tree, AjaxRequestTarget target)
which did this magic (among other things):
...
if (completeUpdate)
target.add(new Componen[]{tree});
...
this,detach();
So I added a similar method, called completeUpdate, to pagebloom's own
ITreeProvider implementation, TreeNodeProvider and it all worked
amazingly well, after adding some additional detachment of the root
nodes.
On 29/12/2019 2:09 pm, chrisco wrote:
I have a UI layout where selection changes in one component need to
result in
a complete repopulation of the nodes in an associated NestedTree.
Obviously I don't want to do a complete page refresh so I was
wondering what
the best way is to do an AJAX refresh of the entire NestedTree after
I've
told it, somehow, that all of its nodes need to be replaced.
Is it as simple as just replacing the ITreeProvider and then adding the
NestedTree to the AJAX request target or is there something more
involved?
Merry Christmas/Holiday everyone,
Regards,
Chris
--
Sent from:
http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org