You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Dariusz Wojtas <dw...@gmail.com> on 2009/02/22 23:45:16 UTC
LinkTree and modal windows
Hi,
This has been a busy weekend for me.
I have successfully created a tree (LinkTree) that loads various
object types from database (lazily loaded) and after hours of research
- the result was amazingly simple. Wicket rocks!
Then I tried to work with modal windows. Finally I have created basics
to minimize the amount of code wor creating such windows on my own.
Now I may invoke a modal Edit window with my own panel after clicking
on a node by overriding the onNodeLinkClicked(...) method:
@Override
protected void onNodeLinkClicked(Object node, BaseTree tree,
AjaxRequestTarget target) {
super.onNodeLinkClicked(node, tree, target);
if (this.modalWindow != null) {
this.modalWindow.show(target);
}
}
Now I want to extend my tree with new functionalities:
a) each tree node could contain an aditional + (plus) icon that would
invoke some action.
In this case I would like to call modal window with the
possibility to add new child item.
How do I extend the tree to keep it's original functionality and
add additional icon/link in front on the Label?
b) After I submit the modal window form I need to refresh the
originating node 'userObject'. Any hint how?
My modal windows do make use of
AjaxButton.onSubmit(AjaxRequestTarget target, Form<?> form)
Any hint on how such callback could look to be useful?
Best regards,
Dariusz Wojtas
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org