I'm using the FileUpload
component of primefaces in mode="simple"
and it works fine. But when I click the save button on a particular folder, it refreshes the entire page. Can you take it?
Below is my XHTML code:
<h:form enctype="multipart/form-data" id="form"><p:messages id="messages" showDetail="true" autoUpdate="true"
closable="true" />
<h:panelGrid columns="1" cellpadding="2" style="font-size: 10px" id="panelGrid1">
<h:panelGroup id="panelGroup1" >
<p:outputLabel for="nomeTexto" value="Nome do Texto: " rendered="#{parametrizacaoTagsControl.tipoTag == 1}" />
<p:inputText id="nomeTexto"
value="#{parametrizacaoTagsControl.nomeTexto}" rendered="#{parametrizacaoTagsControl.tipoTag == 1}" />
<p:fileUpload value="#{parametrizacaoTagsControl.file}"
mode="simple" skinSimple="true" rendered="#{parametrizacaoTagsControl.tipoTag == 2}" label="Escolher arquivo"/>
</h:panelGroup>
<p:separator />
<h:panelGrid columns="4" cellpadding="2" style="font-size: 10px" id="panelGrid2" >
<p:commandButton value="Incluir" ajax="false"
actionListener="#{parametrizacaoTagsControl.upload}"
disabled="#{!parametrizacaoTagsControl.habilitaBotoes}" />
</h:panelGrid>
</h:panelGrid>
</h:form>