gpt4 book ai didi

ajax - JSF:执行多种形式的值

转载 作者:行者123 更新时间:2023-12-04 20:18:19 24 4
gpt4 key购买 nike

我想从多个表单提交(执行)值,而不仅仅是封闭表单。所以,我希望能够做这样的事情:

<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>

你会如何解决这个问题?

What is <f:ajax execute="@all"> really supposed to do? It POSTs only the enclosing form
似乎是相关的,但解决了一个稍微不同的问题,也没有解决它(或这个)。

最佳答案

Ajax 与否,这对于普通的 JSF/HTML 是不可能的。所有需要处理的输入元素确实需要进入同一个表单。

关于ajax - JSF:执行多种形式的值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9638103/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com