Package org.wicketstuff.javaee.example.model

Examples of org.wicketstuff.javaee.example.model.Contact


        add(new Label("welcomeMessage", welcome));
        add(new ListView<Contact>("contacts", contactDao.getContacts()) {

            @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


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

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

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

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

      private static final long serialVersionUID = 1L;

      @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())
        {

          private static final long serialVersionUID = 1L;
View Full Code Here

TOP

Related Classes of org.wicketstuff.javaee.example.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.