Package com.habitsoft.kiyaa.util

Examples of com.habitsoft.kiyaa.util.AsyncCallbackGroup


  public Widget getViewWidget() {
    return this;
  }

  public void load(AsyncCallback<Void> callback) {
    AsyncCallbackGroup group = new AsyncCallbackGroup();
    for (Row row : rows) {
      row.load(group.<Void>member());
    }
    group.ready(callback);
  }
View Full Code Here


    }
    group.ready(callback);
  }

  public void save(AsyncCallback<Void> callback) {
    AsyncCallbackGroup group = new AsyncCallbackGroup();
    for (Row row : rows) {
            row.save(group.<Void>member());
    }
    group.ready(callback);
  }
View Full Code Here

    if(collection == null) {
      callback.onSuccess(null);
      return;
    }
   
    AsyncCallbackGroup group = new AsyncCallbackGroup("Load offset="+offset+" limit="+limit);
    collection.getLength(new AsyncCallbackGroupMember<Integer>(group) {
      @Override
      public void onSuccess(Integer length) {
        totalItems = (length == null?-1:length);
        super.onSuccess(null);
      }
     
      @Override
      public void onFailure(Throwable caught) {
        totalItems = -1;
        super.onFailure(caught);
      }
    });

    collection.load(offset, limit, new AsyncCallbackGroupMember<T[]>(group, getClass().getName()+".collection.load()") {
      @Override
      public void onSuccess(T[] models) {       
        //GWT.log("Loading list ... got "+models.length+" results attached = "+isAttached(), null);
        showLoadedModels(models, offset, limit, group);
        super.onSuccess(null);
      }
    });
    group.ready(callback);
  }
View Full Code Here

      }
      loadingCallback.addCallback(callback);
  }
 
  private void refreshModels(AsyncCallback<Void> callback) {
      AsyncCallbackGroup group = new AsyncCallbackGroup();
      startLoadingModels(group);
      for(int row=0; row < items.size(); row++) {
          loadItem(row, group);
      }
      finishLoadingModels(group);
      group.ready(callback);
    }
View Full Code Here

            unfilteredItems = new ArrayList();
            itemIndexesAfterFiltering = new int[modelCount];
        }
        startOffset = 0;
        loadModelsCommand = new IncrementalCommand() {
            final AsyncCallbackGroup group = new AsyncCallbackGroup();
            int i = 0;
            int selectedIndex=-1;
            int row=0;
           
            @Override
View Full Code Here

    // Start with a blank slate
    items.clear();
    clearRows();
    selectedRow=-1;
   
    AsyncCallbackGroup group = new AsyncCallbackGroup();
    int j=0;
    for(int i=0; i < allItems.size(); i++) {
      T item = allItems.get(i);
      if(modelFilter.includes(item)) {
        itemIndexesAfterFiltering[i] = j;
        addItem(j+startOffset, item, group);
        j++;
      } else {
        itemIndexesAfterFiltering[i] = -1;
      }
    }
    unfilteredItems = allItems;
    if(selectedModel != null) {
      setSelectedIndex(items.indexOf(selectedModel));
    }
   
    group.ready(callback);
  }
View Full Code Here

      }
    }
  }

  public void save(AsyncCallback<Void> callback) {
    AsyncCallbackGroup group = new AsyncCallbackGroup();
    for(Series column:series) {
      column.save(group);
    }
    if(navigation != null && navigation.getViewWidget().isVisible())
        navigation.save(group.<Void>member());
        if(bottomNavigation != null && bottomNavigation.getViewWidget().isVisible())
            bottomNavigation.save(group.<Void>member());
    if(emptyContent != null && emptyContent.getViewWidget().isVisible())
        emptyContent.save(group.<Void>member());
    group.ready(callback);
  }
View Full Code Here

  public Widget getViewWidget() {
    return this;
  }

  public void load(AsyncCallback<Void> callback) {
    AsyncCallbackGroup group = new AsyncCallbackGroup();
        for (Column col : columns) {
      col.load(group.<Void>member());
    }
    group.ready(callback);
  }
View Full Code Here

    }
    group.ready(callback);
  }

  public void save(AsyncCallback<Void> callback) {
    AsyncCallbackGroup group = new AsyncCallbackGroup();
    for (Column col : columns) {
            col.save(group.<Void>member());
    }
    group.ready(callback);
  }
View Full Code Here

  public Widget getViewWidget() {
    return this;
  }

  public void load(AsyncCallback<Void> callback) {
    AsyncCallbackGroup group = new AsyncCallbackGroup();
        for (Field field : fields) {
      field.load(group.<Void>member());
    }
    group.ready(callback);
  }
View Full Code Here

TOP

Related Classes of com.habitsoft.kiyaa.util.AsyncCallbackGroup

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.