Package org.primefaces.model

Examples of org.primefaces.model.DefaultStreamedContent


        graphicText = new DefaultStreamedContent(new ByteArrayInputStream(croppedImageSimple.getBytes()));
        return null;
    }

    public String cropCoordinates() throws IOException {
        graphicText = new DefaultStreamedContent(new ByteArrayInputStream(croppedImageCoordinates.getBytes()));
        return null;
    }
View Full Code Here


        graphicText = new DefaultStreamedContent(new ByteArrayInputStream(croppedImageCoordinates.getBytes()));
        return null;
    }

    public String cropAspectRatio() throws IOException {
        graphicText = new DefaultStreamedContent(new ByteArrayInputStream(croppedImageAspectRatio.getBytes()));
        return null;
    }
View Full Code Here

        graphicText = new DefaultStreamedContent(new ByteArrayInputStream(croppedImageAspectRatio.getBytes()));
        return null;
    }

    public String cropMinMaxSize() throws IOException {
        graphicText = new DefaultStreamedContent(new ByteArrayInputStream(croppedImageMinMaxSize.getBytes()));
        return null;
    }
View Full Code Here

        this.capturedImage = capturedImage;
    }

    public void onCapture(CaptureEvent captureEvent) {
        byte[] data = captureEvent.getData();
        capturedImage = new DefaultStreamedContent(new ByteArrayInputStream(data));
    }
View Full Code Here

    private StreamedContent downloadFile;

    public FileController() {
        InputStream stream = this.getClass().getResourceAsStream("/chapter7/PFSamplePDF.pdf");
        downloadFile = new DefaultStreamedContent(stream, "application/pdf", "PFSample.pdf");
    }
View Full Code Here

  public StreamedContent getImagemGerada() throws IOException {
    if (this.imagemGerada == null) {
     
      this.imagemGerada =
          new DefaultStreamedContent(new ByteArrayInputStream(this.imagem),
              "image/png", this.nome);
    }
    return this.imagemGerada;
  }
View Full Code Here

      String id = context.getExternalContext().getRequestParameterMap().get("idx");
     
      if (id != null) {
        resposta = this.imagens.get(Integer.parseInt(id));
      } else {
        resposta = new DefaultStreamedContent();
      }
    }
   
    return resposta; 
   
View Full Code Here

        activeSubPanels = Integer.toString(subs.size() - 1);
    }

    public StreamedContent download(StoredFile file) {
        return new DefaultStreamedContent(
                        new ByteArrayInputStream(file.getFileData()),
                        file.getContentType(),
                        file.getFileName());
    }
View Full Code Here

    public StreamedContent downloadAll(Submission sub) {
        String filename = sub.getAssignment().getTitle().replace(' ', '_')
                + "_group_" + sub.getSubmittingGroup().getId() + "_all_files.zip";

        return new DefaultStreamedContent(
                        FireUtil.zipFiles(sub.getFiles()),
                        "application/zip", filename);
    }
View Full Code Here

@SessionScoped
public class DynaImageController implements Serializable {

    public StreamedContent getGraphicText() throws IOException {
        InputStream stream = this.getClass().getResourceAsStream("/chapter9/primefaces.jpg");
        return new DefaultStreamedContent(stream);
    }
View Full Code Here

TOP

Related Classes of org.primefaces.model.DefaultStreamedContent

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.