JSF + Seam + a4j从另一个组件事件触发一个组件ajax [英] JSF + Seam + a4j Triggering one component ajax from a different component event

查看:52
本文介绍了JSF + Seam + a4j从另一个组件事件触发一个组件ajax的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想问一下标题是什么: 说我们有一个inputtext和一个按钮.好吧,我想在单击按钮时在输入文本中提交一个ajax请求.

I wanted to ask just what title says: say we have a inputtext and a button. Well, I wanted to submit an ajax request in the inputtext when button is clicked.

例如,从输入文本的角度来看,我想实现这样的功能:

for example, from the inputtext perspective, I want to achive something like this:

<h:inputtext>
   <a4j:support event="button.onclick"/>
<h:inputtext>
<h:button id="button">

或者,从按钮的角度来看:

or, from the button perspective:

<h:inputtext id="input"/> 
<h:button id="button">
   <a4j:support event="onclick" action="input.submit"/>
</h:button>

不知道是否存在一种简单的方法来完成此任务.

Don't know if there exist an easy way to get this done.

提前谢谢!

推荐答案

我终于通过<a4j:jsFunction> a4j:jsFunction

这篇关于JSF + Seam + a4j从另一个组件事件触发一个组件ajax的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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