Package org.primefaces.webapp

Examples of org.primefaces.webapp.MultipartRequest


            if(fileCleaningTracker != null) {
                diskFileItemFactory.setFileCleaningTracker(fileCleaningTracker);
            }

      ServletFileUpload servletFileUpload = new ServletFileUpload(diskFileItemFactory);
      MultipartRequest multipartRequest = new MultipartRequest(httpServletRequest, servletFileUpload);

      if(logger.isLoggable(Level.FINE))
        logger.fine("File upload request parsed succesfully, continuing with filter chain with a wrapped multipart request");

      filterChain.doFilter(multipartRequest, response);
View Full Code Here


import org.primefaces.webapp.MultipartRequest;

public class CommonsFileUploadDecoder{

    public static void decode(FacesContext context, FileUpload fileUpload) {
    MultipartRequest multipartRequest = null;
        Object request = context.getExternalContext().getRequest();
   
    while(request instanceof ServletRequestWrapper) {
      if(request instanceof MultipartRequest) {
        multipartRequest = (MultipartRequest) request;
View Full Code Here

    @Override
  public void decode(FacesContext context, UIComponent component) {
    FileUpload fileUpload = (FileUpload) component;
        String clientId = fileUpload.getClientId(context);
    MultipartRequest multipartRequest = getMultiPartRequestInChain(context);
   
    if(multipartRequest != null) {
      FileItem file = multipartRequest.getFileItem(clientId);

      if(file != null) {
        UploadedFile uploadedFile = new DefaultUploadedFile(file);

                if(fileUpload.getMode().equals("simple"))
View Full Code Here

public class FileUploadRenderer extends CoreRenderer {
 
  public void decode(FacesContext facesContext, UIComponent component) {
    FileUpload fileUpload = (FileUpload) component;
    String clientId = fileUpload.getClientId(facesContext);
    MultipartRequest multipartRequest = getMultiPartRequestInChain(facesContext);
   
    if(multipartRequest != null) {
      FileItem file = multipartRequest.getFileItem(clientId);
     
      if(file != null) {
        UploadedFile uploadedFile = new DefaultUploadedFile(file);
        fileUpload.queueEvent(new FileUploadEvent(fileUpload, uploadedFile));
      }
View Full Code Here

      if(uploadDir != null) {
        diskFileItemFactory.setRepository(new File(uploadDir));
      }
       
      ServletFileUpload servletFileUpload = new ServletFileUpload(diskFileItemFactory);
      MultipartRequest multipartRequest = new MultipartRequest(httpServletRequest, servletFileUpload);
     
      if(logger.isLoggable(Level.FINE))
        logger.fine("File upload request parsed succesfully, continuing with filter chain with a wrapped multipart request");
     
      filterChain.doFilter(multipartRequest, response);
View Full Code Here

public class FileUploadRenderer extends CoreRenderer {
 
  public void decode(FacesContext facesContext, UIComponent component) {
    FileUpload fileUpload = (FileUpload) component;
    MultipartRequest multipartRequest = getMultiPartRequestInChain(facesContext);
   
    if(multipartRequest != null) {
      FileItem file = multipartRequest.getFileItem(fileUpload.getInputFileId(facesContext));
     
      if(file != null) {
        UploadedFile uploadedFile = new DefaultUploadedFile(file);
        fileUpload.queueEvent(new FileUploadEvent(fileUpload, uploadedFile));
      }
View Full Code Here

TOP

Related Classes of org.primefaces.webapp.MultipartRequest

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.