// save the data and dispose the view
// recover the view root
Object xViewRoot = getViewRoot(xDataSource);
// commit the changes
XChangesBatch xUpdateControl =
(XChangesBatch) UnoRuntime.queryInterface(XChangesBatch.class,xViewRoot);
xUpdateControl.commitChanges();
// now clean up
((XComponent) UnoRuntime.queryInterface(XComponent.class, xViewRoot)).dispose();
}