代码之家  ›  专栏  ›  技术社区  ›  Ken Chan

当使用accesskey单击a4j:commandbutton时,我可以延迟它的操作吗?

  •  0
  • Ken Chan  · 技术社区  · 14 年前

    我有一个 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:输入文本 ,然后按“alt+s”单击按钮,两个 mBean.performSave() mBean.onInputChange() 将同时运行。我能推迟 mbean.performsave()。 这样的话 mbean.performsave()。 将在之后运行 mbean.onInputChange()。 完成了吗?

    2 回复  |  直到 14 年前
        1
  •  1
  •   Romain Linsolas    14 年前

    Richfaces 提供 <a4j:queue> 对于处理您的场景可能有用的组件。

        2
  •  1
  •   Bozho    14 年前

    您可以尝试使用 <a4j:queue>