5
votes

I want to submit (execute) values from multiple forms, not just the enclosing form. So, I want to be able to do something like this:

<h:form id="form1>
    <h:inputText id="testinput1" value="#{testBean.input1}" />
</h:form>

<h:form id="form2>
    <h:inputText id="testinput2" value="#{testBean.input2}" />

    <h:commandButton value="Submit">
        <f:ajax execute=":form1 :form2"/>
    </h:commandButton>
</h:form>

How would you solve this?

What is <f:ajax execute="@all"> really supposed to do? It POSTs only the enclosing form seems to be related, but addresses a slightly different problem and also does not solve it (or this).

1

1 Answers

5
votes

Ajax or not, this is not possible with plain JSF/HTML. All input elements which needs to be processed really needs to go inside the same form.