Galera,
Estou querendo colocar mais de um p:fileUpload na mesma pagina e não estou conseguindo.
O erro é o seguinte, sempre o abaixo que esta funcionado. Eu preciso dos 2 p:fileUpload.
Estou usando o PrimeFaces 3.0.M3
Abaixo o meu codigo XHTML
<?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:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.prime.com.tr/ui"
xmlns:f="http://java.sun.com/jsf/core">
<f:view>
<h:head>
<title>Inovar - Coletor</title>
<style type="text/css">
body {
margin:0;
padding:0;
text-align:center; /* hack para o IE */
}
#tudo {
width: 760px;
margin:0 auto;
text-align:left; /* "remédio" para o hack do IE */
}
#conteudo {
padding: 5px;
}
</style>
</h:head>
<h:body>
<div id="tudo">
<div id="conteudo">
<h:form >
<p:growl id="messages" showDetail="true"/>
<p:panel header="Coletor" footer="C&S Sistemas - V 1.0" id="panel">
<h:panelGrid columns="4" >
<h:outputLabel value="Arquivo de Entrada" style="float: right"/>
<p:spacer width="20" />
<p:fileUpload id="fileUm" fileUploadListener="#{coletorControle.carregarArquivoDeEntrada}" sizeLimit="204800" auto="true" label="Arquivo De Entrada"/>
<p:spacer height="10" />
<h:outputLabel value="Arquivo de Coletor" style="float: right"/>
<p:spacer width="20" />
<p:fileUpload id="fileDois" fileUploadListener="#{coletorControle.carregarArquivoDeColetor}" sizeLimit="204800" auto="true" label="Arquivo Coletor"/>
<p:spacer height="10" />
<h:outputLabel value="Área(IPC)" style="float: right"/>
<p:spacer width="20" />
<h:inputText style="width:295px" />
<p:spacer height="10" />
<h:outputLabel value="Área(ICF)" style="float: right"/>
<p:spacer width="20" />
<h:inputText style="width:295px" />
<p:spacer height="10" />
</h:panelGrid>
</p:panel>
</h:form>
</div></div>
</h:body>
</f:view>
</html>