Form reset after upload by fileUpload
adsonvinicius Jan 3, 2012 2:47 PMHi, i'm using RF4 and i have a popupanel with fileUpload. In popupPanel has inputtext also. When i upload anything the form is reseted. How to solve it?
<rich:popupPanel modal="true" id="addPane" moveable="false" autosized="true">
<f:facet name="header">
<h:outputText value="Adicionar Categoria" />
</f:facet>
<h:form>
<h:panelGrid id="addGrid" columns="1">
<a4j:outputPanel ajaxRendered="true">
<h:panelGrid columns="2">
<h:outputText value="Legenda" />
<h:inputText value="#{areaInterativa.novoNome}" />
<h:outputText value="Link" />
<h:inputText value="#{areaInterativa.novoLink}" />
<h:outputText value="Ordem" />
<h:inputText value="#{areaInterativa.novoOrdem}"/>
</h:panelGrid>
</a4j:outputPanel>
</h:panelGrid>
<h:panelGrid columns="1">
<rich:fileUpload addLabel="Selecionar Imagem"
acceptedTypes="png, jpg"
data=""
listHeight="30px"
maxFilesQuantity="1"
fileUploadListener="#{upload.listenerAI}"
uploadLabel="Enviar"
clearAllLabel="Remover"
deleteLabel="Deletar"
doneLabel="Enviado!"
clearLabel="Remover">
<a4j:ajax event="uploadcomplete" listener="#{upload.atualizaNovaCategoria}"/>
</rich:fileUpload>
</h:panelGrid>
<a4j:commandButton value="Salvar" action="#{areaInterativa.adicionaCategoria}" render="tabela" execute="addPane" oncomplete="if (#{facesContext.maximumSeverity==null}) #{rich:component('addPane')}.hide();" />
<a4j:commandButton value="Cancelar" onclick="#{rich:component('addPane')}.hide(); return false;" />
</h:form>
</rich:popupPanel>
Thanks,
Adson