Save Datasource & Fire querySave/postSave events


/***
 * Save Datasource & fire querySave/postSave events
 *
 * @author Sven Hasselbach
 ***/

var dsName = "document1.DATASOURCE"; // change this to the name of the datasource you want to save
var app = facesContext.getApplication();
var ds = app.getVariableResolver().resolveVariable(facesContext, dsName);
ds.save( facesContext, true );
All code submitted to OpenNTF XSnippets, whether submitted as a "Snippet" or in the body of a Comment, is provided under the Apache License Version 2.0. See Terms of Use for full details.
2 comment(s)Login first to comment...
Bill Fox
(at 21:09 on 22.09.2014)
Does this trigger the field validation as well?
Fero Kossuth
(at 03:06 on 18.07.2012)
Related to: http://stackoverflow.com/questions/9735648/save-method-on-datasource-does-not-fire-querysave-postsave-events