Details
-
Type: Bug
-
Status: Closed
-
Priority: 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>
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>
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.