Reply To: Pretty & PrimeFaces FileUpload

Splash Forums PrettyFaces Users Pretty & PrimeFaces FileUpload Reply To: Pretty & PrimeFaces FileUpload

#25781

brasmouk
Participant

I finally did run “primefaces upload” using an iframe.

I know it is not a good solution. But if it can help someone, here is an example:

viewUpload.xhtml


<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets">

		<iframe style="width:100%; height:100%; border:0px none"
			src="/myApp/upload.xhtml"></iframe>

</ui:composition>

upload.xhtml


<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<h:body>

	<h:form>
		<p:fileUpload 
			oncomplete="top.refresh()"
			fileUploadListener="#{myControler.upload}"
			mode="advanced" dragDropSupport="true" ajax="false" />
	</h:form>
 
</h:body>
</html>