如何从两个不同的bean调用action
和actionListner
,我已添加以下代码
<a4j:commandButton id="editAlarm" immediate="false" execute="@this" actionListener="#{cfsBean.updateCfsGroupFeature(itemsComp,tableIndex.index)}"
action="#{addFeaturePopUpBean.updateCfsGroupFeature(itemsComp,tableIndex.index)}" >
和Bean有这个代码
public String updateCfsGroupFeature(ActionEvent event,CompositeCharGroupVo value, Integer row) {
}
但我得到了
javax.el.MethodNotFoundException&#39;在调用动作侦听器时 &#39;#{cfsBean.updateCfsGroupFeature(itemsComp,tableIndex.index)}&#39;对于 组件&#39; editAlarm&#39;
现在Differences between action and actionListener @Baluc 提到我们可以传递actionListner
中的参数
<h:commandXxx ... actionListener="#{bean.methodWithOneArgument(arg1)}" />
<h:commandXxx ... actionListener="#{bean.methodWithTwoArguments(arg1, arg2)}" />