Before you kill yourself, did you take a look at the examples? http://www.wicket-library.com/wicket-examples/ajax/tree/table/editable
~ Thank you, Paul Bors -----Original Message----- From: grazia [mailto:[email protected]] Sent: Friday, June 21, 2013 1:23 PM To: [email protected] Subject: Re: How to prevent a page from being marked as dirty ? Upon further analysis, the Page gets dirty when any of its components' models are updated, it is doing what it is supposed to do. Can't eliminate that ;-)) THere is something that gets out of synch with the ajax request. Below I pasted teh code I used on a per row basis to update the tree. Anyone sees something wrong ? I hope yes ! saveButton.add(new AjaxFormSubmitBehavior("onclick") { @Override protected void onSubmit(final AjaxRequestTarget target) { final DefaultMutableTreeNode node = ((DefaultMutableTreeNode) inputModel.getTarget()); final MyDto dto = (MyDto) node.getUserObject(); schedulingManager.save(dto.getTrainingClass()); treeProvider.get() .modelChanging(); node.setUserObject(new MyDto(schedulingManager.get the record you just saved... ))); final DefaultTreeModel model = (DefaultTreeModel) ((WicketTreeModel) treeProvider.get() .getModel()).getObject(); model.nodeChanged(node); treeProvider.get() .modelChanged(); target.addChildren(treeProvider.get(), node.getClass()); treeProvider.get() .updateTree(target); } -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-prevent-a-page-from-being- marked-as-dirty-tp4659636p4659679.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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
