Package nm.aleksey.shared

Examples of nm.aleksey.shared.AuthorContext


      @Override
      public void onSuccess(final AuthorProxy author) {
        AuthorEditorWorkflow.this.author = author;
        // Start the edit process
        final AuthorContext context = getRequestFactory().authorRequest();
        // Display the UI
        edit(context);
        context.save(author);
        // context.addBook(author, null);
        // Configure the method invocation to be sent in the context
        // BookContext bookContext = getClientFactory().getRequestFactory()
        // .bookRequest();
        // final BookProxy book = bookContext.create(BookProxy.class);
View Full Code Here


      }

      @Override
      public void onSuccess(Void response) {
        // Ugly bug it is required to emit EntityProxyChange event
        AuthorContext authorContext = getRequestFactory().authorRequest();
        authorContext.findAll().fire(new Receiver<List<AuthorProxy>>() {

          @Override
          public void onSuccess(List<AuthorProxy> response) {
            String result = "";
            for (AuthorProxy author : response) {
View Full Code Here

  }

  private void fetch(final int start) {
    lastFetch = start;
    TableRequestFactory requestFactory = getClientFactory().getRequestFactory();
    AuthorContext authorContext = requestFactory.authorRequest();
    authorContext.findAll().fire(new Receiver<List<AuthorProxy>>() {

      @Override
      public void onSuccess(List<AuthorProxy> response) {
        if (response == null) {
          return;
View Full Code Here

    return -1;
  }

  @UiHandler("addAuthorButton")
  void onAddAuthorButtonClick(ClickEvent event) {
    AuthorContext context = getRequestFactory().authorRequest();
    AuthorProxy author = context.create(AuthorProxy.class);
    context.save(author);
    getClientFactory().getEventBus().fireEvent(
        new EditAuthorEvent(author, context));
  }
View Full Code Here

  @UiHandler("deleteAuthorButton")
  void onRemoveAuthorButtonClick(ClickEvent event) {
    if (authorSetToDelete.isEmpty()) {
      return;
    }
    AuthorContext authorContext = getRequestFactory().authorRequest();
    for (AuthorProxy author : authorSetToDelete) {
      authorContext.delete(author);
    }

    authorContext.fire(new Receiver<Void>() {

      @Override
      public void onSuccess(Void response) {
        authorSetToDelete.clear();
        GWT.log("List of authors was cleared.");
View Full Code Here

TOP

Related Classes of nm.aleksey.shared.AuthorContext

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.