Package org.jabusuite.article.session

Examples of org.jabusuite.article.session.ArticlesRemote


        return fields;
    }

    @Override
    public void doDeleteJbsObject(JbsBaseObject jbsObject) throws Exception {
        ArticlesRemote articles = (ArticlesRemote)ClientTools.getRemoteBean(ArticlesRemote.class);
        articles.deleteDataset((Article)jbsObject, ClientGlobals.getUser());
    }
View Full Code Here


    public void setJbsBaseObject(JbsBaseObject jbsBaseObject) {
        Article article = (Article)jbsBaseObject;
        if ((article!=null) && (this.getDlgState() == DlgState.dsEdit)) {
            logger.debug("Retrieving prices and groups for article "+article.getId());
            try {
                ArticlesRemote articles = (ArticlesRemote) ClientTools.getRemoteBean(ArticlesRemote.class);
                Article existingArticle = articles.findDataset(article.getId(), true);
                article = existingArticle;
            } catch (NamingException e) {
                logger.error("Error retrieving offer.", e);
            }
        }
View Full Code Here

    @Override
    public void doSave() throws EJbsObject {
        logger.debug("Saving data...");

        try {
            ArticlesRemote articles = (ArticlesRemote) ClientTools.getRemoteBean(ArticlesRemote.class);
            super.doSave();
            if (this.getDlgState() == DlgState.dsInsert) {
                logger.debug("Adding new entity " + this.getArticle().getId() + ".");
                articles.createDataset(this.getArticle(), ClientGlobals.getUser(), ClientGlobals.getCompany());
            } else if (this.getDlgState() == DlgState.dsEdit) {
                logger.debug("Saving existing entity " + this.getArticle().getId() + ".");
                articles.updateDataset(this.getArticle(), ClientGlobals.getUser());
            }
            logger.debug("Entity saved.");
        } catch (NamingException e) {
            logger.error("Error svaing article.", e);
        }
View Full Code Here

TOP

Related Classes of org.jabusuite.article.session.ArticlesRemote

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.