Hi,
js console shows error only when update attribute is @form
it works on:
IE 9 - IE 9 mode
error is showing on:
Chrome 15.0.874.121 m ( Uncaught TypeError: Cannot call method _adjustMaxNumberOfFiles' of undefined)
Firefox ( b is undefined )
IE 9 - IE 8 mode
IE 9 - IE 7 mode
Full page:
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml" xmlns:f="
http://java.sun.com/jsf/core" xmlns:h="
http://java.sun.com/jsf/html" xmlns:p="
http://primefaces.org/ui">
<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>test</title>
</h:head>
<h:body>
<h:form id="form" enctype="multipart/form-data">
<p:fileUpload auto="true" fileUploadListener="#{test.uploadFile}" update="@form" oncomplete="alert('oncomplete');"/>
</h:form>
</h:body>
</html>
Bean:
import org.primefaces.event.FileUploadEvent;
import org.primefaces.model.UploadedFile;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
@ManagedBean
@ViewScoped
public class Test {
public void uploadFile(FileUploadEvent event) {
UploadedFile uploadedFile = (UploadedFile) event.getFile();
// ...
}
public Test() {
}
}
i've made an issue but it was closed with status CantReplicate:
http://code.google.com/p/primefaces/iss ... il?id=2938
What am I doing wrong?
Primefaces 3.0.RC1-SNAPSHOT,
Glassfish 3.1.1, Tomcat 7.0.23