ICEfaces
  1. ICEfaces
  2. ICE-7735

ace:fileEntry generates a javascript error when the page first loads if it's not encapsulated in an ace:panel

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 3.0.RC2
    • Fix Version/s: 3.3
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      GF 3.1.1 build 12
      FF
    • Workaround Exists:
      Yes

      Description

      When you have an ace:fileEntry that is not inside of an ace:panel when the page first loads it generates javascript errors. Then if you select a file it doesn't upload. The second time you do it it will work.

      jQuery is not defined
      ice.ace.fileentry is undefined

      <html xmlns="http://www.w3.org/1999/xhtml"
            xmlns:h="http://java.sun.com/jsf/html"
            xmlns:ace="http://www.icefaces.org/icefaces/components">
          <h:head>
          </h:head>
          <h:body>
              <h:form>
                  <ace:fileEntry id="file-entry"
                                 relativePath="/files/"
                                 maxFileCount="10"
                                 maxFileCountMessage="Limited to 10 files uploaded concurrantly."
                                 fileEntryListener="#{Test.fileEntryListener}"
                                 maxFileSize="6291456"
                                 maxFileSizeMessage="Submitted file is too large."
                                 maxTotalSize="18874368"
                                 maxTotalSizeMessage="Total size of submitted files is too large."
                                 required="true"
                                 requiredMessage="The file is required to submit this form."
                                 useOriginalFilename="true"
                                 useSessionSubdir="true"/>
                  <h:commandButton type="submit" value="Send File"/>
              </h:form>
          </h:body>
      </html>

        Activity

        Hide
        Ken Fyten added a comment -

        Please review for validity.

        Show
        Ken Fyten added a comment - Please review for validity.
        Hide
        Mark Collette added a comment -

        Created an app with nothing but ACE dependencies, and then used the .xhtml markup given to create a page with no ACE components except fileEntry. My theory was that even though fileEntry has specifically been coded to not have a jQuery dependency, and none can currently be found in it, possibly one had snuck in, or been introduced by the framework, which would explain the jira's error. Testing showed no problem uploading, and Firebug confirmed no error in the console, and no jquery or other unexpected links in the head.

        I recommend attaching a test war that reproduces this issue.

        Show
        Mark Collette added a comment - Created an app with nothing but ACE dependencies, and then used the .xhtml markup given to create a page with no ACE components except fileEntry. My theory was that even though fileEntry has specifically been coded to not have a jQuery dependency, and none can currently be found in it, possibly one had snuck in, or been introduced by the framework, which would explain the jira's error. Testing showed no problem uploading, and Firebug confirmed no error in the console, and no jquery or other unexpected links in the head. I recommend attaching a test war that reproduces this issue.

          People

          • Assignee:
            Mark Collette
            Reporter:
            Tim Dodd
          • Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: