Ich versuche, eine Datei mit PrimeFaces p hochladen: Dateiupload innen p: Dialog, aber es funktioniert nichtp: Fileupload nicht innerhalb p arbeiten: Dialog
<h:form id="form3">
<p:commandLink value="upload" oncomplete="PF('Dialog').show()" />
<p:dialog widgetVar="submitDialog" modal="true" >
<h:form id="form" enctype="multipart/form-data" >
<h:panelGrid id="submitPanelGrid" columns="2" >
<p:fileUpload id="upload" value="#{bean.file}" mode="simple" sizeLimit="100000" />
<p:commandButton id="btn3" action="#{bean.submit()}" icon="ui-icon-circle-check" ajax="false" />
</h:panelGrid>
</p:panel>
</h:form>
</p:dialog>
</h:form>
ich diese Ausnahme immer kurz nachdem ich auf den Link klicken:
org.apache.tomcat.util.http.fileupload.FileUploadBase $ InvalidContentTypeException: die Anforderung nicht eine multipart/form-data oder multipart/mixed Strom enthält,
Content-Type-Header ist application/x-www-form-urlencoded;
Aber außerhalb <p:dialog>
funktioniert es ganz gut.
Haben Sie versucht, das Multipart im Formular anzugeben? ex: –
ja ich habe versucht und es hat nicht funktioniert – Alfonso
Verschachtelte Formen sind nicht erlaubt in HTML (und JSF) – Kukeltje