wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lxw_first <lxw_fi...@hotmail.com>
Subject How to update the treetable
Date Fri, 10 Aug 2012 07:37:52 GMT
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: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Mime
View raw message