如何执行另一个< H:形式GT;使用< F:AJAX>? [英] How to execute another <h:form> using <f:ajax>?

查看:106
本文介绍了如何执行另一个< H:形式GT;使用< F:AJAX>?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到,这并没有为我工作,我想知道,如果它是不可能的:

I've noticed that this doesn't work for me and I'm wondering if it's just not possible:

<h:form id="one" prependid="false" >
  <h:commandButton>
    <f:ajax execute=":two">
  </h:commandButton>
</h:form>

<h:form id="two" prependid="false">
  ... content ...
</h:form>

每当我点击上面的按钮,我可以看到两个不执行上表中的值符合预期。 这是正常的JSF行为?
要'招'吧,我平时插入形式的隐藏式按键两个和使用JavaScript code触发它时,在表单的按钮一个点击。但是,这是一个窍门,让我付出更多的时候我不知道我不得不这样做。

Whenever I click the button above ,I can see that the values on form two are not executed as expected. Is this the normal JSF behavior?
To 'trick' it, I usually insert a hidden button in form two and trigger it using JavaScript code when the button in form one is clicked. But that's a 'trick' and makes me work extra when I'm not sure I have to.

我要提到的渲染荷兰国际集团的另一种形式是可能的。

I should mention the rendering another form is possible.

请问 prependid 属性导致问题?

在此先感谢!

更新添加更多的信息,可能是有关 - 添加 prependid =假的形式,因为它采用的是实际code。

UPDATE Adding more information that might be relevant - adding the prependid="false" to the forms as it is used in the actual code.

推荐答案

没有,那是不可能的&LT; F:AJAX&GT; 。它只是提交父窗体。该执行只是告诉JSF它必须处理的基础上提交的数据,而不是哪个请求参数客户端需要发送的组件。该按钮确实走在它所属的形式。

No, that's not possible with <f:ajax>. It just submits the parent form. The execute merely tells JSF which components it has to process based on the submitted data, not which request parameters the client side have to send. The button has really to go in the form where it belongs.

这篇关于如何执行另一个&LT; H:形式GT;使用&LT; F:AJAX&GT;?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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