Parameters from f: param are not sent with AJAX request when form enctype is multipart / form-data
I am running Wildfly 8.2 and I am using the JSF version bundled with it, 2.2.8-jbossorg-1.
I have the following facelet:
<h:form enctype="multipart/form-data">
<h:commandButton value="Submit">
<f:param name="myparam" value="true"/>
<f:ajax execute="@this" render="@this"/>
</h:commandButton>
</h:form>
When I click on the submit button, multiple parameters are passed, but not myparam. If I remove the enctype = "multipart / form-data" from the form, myparam = true gets passed just fine.
With or without enctype = "multipart / form-data", if I remove f: ajax, myparam = true is always sent.
Why does it work without enctype = "multipart / form-data" but not with? And how can I make it work?
+3
source to share
1 answer
This is a mistake in Moharra. I just reported this as issue 3968 .
Currently, one job is to pass them as arguments to an EL method.
<h:form enctype="multipart/form-data">
<h:commandButton value="Submit" action="#{bean.action(true)}">
<f:ajax execute="@this" render="@this"/>
</h:commandButton>
</h:form>
public void action(boolean myparam) {
// ...
}
+4
source to share