简体   繁体   English

JSF2(PrimeFaces)使用ajax调用时可以提交/更新表单中的所有字段吗?

[英]JSF2 (PrimeFaces) Can I submit/update all fields from a form when I use ajax call?

I have a form with a couple operations and fields that need to refresh almost everything when i change a value from a field. 我有一个包含几个操作和字段的表单,当我从字段中更改值时,需要刷新几乎所有内容。 I can not put a button because it works like an excel worksheet. 我不能放一个按钮,因为它像Excel工作表一样工作。

Is there anyway that i can submit all fields and update all fields in my ajax action instead of: 无论如何,我可以提交所有字段并更新ajax操作中的所有字段,而不是:

<p:ajax event="blur" update="fieldX,fieldY..." process="@this,fieldB,fieldC..." listener="#{simulator.operations}"/>

Thanks in advance. 提前致谢。

您可以使用

<p:ajax event="blur" update="@form" process="@form" listener="#{simulator.operations}"/>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM