5 Replies Latest reply on Sep 27, 2012 9:19 AM by waleed _

    rich:fileUpload, the upload button disappeared, my god.

    Janli Lee Newbie

      <h:form prependId="false">

            <rich:fileUpload/>

      </h:form>

       

      code is too easy, isn't it~~

       

      the steps below show my problem.

      1. Choose "Add", select file1.txt, and then click "Upload". After uploaded, i can see a "Clear" link label for this file.

      2. Choose "Add" again, select file2.txt, and then click the "Clear" link label for file1.txt created in the first step (Not the Clear All on top right).

      3. After these, the "Upload" button disappeared, my god.

       

      Any 1 can help me?

      I am sorry, my english is poor (from asia), hope you can make sense what i said.

       

      IDE: eclipse 3.7.1

      plugin: jboss

      richface ver: 4.2.0

      Sys: windows 7

      Browser: IE 8

        • 1. Re: rich:fileUpload, the upload button disappeared, my god.
          Janli Lee Newbie

          oh my god, who can help me?

          • 2. Re: rich:fileUpload, the upload button disappeared, my god.
            nguyen tung son Newbie

            Do not know if that helps you?

             

            <rich:fileUpload id="uploadDoc1" style="width:100%;border:none;height:100%"

                                                                                             onuploadcomplete="self.parent.location.href='#{uploadController.time}'"

                                                                                             acceptedTypes="#{uploadController.type}"

                                                                                             uploadControlLabel="#{locale.upload}"

                                                                                             addControlLabel="#{locale.select_file}"

                                                                                             clearAllControlLabel="#{locale.delete_all}"

                                                                                             clearControlLabel="#{locale.delete}"

                                                                                             cancelEntryControlLabel="#{locale.remove}"

                                                                                             doneLabel=""

                                                                                             sizeErrorLabel="#{locale.size_mismatch}."

                                                                                             transferErrorLabel="#{locale.error_upload_process}"

                                                                                             progressLabel="#{locale.uploading} ..."

                                                                                             maxFilesQuantity="10"

                                                                                             fileUploadListener="#{uploadController.uploadDocListener}"

                                                                                             listHeight="108px"

                                                                                             allowFlash="true"

                                                                                             uploadListClass="uploadListClass">

             

                                                                                <f:facet name="label">

                                                                                    <h:outputText value="#{locale.Uploaded} {_KB}#{locale.from_kb} {KB}KB --- {mm}:{ss}"></h:outputText>

                                                                                </f:facet>

                                                                                <f:param value="#{uploadController.pagereload}" name="page"/>

                                                                                <f:param value="#{uploadController.table}" name="table"/>

                                                                                <f:param value="#{uploadController.fs200}" name="fs200"/>

                                                                               

                                                                            </rich:fileUpload>

            • 3. Re: rich:fileUpload, the upload button disappeared, my god.
              Janli Lee Newbie

              I am sorry to say that in Rich4.2, fileupload is different from earlier version, such as 3.3

              In 4.2, fileupload control can't be stoped or cancelled...

               

              Capture a picture as attachment.

              fileupload.png

              • 4. Re: rich:fileUpload, the upload button disappeared, my god.
                Brian Leathem Master

                Hi Janil, sounds like you have uncovered a bug.  Please file a jira issue, and include some short/simple/self-contained sample code to re-produce the problem.  We'll see if we can get that fixed for an upcoming release.

                 

                https://community.jboss.org/wiki/SubmittingEffectiveIssueReports

                 

                Brian

                • 5. Re: rich:fileUpload, the upload button disappeared, my god.
                  waleed _ Newbie

                  i fix it by

                   

                          <script>

                  function resetClear(id)

                  {

                              var container = id;

                              for (var i = 0; i!=1; i++) {

                                  var child = container.childNodes[i];

                                  if(child.childNodes[0]!=null)

                                      {

                                           var childChild =    child.childNodes[0];

                                           childChild.childNodes[0].style.display ='inherit';

                                      }

                              }

                  }

                         

                          </script>

                   

                  and then i wil call this function on onclear event in fileUpload such as :

                   

                  <rich:fileUpload onclear="resetClear(this);"/>

                  and all things are  done !!!!!!!!!!!