使用JQuery AJAX调用JSF管理bean的方法(一AjaxBehaviorEvent监听器处理) [英] Using jquery ajax to call a jsf managed bean method (an AjaxBehaviorEvent listener handler)

查看:522
本文介绍了使用JQuery AJAX调用JSF管理bean的方法(一AjaxBehaviorEvent监听器处理)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有一种方法可以触发一个JSF管理bean的方法(与AjaxBehaviorEvent类型参数:同样使用F时触发:AJAX)直接使用jQuery的AJAX服务器request.By的方式,IMA JSF developper,我没有找到关于使用jQuery AJAX和Java EE作为服务器端框架的例子,我发现所有的例子都是用php..so我希望得到这样做,一个完整的例子。 我认为其他的解决办法可能是让一个commandLink正在通过电话提交使用jQuery在客户端和传递参数,但我preFER前者的解决方案,我希望它的工作。

i would like to know if there is a way to fire a jsf managed bean method (with an AjaxBehaviorEvent type parameter: the same triggered when using f:ajax) directly by using a jquery ajax server request.By the way , i m a jsf developper and i didn't find an example about using jquery ajax with Java EE as a server-side framework, all examples i found were with php..so i wish to get a complete example about doing that. i think the other workaround maybe is to make a commandLink being submitted with jquery on the client side and passing parameters through that call but i prefer the former solution and i wish it work.

非常感谢帮助!

推荐答案

在这里你去:

<script type="text/javascript">

    doAwesomeness();

</script>

在你的页面:

<a4j:jsFunction name="doAwesomeness" action="#{awesomeBean.awesomeMethod}"/>

祝你好运!

这篇关于使用JQuery AJAX调用JSF管理bean的方法(一AjaxBehaviorEvent监听器处理)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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