Package com.google.gwt.user.client.rpc

Examples of com.google.gwt.user.client.rpc.AsyncCallback


        params.put(ServiceNameConst.SERVICIO,ServiceNameConst.UPDATE_PROFILE);
      } else {
        params.put(ServiceNameConst.SERVICIO,ServiceNameConst.CREATE_PROFILE);
      }
      Context.getInstance().addDetailExecution("Retornando de operacion de guardado de perfil");
      DispatcherUtil.getDispatcher().execute(params,new AsyncCallback() {

            @Override
            public void onFailure(Throwable caught) {
              Context.getInstance().addDetailExecution("Retornando de operacion de guardado de perfil 0");
              DialogFactory.error("No pudo almacenarse el perfil. Aguarde un momento y vuelva a intentarlo.");
View Full Code Here


        Map params = new HashMap();
        params.put(ParamsConst.CANTIDAD, cantidad.getValue());
        params.put(ParamsConst.ID, actual.get(ParamsConst.ID));
        params.put(ServiceNameConst.SERVICIO, ServiceNameConst.DIVIDE_TASK);
        DispatcherUtil.getDispatcher().execute(params,
            new AsyncCallback() {

              @Override
              public void onFailure(Throwable caught) {
                DialogFactory.error("No fue posible dividir la tarea.");
              }
View Full Code Here

    createService.create(isA(Dto.class), isA(AsyncCallback.class));
    expectLastCall().andAnswer(new IAnswer<Object>() {
      @Override
      public Object answer() throws Throwable {
        final Object[] arguments = getCurrentArguments();
        AsyncCallback callback = (AsyncCallback) arguments[arguments.length - 1];
        callback.onSuccess(1L);
        return null;
      }
    });   
  }
View Full Code Here

    // Asynchronously load the summaries
    ServiceDefTarget target = (ServiceDefTarget) GWT.create(ReportServer.class);
    target.setServiceEntryPoint(GWT.getModuleBaseURL() + "test_reports");
    reportServer = (ReportServerAsync) target;

    reportServer.getReportSummaries(new AsyncCallback() {
      public void onFailure(Throwable caught) {
        String msg = "<p>" + caught.toString() + "</p>"
            + "<p>Is your path to the reports correct?</p>";
        statusLabel.setHTML(msg);
      }
View Full Code Here

   *
   * @param id the non-null id of the report
   */
  private void getReportDetails(String id) {
    statusLabel.setText("Retrieving the report...");
    reportServer.getReport(id, new AsyncCallback() {
      public void onFailure(Throwable caught) {
        statusLabel.setText(caught.toString());
      }

      public void onSuccess(Object result) {
View Full Code Here

                    treeGrid.redraw();
                }
            }
        });

        dataSource.addFailedFetchListener(new AsyncCallback() {

            // just in case we have a failure while fetching, try to make sure we don't lock up the view.
            public void onFailure(Throwable caught) {
                loadAllPlatforms = false;
                updateButtonEnablement(selectAllButton, deselectAllButton, importButton, ignoreButton, unignoreButton);
View Full Code Here

                    return ((TypeLookup) o).id.compareTo(((TypeLookup) c).id);
                }
            });
        box.setMultipleSelect(false);

        Services.CONTACTS.getTypeLookups(new AsyncCallback() {
                public void onSuccess(Object result) {
                    box.setOptions((List) result);
                }

                public void onFailure(Throwable caught) {
View Full Code Here

/** Creates a new instance of AddressEdit */
    public AddressEdit() {
        super();

        Services.CONTACTS.getStateLookups(new AsyncCallback() {
                public void onSuccess(Object result) {
                    state.setOptions((List) result);
                }

                public void onFailure(Throwable caught) {
                    Window.alert("Error getting states - " +
                        caught.getMessage());

                    return;
                }
            });

        Services.CONTACTS.getTypeLookups(new AsyncCallback() {
                public void onSuccess(Object result) {
                    type.setOptions((List) result);
                }

                public void onFailure(Throwable caught) {
View Full Code Here

    private class ContactDataProvider implements SortableDataProvider {
        public void getChunk(final HasChunks table, final int chunkNumber) {
            GWT.log("Getting from " + (chunkNumber * 100), null);
            Services.CONTACTS.findContacts(100, chunkNumber * 100, "lastName",
                true,
                new AsyncCallback() {
                    public void onSuccess(Object result) {
                        table.setChunk((Collection) result);
                    }

                    public void onFailure(Throwable caught) {
View Full Code Here

        }

        public void sortOnProperty(final HasChunks table,
            final String propertyName, final boolean ascending) {
            Services.CONTACTS.findContacts(100, 0, propertyName, ascending,
                new AsyncCallback() {
                    public void onSuccess(Object result) {
                        table.init((Collection) result, 2);
                    }

                    public void onFailure(Throwable caught) {
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.rpc.AsyncCallback

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.