【发布时间】:2023-04-04 21:09:01
【问题描述】:
我有一个h:inputText,它会在 onchange() 事件发生时调用后端方法,
<h:inputText>
<a4j:support event="onchange" action="#{mBean.onInputChange}" />
</h:inputText>
我有一个 a4j:commandButton 将执行保存过程。 a4j:commandButton 也有分配给它的热键
<a4j:commandButton accesskey="s" action="#{mBean.performSave}" />
当我在 h:inputText 中键入文本,然后按“Alt+s”单击按钮时,mBean.performSave() 和 mBean.onInputChange() 将同时运行。我可以延迟mBean.performSave() 的操作,使mBean.performSave() 在mBean.onInputChange() 完成后运行吗?
【问题讨论】: