Package org.latexlab.docs.client.commands

Examples of org.latexlab.docs.client.commands.NewDocumentLoadCommand


   * If "docid" is blank then a new, unsaved, document is loaded.
   */
  public void loadDocument() {
    String documentId = Window.Location.getParameter("docid");
    if (documentId == null || documentId.equals("")) {
      execute(new NewDocumentLoadCommand());
    } else {
      execute(new SystemLoadDocumentCommand(documentId));
    }
  }
View Full Code Here


      if (documentId != null && documentId.startsWith("#")) {
      documentId = documentId.substring(1);
      }
    }
    if (documentId == null || documentId.equals("")) {
      execute(new NewDocumentLoadCommand());
    } else {
      execute(new SystemLoadDocumentCommand(documentId));
    }
  }
View Full Code Here

  }
  private void execute(final SystemLoadDocumentCommand cmd) {
    showStatus("Loading document...", true);
    docService.getDocument(cmd.getDocumentId(), new AsyncCallback<DocumentServiceEntry>() {
      public void onFailure(Throwable caught) {
        handleError(caught, cmd, new NewDocumentLoadCommand(), 1);
      }
      public void onSuccess(DocumentServiceEntry result) {
      if (result == null) {
        handleError(new Exception("No document found with the ID " + cmd.getDocumentId()), cmd,
            new NewDocumentLoadCommand(), 0);
      } else {
          setDocument(result, false);
          clearStatus();
          execute(new CurrentDocumentLoadContentsCommand());
      }
View Full Code Here

TOP

Related Classes of org.latexlab.docs.client.commands.NewDocumentLoadCommand

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.