Hi,
I would like to have a pop up before moving node asking "are you sure
you want to move the node? Yes/No".
I do the following:
public boolean doBeforeMoveNode(Tree tree, TreeNode node, TreeNode
oldParent, TreeNode newParent, int index) {
GWT.log("treePanel.onMoveNode", null);
if (oldParent.getId().equals(newParent.getId())) {
return false;
}
MessageBox.confirm("Confirm", "You are about to
move this node and its child nodes. Would you like to save your
changes to database?",
new MessageBox.ConfirmCallback() {
public void execute(String btnID) {
if (btnID.equals("yes")) {
return true;
}
}
});
}
public void onMoveNode(Tree treePanel, TreeNode node,
TreeNode oldParent, TreeNode newParent, int index) {
GWT.log("treePanel.onMoveNode", null);
controller.moveNode(treePanel, node, oldParent,
newParent);
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
but clearly the error occur at
public void execute(String btnID) {
if (btnID.equals("yes")) {
return true;
}
}
since i cannot return true.
So how do i return true in doBeforeMoveNode() when I need to wait till
MessageBox return the result (Yes)??
Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---