[richfaces-issues] [JBoss JIRA] Created: (RF-8366) FileUpload: throw javascript error in Firefox

Patrick Dahms (JIRA) jira-events at lists.jboss.org
Wed Feb 10 05:02:09 EST 2010


FileUpload: throw javascript error in Firefox
---------------------------------------------

                 Key: RF-8366
                 URL: https://jira.jboss.org/jira/browse/RF-8366
             Project: RichFaces
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: component-input
    Affects Versions: 3.3.2.SR1
            Reporter: Patrick Dahms


I get an javascript error in firefox 3.6 if i want to upload an file (xml). No problem in IE (8).

xhtml:
==================
<a4j:form id="upload-form">
	<a4j:keepAlive beanName="uploadBean"/>
[...]
<rich:fileUpload id="uploadControl" fileUploadListener="#{uploadBean.uploadListener}"></rich:fileUpload>
[...]
</a4j:form>

Controller: (Request)
==================
[...]
public void uploadListener( UploadEvent event ) throws IOException {
		UploadItem uploadItem = event.getUploadItem();
		File uploadedFile = uploadItem.getFile();

		FileInputStream in = new FileInputStream( uploadedFile );
		byte[] data = new byte[( int ) uploadedFile.length()];
		in.read( data );
		in.close();

		LOGGER.info( "Write file to temp dir -> " + uploadItem.getFile().getCanonicalPath() );
		catalogXml = data;
}
[...]

JavaScript Error (Firebug):
====================
Nicht definierte Entität
http://localhost:8080/a4j/g/3_3_2.SR1org.ajax4jsf.javascript.AjaxScript.xhtml
Line 101

An invalid or illegal string was specified"  code: "12
http://localhost:8080/a4j/g/3_3_2.SR1org.ajax4jsf.javascript.PrototypeScript.xhtml
Line 154

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the richfaces-issues mailing list