/*** * 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 );