5 Replies Latest reply on Jun 12, 2009 7:21 AM by ilya_shaikovsky

    fileupload and clearall

    ajanz

      i declared my upload as

       <rich:fileUpload immediateUpload="true" addControlLabel="Hinzufügen" maxFilesQuantity="1" progressLabel="Datei wird übertragen" doneLabel="Datei übertragen" clearAllControlLabel="Löschen" uploadControlLabel="Übertragen" fileUploadListener="#{Page.listener}" cancelEntryControlLabel="Abbrechen" listWidth="600px" listHeight="100px" >
       </rich:fileUpload>
      
      
      


      if the user uploaded a file, the "clearall" button appears.

      if i click the clearall button, the upload button stays disabled.

      is the a way to enable it? or to make the clear all button not appearing?



        • 1. Re: fileupload and clearall
          ilya_shaikovsky

          if the files disappears from the list on using clear all?

          which RF version used?

          • 2. Re: fileupload and clearall
            ajanz

            i use version 3.3.1

            yes, i click clear all (delete), now i must be able to upload a new one...which is not possible because upload is disabled.

            • 3. Re: fileupload and clearall
              ilya_shaikovsky

              so clear all clearing the list, then you add more files and can't upload?

              show the code please.

              • 4. Re: fileupload and clearall
                ajanz

                i can't add any more files because "add" is disabled.

                 <a4j:form>
                 <rich:fileUpload immediateUpload="true" addControlLabel="Hinzufügen" maxFilesQuantity="1" progressLabel="Datei wird übertragen" doneLabel="Datei übertragen" clearAllControlLabel="Löschen" uploadControlLabel="Übertragen" fileUploadListener="#{Page.listener}" cancelEntryControlLabel="Abbrechen" listWidth="600px" listHeight="100px" >
                 <a4j:support event="onuploadcomplete" reRender="uploadform" ></a4j:support>
                 </rich:fileUpload>
                 </a4j:form>
                


                maxquantity is 1, but clear means for user to add another file.

                • 5. Re: fileupload and clearall
                  ilya_shaikovsky

                  Got it sorry.. So this attribute not just for client side but for server side restriction of uploaded files in order to prevent upload flood. So after file uploaded to server this attribute value = 1 means that no more files could be uploaded. It should be managed on your own and not defined with just constant.

                  Please visit our demo in order to check how it managed there. link to sources in my signature.