Package org.snippr.business.entities

Examples of org.snippr.business.entities.SnippetCode


        }
    }

    @Override
    public void prepareForCreate() {
        snippetCode = new SnippetCode();
    }
View Full Code Here


     * Create a new SnippetCode for this snippet
     */
    @Override
    @Transactional
    public void addNewSnippetCode()  {
        SnippetCode snippetCode = new SnippetCode();
        snippetCode.setCode("Introduce your code here ...");
        snippet.addSnippetCode(snippetCode);
    }
View Full Code Here

        comp.setAttribute("controller", this);
        notificator = Notificator.create(notificationMessage);
    }

    public void selectSnippet(SelectEvent event) {
        SnippetCode snippetCode = snippetCodeModel.getSnippetCode();

        List<Listitem> items = new ArrayList(event.getSelectedItems());
        if (!items.isEmpty()) {
            Listitem item = items.get(0);
            snippetCode.setSnippet((Snippet) item.getValue());
        }
    }
View Full Code Here

            item.setValue(data);
            item.appendChild(new Listcell(data.toString()));

            // Select snippetCode.snippet in list
            SnippetCode snippetCode = snippetCodeModel.getSnippetCode();
            if (snippetCode != null && snippetCode.getSnippet() != null
                    && snippetCode.getSnippet().getId().equals(snippet.getId())) {
                item.setSelected(true);
            }
        }
View Full Code Here

TOP

Related Classes of org.snippr.business.entities.SnippetCode

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.