Async Tree - How to update model - myWebMethods 7.1

Hi,
I am using XMLTreeContentProvider to read an xml and display it for editing. I use an in place editor to update some values. On form submit I want the updated xml. What is the best way to implement this?

Sorry, the XMLTreeContentProvider is read-only. You must write some java code to marhsall your xml into a tree of INode java objects (see http://www.ajax-softwareag.com/articles/Y4LCDN/Caf-7-1-1JavaDocs/com/webMethods/caf/faces/data/tree/INode.html), where the INode’s getData() method returns an object (which may bee the INode itself) with getter and setter methods for the properties of the tree node that you want to display/update.

You can then use a NodeTreeContentProvider (see http://www.ajax-softwareag.com/articles/Y4LCDN/Caf-7-1-1JavaDocs/com/webMethods/caf/faces/data/tree/object/NodeTreeContentProvider.html) to display this tree of INodes via the tree control. Any updates the user makes to fields in the tree and submits will result in updates to the properties of the INodes’ data. Following the form submit, you can use some custom java code to serialize the updated INodes back to xml.

There are two examples of NodeTreeContentProviders in the samples/caf/wm_corecontrolstest project (which you can download with the rest of the sample caf projects from http://www.ajax-softwareag.com/articles/6Y3MUW/MywebM_Samples_doc/MywebM_Samples_index.html). One example, on the WebContent/viewlinks/view.view, is the tree of views displayed when wm_corecontrolstest is viewed as a portlet. The other example, on the WebContent/view/table/async-tree.view, displays several super-large trees built with a variant of the NodeTreeContentProvider (the LazyNodeTreeContentProvider).

Justin