I created a treetable with a treemodel based on database schema. I am trying
to refresh the treetable so that it will change it's data after some db
update.
I update viat the button event.the button event work but treetable doesn't
change.
To create treetable i have this on my page:
treeTable = new TreeTable("treeTable", createTreeModel(), columns);
treeTable.getTreeState().setAllowSelectMultiple(true);
treeTable.setRootLess(true);
treeTable.getTreeState().collapseAll();
creatForm.add(treeTable);
the createTreeModel code:
protected TreeModel createTreeModel() {
DefaultMutableTreeNode rootNode = new DefaultMutableTreeNode();
initTree(roleList, rootNode);
TreeModel treeModel = new DefaultTreeModel(rootNode);
return treeModel;
}
i add the button event like this:
protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
roleList.clear();
treeTable.updateTree(target);
target.add(getForm(),treeTable);
}
Any idea or reference to documentation that explain this?
thanks.
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/How-to-update-the-treetable-tp4651122.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]