Package org.exoplatform.webui.form

Examples of org.exoplatform.webui.form.UIFormUploadInput


   private String[] inputName;

   public UISampleDownloadUpload() throws Exception
   {
      addUIFormInput(new UIFormUploadInput("name0", "value0"));
      addUIFormInput(new UIFormUploadInput("name1", "value1"));
      addUIFormInput(new UIFormUploadInput("name2", "value2"));
   }
View Full Code Here


         String[] downloadLink = new String[3];
         String[] fileName = new String[3];
         String[] inputName = new String[3];
         for (int index = 0; index <= 2; index++)
         {
            UIFormUploadInput input = uiForm.getChildById("name" + index);
            UploadResource uploadResource = input.getUploadResource();
            if (uploadResource != null)
            {
               DownloadResource dresource =
                  new InputStreamDownloadResource(input.getUploadDataAsStream(), uploadResource.getMimeType());
               dresource.setDownloadName(uploadResource.getFileName());
               downloadLink[index] = dservice.getDownloadLink(dservice.addDownloadResource(dresource));
               fileName[index] = uploadResource.getFileName();
               inputName[index] = "name" + index;
            }
View Full Code Here

    private String[] fileName;

    private String[] inputName;

    public UISampleDownloadUpload() {
        addUIFormInput(new UIFormUploadInput("name0", "value0"));
        addUIFormInput(new UIFormUploadInput("name1", "value1", 1));
        addUIFormInput(new UIFormUploadInput("name2", "value2", 200));
        addUIFormInput(new UIUploadInput("name3", "name3", 0, 300, UploadUnit.KB));
        addUIFormInput(new UIUploadInput("name4", "name4", 1, 300, UploadUnit.MB));
    }
View Full Code Here

            DownloadService dservice = uiForm.getApplicationComponent(DownloadService.class);
            List<String> downloadLink = new ArrayList<String>();
            List<String> fileName = new ArrayList<String>();
            List<String> inputName = new ArrayList<String>();
            for (int index = 0; index <= 2; index++) {
                UIFormUploadInput input = uiForm.getChildById("name" + index);
                UploadResource uploadResource = input.getUploadResource();
                if (uploadResource != null) {
                    DownloadResource dresource = new InputStreamDownloadResource(input.getUploadDataAsStream(),
                            uploadResource.getMimeType());
                    dresource.setDownloadName(uploadResource.getFileName());
                    downloadLink.add(dservice.getDownloadLink(dservice.addDownloadResource(dresource)));
                    fileName.add(uploadResource.getFileName());
                    inputName.add("name" + index);
                }
            }

            for (int index = 3; index < 5; index++) {
                UIUploadInput input = uiForm.getChildById("name" + index);
                UploadResource[] uploadResources = input.getUploadResources();
                for (UploadResource uploadResource : uploadResources) {
                    DownloadResource dresource = new InputStreamDownloadResource(new FileInputStream(new File(
                            uploadResource.getStoreLocation())), uploadResource.getMimeType());
                    dresource.setDownloadName(uploadResource.getFileName());
                    downloadLink.add(dservice.getDownloadLink(dservice.addDownloadResource(dresource)));
View Full Code Here

TOP

Related Classes of org.exoplatform.webui.form.UIFormUploadInput

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.