For reasons of requirement, I have to combine components of primefaces and an input file in pure html. Now my question is, can I have the html input inside a JSF form? And that practically the entire view is with PrimeFaces and from a bean process the file to be loaded with the input file component. Example of what I want:
<p:panel header="Subir TXT" id="panelDwn" style="border: none;" >
<h:panelGrid columns="1" cellpadding="5" style="border: none;">
<h:outputLabel style="color: #545454; font-size: 16px;" value="Seleccione el archivo a validar TXT:" />
</h:panelGrid>
<h:panelGrid id="panelDes" columns="2" cellpadding="5" style="border: none;">
<!-- INPUT FILE HTML -->
<input type="file" name="archivoupload"/>
<h:outputLabel id="lblStatus" style="color: #545454; font-size: 16px;" value="#{uploadFileBean.status}" />
<!--h:outputLabel style="color: #545454; font-size: 16px;" value="#{uploadFileBean.statusDownload}" /-->
</h:panelGrid>
<br />
<h:panelGrid columns="2" cellpadding="5" style="border: none;">
<p:commandButton styleClass="basicbtngobmx" value="Regresar" actionListener="#{captchaComponent.reset}" ajax="false" />
<p:commandButton id="comdDwn" value="Descargar archivo" actionListener="#{uploadFileBean.resetValida}" ajax="false" disabled="#{uploadFileBean.status ==null or captchaComponent.statusBtnDescargarArchivo ==null}" update="fileUp">
<p:fileDownload value="#{uploadFileBean.file}" ajax="false" />
</p:commandButton>
</h:panelGrid>
</p:panel>
From behind, from a bean, call a servlet to upload and process the file and have a processed txt as output. I just have my doubt for this functionality.
In the code, I try to exemplify that the inputFile will be html and the rest components of primefaces.
If it is by request there is no other but I do not recommend what you mention.
But to solve what you comment use this tag
with this jsf will be able to compile your html code without problems greetings
It can be done without any problem, what jsf does is generate that html for you and primefaces also generates HTML for you, with jquery, I would choose to do it with jquery instead of pure html, since that way you could give it an ajax call, if you do it alone with html, you will have to submit the form to be processed with the servlet.
Cheers