如何以编程方式在备份bean中使用ajax-update特定组件
发布时间:2020-12-16 01:34:23 所属栏目:百科 来源:网络整理
导读:是否有一种方法来ajax更新特定组件,例如 h:form在支持豆? 我尝试以下使用 RequestContext#execute() , RequestContext context = RequestContext.getCurrentInstance();context.execute("monitorVehicleForm.update()"); 然而,似乎没有任何效果. RequestCo
是否有一种方法来ajax更新特定组件,例如< h:form>在支持豆?
我尝试以下使用 RequestContext context = RequestContext.getCurrentInstance(); context.execute("monitorVehicleForm.update()"); 然而,似乎没有任何效果.
RequestContext#execute()只执行被传入的任意JavaScript代码作为参数.它不是ajax更新组件的客户端表示.
您需要使用 context.update("monitorVehicleForm"); 这与< p:commandXxx ... update =“monitorVehicleForm”> ;.完全相同的效果.这项工作是为您提供的 <h:form id="monitorVehicleForm"> 没有任何 <form id="monitorVehicleForm" name="monitorVehicleForm" ...> 在生成的HTML中. 也可以看看: > How to find out client ID of component for ajax update/render? Cannot find component with expression “foo” referenced from “bar” (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
推荐文章
站长推荐
热点阅读