Package org.jboss.seam.document

Examples of org.jboss.seam.document.DocumentStore.newId()


         protected void invokeApplication() throws Exception
         {
            Conversation.instance().begin();

            DocumentStore store = (DocumentStore) getValue("#{org.jboss.seam.document.documentStore}");
            String docId = store.newId();

            Contexts.getSessionContext().set("docId", docId);

            DocumentData documentData = new ByteArrayDocumentData("base", UIDocument.PDF, new byte[100]);
            store.saveData(docId, documentData);
View Full Code Here


      }
     
      if (sendRedirect)
      {
         DocumentStore store = DocumentStore.instance();
         String id = store.newId();

         String url = store.preferredUrlForContent(baseName, type.getExtension(), id);
         url = Manager.instance().encodeConversationId(url, viewId);

         store.saveData(id, documentData);
View Full Code Here

         log.debug("Exporting PDF data to event key #0", getExportKey());
         Contexts.getEventContext().set(getExportKey(), documentData);
         return;
      }

      String id = store.newId();
      String url = store.preferredUrlForContent(baseName, documentType.getExtension(), id);
      url = Manager.instance().encodeConversationId(url, viewId);
      store.saveData(id, documentData);
      log.debug("Redirecting to #0 for PDF view", url);
      facesContext.getExternalContext().redirect(url);
View Full Code Here

      }

      if (sendRedirect)
      {
         DocumentStore store = DocumentStore.instance();
         String id = store.newId();

         String url = store.preferredUrlForContent(baseName, documentType.getExtension(), id);
         url = Manager.instance().encodeConversationId(url, viewId);

         store.saveData(id, documentData);
View Full Code Here

      }

      if (sendRedirect)
      {
         DocumentStore store = DocumentStore.instance();
         String id = store.newId();

         String url = store.preferredUrlForContent(baseName, type.getExtension(), id);
         url = Manager.instance().encodeConversationId(url, viewId);

         store.saveData(id, documentData);
View Full Code Here

      }

      if (sendRedirect)
      {
         DocumentStore store = DocumentStore.instance();
         String id = store.newId();

         String url = store.preferredUrlForContent(baseName, documentType.getExtension(), id);
         url = Manager.instance().encodeConversationId(url, viewId);

         store.saveData(id, documentData);
View Full Code Here

            log.debug("Exporting PDF data to event key #0", getExportKey());
            Contexts.getEventContext().set(getExportKey(), documentData);
            return;
        }

        String id = store.newId();
        String url = store.preferredUrlForContent(baseName, documentType
                .getExtension(), id);
        url = Manager.instance().encodeConversationId(url, viewId);
        store.saveData(id, documentData);
        log.debug("Redirecting to #0 for PDF view", url);
View Full Code Here

    public static String addResourceToDataStore(FacesContext ctx, UIResource resource) {
        String baseName = Pages.getCurrentBaseName();
        String viewId = Pages.getViewId(ctx);

        DocumentStore store = DocumentStore.instance();
        String id = store.newId();

        DocumentType type = new DocumentType("", resource.getContentType());

        DocumentData documentData = new DownloadableDocumentData(baseName, type, resource.getData());
        documentData.setFilename(resource.getFileName());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.