Just to be sure, you have multiple "forms" on tabs, each with its own dataSource and you want to have one set of buttons acting on several dataSources?
As far as I know, you will have to define the dataSources in some ancestor of the buttons. Then in the onclick event of the button you will have to compute which dataSource is active (which tab is open) and pass that as the "var" parameter of the saveDocument simple action. I haven't used the var parameter yet, that info is from Mastering Xpages, so you may have to play with that. Your script _could_ just call the save method of the dataSource, but I don't recommend that as it seems to bypass any defined querySave or postSave events.
Rich