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

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


        }

        public void init(final HasChunks table) {
            if (!loaded) {
                Services.CONTACTS.findContacts(100, 0, "lastName", true,
                    new AsyncCallback() {
                        public void onSuccess(Object result) {
                            table.init((Collection) result, 2);
                        }

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


        final GWTJahiaNode targetNode = status.getData(TARGET_NODE);
        final List<String> referenceType = status.getData(TARGET_REFERENCE_TYPE);
        final List<GWTJahiaNode> sourceNodes = status.getData(SOURCE_NODES);
        final GWTJahiaSearchQuery searchQuery = status.getData(SOURCE_QUERY);

        AsyncCallback callback = new DropAsyncCallback();
        final JahiaContentManagementServiceAsync service = JahiaContentManagementService.App.getInstance();
        if (EMPTYAREA_TYPE.equals(targetType)) {
            status.setData(OPERATION_CALLED, "true");
            GWTJahiaNode parent = (GWTJahiaNode) targetNode;
            ((AreaModule) ((ModuleDropTarget)e.getDropTarget()).getModule()).createNode(new BaseAsyncCallback<GWTJahiaNode>() {
View Full Code Here

   return $wnd.article;
   }-*/;

  public static void callService(final WikiServiceAsync service, String title, String body) {
    ANSWER_HTML.setHTML("Processing submission...");
    service.send(title, body, 1, new AsyncCallback() {
      public void onSuccess(Object obj) {
        ANSWER_HTML.setHTML("Thanks for your submission");
      }

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

   return $wnd.article;
   }-*/;

  public static void callService(final WikiServiceAsync service, String title, String body) {
    ANSWER_HTML.setHTML("Processing submission...");
    service.send(title, body, 1, new AsyncCallback() {
      public void onSuccess(Object obj) {
        ANSWER_HTML.setHTML("Thanks for your submission");
      }

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

        return DOM.getElementProperty(DOM.getElementById("surveyProvider"), "content");
    }

    private class ButtonListener implements ClickListener {
        public void onClick(Widget sender) {
            service.buttonClicked(surveyProvider(), sender.getStyleName(), new AsyncCallback() {
                public void onFailure(Throwable caught) {
                    caught.printStackTrace();
                }

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

        }
    }

    public class ChangeListener {
        public void answerChanged(String id, String answer) {           
            service.changeAnswer(surveyProvider(), id, answer, new AsyncCallback() {

                public void onFailure(Throwable caught) {
                    caught.printStackTrace();
                }
View Full Code Here

                }
            });
        }

        public void pageChanged(int toPageNum) {
            service.changePage(surveyProvider(), toPageNum, new AsyncCallback() {
                public void onFailure(Throwable caught) {
                    caught.printStackTrace();
                }

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

      @SuppressWarnings("unchecked")
      @Override
      public void onClick(ClickEvent event) {
        service.commment(subject.getText(), comment.getText(),
            new AsyncCallback() {

              @Override
              public void onFailure(Throwable caught) {
                MainPageWidget
                    .setErrorMessage("Unable to post your comment!");
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

    // 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

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.