6 Replies Latest reply on Mar 11, 2010 1:14 PM by nbelaevski

    rich:fileupload and transfer error

    agallo73

      Hello, using multiple file upload (with flash enabled) it's possible to download multiple files. I'd like to know if it's possible to change the style of the transferErrorLabel (i'd like to render it in red and in bold) in order to give immediate  evidence of a failed upload when it happens.

       

      May someone give me some hint please?

       

      Moreover, i'd like to know if there's some way, when several files are selected for the upload,  to make the upload work in parallel way. For what I noticed, the upload  is done in the sequence the files are added to the list and you have to wait for one upload to complete for the other to start.

       

      Any help?

       

      Thanks in advance.

       

      Antonio

        • 1. Re: rich:fileupload and transfer error
          agallo73
          May someone of the expert help me? I did not succeed in finding any info as far as single labels. It should be enough simple for deveopers working in the project to reply this question. Any hint please? If a user performs many uploads it can happen that some file is corrupted and since my listener code checks for integrity, a transfer error message is displayed and it should be different from the other messages showing that the upload has been done correctly or has not started yet.
          • 2. Re: rich:fileupload and transfer error
            agallo73

            Any help as far as the possibility to change the label style in order to have evidence of an error being occurred?

             

            May some contributor reply please?

             

            I read all the documentation but was unable to find something related to a single label.

             

            It should be easy to do... knowing how to do it...

            • 3. Re: rich:fileupload and transfer error
              nbelaevski
              Looks like it is not currently possible to pass server exception information back to file upload component.
              • 4. Re: rich:fileupload and transfer error
                agallo73

                Sorry but I do not understand your answer.

                 

                I made a precise answer:

                 

                I'd like to know if it's possible to change the style of the transferErrorLabel (i'd like to render it in red and in bold) in order to give immediate  evidence of a failed upload when it happens.

                 

                Thi is a label that can be customized in the rich:fileupload component.

                 

                I do not understand the connection with your reply as far as my question is concerned.

                 

                May you please clarify?

                • 5. Re: rich:fileupload and transfer error
                  agallo73

                  I have to deploy my application this day on the server.

                   

                  May someone collaborating at this project help me please?

                   


                  I think not to be asking an impossible thing... who knows components should be able to answer very soon.

                   

                   

                  I can not release an application where there's no evidence of the error being occurred.

                   

                  I just want the transferErrorLabel to be rendered in bold and red colour in order to indicate something wrong.

                   

                  There's no documentation as far as css for  this label is concerned.

                   

                  Is it possible to change the style or not......?

                   

                   


                   

                  <rich:fileUpload reRender="info" listHeight="400px"
                              acceptedTypes="pdf, DOC, DOCX, XLS, XLSX, PPT, PPTX"
                                  fileUploadListener="#{trasformBean.listener}"
                                  
                                   ontyperejected="alert('formato del file non supportato')"
                                  addControlLabel="Aggiungi..." clearAllControlLabel="Cancella tutto"
                                  clearControlLabel="Cancella" stopControlLabel="Termina"
                                  cancelControlLabel="Cancella"
                                  cancelEntryControlLabel="Cancella"
                                  doneLabel="Caricato" style="font-weight:bold;color:red; "
                                  stopEntryControlLabel="Termina"
                                  uploadControlLabel="Carica i file" id="upload"
                                  immediateUpload="#{trasformBean.autoUpload}"
                                  maxFilesQuantity="#{trasformBean.uploadsAvailable}"
                                 transferErrorLabel="il file scaricato potrebbe essere corrotto o protetto"
                                  allowFlash="#{trasformBean.useFlash}">

                   

                  Any help is greatly appreciated

                  • 6. Re: rich:fileupload and transfer error
                    nbelaevski
                    From the first sight, it's not possible to specify class for this label, but you can use "onerror" handler to trigger external effect component if you want to point user's attention to the message.