4 Replies Latest reply on Aug 23, 2010 1:54 PM by runner1

    fileupload: define file explorer window title

    runner1

      I am using fileupload feature in Richfaces. My development environment is on windows. I noticed the popup file explorer window's title shows "Select file(s) to upload by localhost". Is there a way to redefine the header/title of the file explorer window to something different, for example, "Please choose a file to upload to server <servername>." Please advise.

       

       

      Thanks a lot.

        • 1. Re: fileupload: define file explorer window title
          sivaprasad9394

          try to change your coding as follows,Upload files... is the heading of the text in RED color is what you are trying to change in your coding.....

           

           

           

          <rich:modalPanel id="addUploadModal" moveable="false" autosized="true"
          resizeable="false" width="750" height="450">     
          <f:facet name="header">
          <h:outputText value="Upload files..." styleClass="modalPanel12" />
          </f:facet>
          <f:facet name="controls">
          <h:panelGroup>
          <h:graphicImage value="../_assets/image/close.png" 
          id="hidelinkAddBank" styleClass="hidelink" />
          <rich:componentControl for="addUploadModal"
          attachTo="hidelinkAddBank" operation="hide" event="onclick"  />
          </h:panelGroup>
          </f:facet>
          <h:form id="blacklistedUploadModal">
          ........
          ........ your coding part inside form tag
          </h:form>
          </rich:modalPanel>
          1 of 1 people found this helpful
          • 2. Re: fileupload: define file explorer window title
            runner1

            Thank you for your reply.

             

            What I am using is <rich:fileUpload> feature.

             

            <div align="center">
            <rich:fileUpload  fileUploadListener="#{uploadTable.uploadFile}" addControlLabel="Select File"
            maxFilesQuantity="1" autoclear="true" allowFlash="true" immediateUpload="true">
            <a4j:support event="onuploadcomplete" reRender="fileUpload" />
            </rich:fileUpload>

            </div>

             

            When the Select File button is clicked, a Microsoft window file explorer will be opened. However the title of the window showed "Select file(s) to upload by localhost" (the localhost is the server name, as I am running it on my jetty locally, so it shows localhost". I wonder if there is any way to customize the "Select file(s) to upload by localhost" to "Please select a file to upload to <servername>".

             

            fileupload.gif

             

            Thanks a lot.

            • 3. Re: fileupload: define file explorer window title
              sivaprasad9394

              I tried with tomcat and below code is displaying "Select file to Upload" in IE,Still you are getting those kind of things ?

               

               

               

              <rich:fileUpload   fileUploadListener="#{uploadFileBean.fileUploadListener}"                                         
              id="upload" addControlLabel="Select File" maxFilesQuantity="1"
                 autoclear="true" allowFlash="true" immediateUpload="true"
                                                      acceptedTypes="xls,xlsx"  
              immediateUpload="#{uploadFileBean.autoUpload}"
              allowFlash="false">
                                                      <a4j:support event="onuploadcomplete" reRender="info"/>
                                                 </rich:fileUpload>
              1 of 1 people found this helpful
              • 4. Re: fileupload: define file explorer window title
                runner1

                Hello, thank you for your reply.

                 

                Yes, it shows the same thing. I tried different browsers (Chrome, firefox, IE8), it shows the same thing - window title "Select file(s) to upload by localhost".

                 

                But, when I removed allowFlash='true'. (its default value is 'false') Please see the two images attached. The title of the window shows "Open" on chrome, it shows "Choose File" on IE8. I still hope that we can define the "Open" or "Choose File" to something different, such as "Select a file to upload to <servername>". Any ideas how to do it? Thanks a lot.

                 

                 

                <rich:fileUpload
                fileUploadListener="#{fileUploadBean.listener}"
                addControlLabel="Select File"
                maxFilesQuantity="1"
                autoclear="true"
                immediateUpload="true">
                <a4j:support event="onuploadcomplete" reRender="fileUpload" />
                </rich:fileUpload>

                 

                On Chrome:

                 

                onlyonefileselected.gif

                 

                On IE8:

                 

                chooseonefileIE.gif

                 

                Thanks.