Package com.toedter.gwt.demo.contacts.client

Examples of com.toedter.gwt.demo.contacts.client.IContactServiceAsync


  public void saveContact() {
    System.out.println("ToolBarActivity.saveContact()");
    ContactDetailsActivity contactDetailsActivity = ActivityRegistry.getContactDetailsActivity();
    if (contactDetailsActivity != null) {
      final Contact contact = contactDetailsActivity.getContact();
      IContactServiceAsync contactService = clientFactory.getContactService();
      contactService.saveContact(contact, new AsyncCallback<Void>() {

        @Override
        public void onSuccess(Void result) {
          System.out.println("Contact saved");
          clientFactory.setContacts(null);
View Full Code Here


  public void deleteContact() {
    System.out.println("ToolBarActivity.deleteContact()");
    ContactDetailsActivity contactDetailsActivity = ActivityRegistry.getContactDetailsActivity();
    if (contactDetailsActivity != null) {
      final Contact contact = contactDetailsActivity.getContact();
      IContactServiceAsync contactService = clientFactory.getContactService();
      contactService.deleteContact(contact, new AsyncCallback<Void>() {

        @Override
        public void onSuccess(Void result) {
          System.out.println("Contact deleted");
          clientFactory.setContacts(null);
View Full Code Here

    contactListView.setPresenter(this);
    containerWidget.setWidget(contactListView.asWidget());

    if (clientFactory.getContacts() == null) {
      final long startTime = System.currentTimeMillis();
      IContactServiceAsync contactService = clientFactory.getContactService();
      contactService.getAllContacts(new AsyncCallback<List<Contact>>() {

        @Override
        public void onSuccess(List<Contact> result) {
          System.out.println("Time for RPC: " + (System.currentTimeMillis() - startTime));
          clientFactory.setContacts(result);
View Full Code Here

TOP

Related Classes of com.toedter.gwt.demo.contacts.client.IContactServiceAsync

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.