*/
@Override
public void doSave() throws EJbsObject {
logger.debug("Saving data...");
try {
ArticleVATsRemote vats = (ArticleVATsRemote) ClientTools.getRemoteBean(ArticleVATsRemote.class);
super.doSave();
if (this.getDlgState() == DlgState.dsInsert) {
logger.debug("Adding new entity " + this.getVAT().getId() + ".");
vats.createDataset(this.getVAT(), ClientGlobals.getUser(), ClientGlobals.getCompany());
} else if (this.getDlgState() == DlgState.dsEdit) {
logger.debug("Saving existing entity " + this.getVAT().getId() + ".");
vats.updateDataset(this.getVAT(), ClientGlobals.getUser());
}
logger.debug("Entity saved.");
} catch (NamingException e) {
logger.error("Error svaing vat.", e);
}