Package org.jboss.as.quickstarts.wicketWar.model

Examples of org.jboss.as.quickstarts.wicketWar.model.Contact


    /**
     * Add a new Contact.
     */
    @Override
    public void addContact(String name, String email) {
        em.merge(new Contact(null, name, email));
    }
View Full Code Here


    /**
     * Remove a Contact.
     */
    @Override
    public void remove(Contact modelObject) {
        Contact managed = em.merge(modelObject);
        em.remove(managed);
        em.flush();
    }
View Full Code Here

        add(new ListView<Contact>("contacts", contactDao.getContacts()) {

            // Populate the table of contacts
            @Override
            protected void populateItem(final ListItem<Contact> item) {
                Contact contact = item.getModelObject();
                item.add(new Label("name", contact.getName()));
                item.add(new Label("email", contact.getEmail()));
                item.add(new Link<Contact>("delete", item.getModel()) {

                    @Override
                    public void onClick() {
                        contactDao.remove(item.getModelObject());
View Full Code Here

TOP

Related Classes of org.jboss.as.quickstarts.wicketWar.model.Contact

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.