Class Reader

java.lang.Object
com.levigo.jadice.web.client.reader.Reader

public class Reader extends Object
Client-side Reader to load a document from the server.
  • Constructor Details

    • Reader

      public Reader()
  • Method Details

    • read

      public ServerConnection.Cancelable read(Source source, AsyncCallback<Document> callback)
      Initiates server side document loading. Please note that prior to calling complete() all Sources must have been added or appended to the Reader.

      The client is notified via AsyncCallback about the read status. The AsyncCallbacks onSuccess() method will be called after the first DocumentReadResult has successfully been processed. Then a document will be available on the client side and the client can start to load the document into the viewer. Usually this will be done by calling viewer.getPageView().setDocument(result) (where "result" is the callback's result object, a Document instance).

      Subsequent pages will be loaded asynchronously - processing these will be handled by appropriate listeners.

      Parameters:
      source -
      callback - Called when the Document is available for the client.