JSF:执行多种形式值 [英] JSF: Execute values of multiple forms

查看:164
本文介绍了JSF:执行多种形式值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想多种形式,不仅是封闭的形式提交(执行)值。所以,我希望能够做一些事情是这样的:

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?

JSF 2.0以&lt; F:AJAX执行=&QUOT; @所有&QUOT; /&GT; 似乎与,但解决了稍微不同的问题,并且也没有解决它(或此)。

JSF 2.0 with <f:ajax execute="@all" /> seems to be related, but addresses a slightly different problem and also does not solve it (or this).

推荐答案

阿贾克斯与否,这是不可能的,普通的JSF / HTML。这需要所有输入的元素进行处理真正需要去同一个表单内。

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.

这篇关于JSF:执行多种形式值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆