我想在进一步处理之前使用多个动作侦听器来设置两个支持bean的状态
第一种方式:
<p:commandButton process="@this" >
<f:attribute name="key" value="#{node.getIdTestGroup()}" />
<f:actionListener binding="#{testController.nodeListener}" />
<f:actionListener binding="#{testDeviceGroupController.prepareCreate}" />
</p:commandButton>
Run Code Online (Sandbox Code Playgroud)
它给出了一个例外:
警告:/ testGroup/List.xhtml @ 26,88 binding ="#{testController.nodeListener()}":找不到方法nodeListener javax.el.ELException:/testGroup/List.xhtml @ 26,88 binding ="#{ testController.nodeListener()}":找不到方法nodeListener
第二种方式:
<p:commandButton process="@this" >
<f:attribute name="key" value="#{node.getIdTestGroup()}" />
<f:actionListener binding="#{testController.nodeListener(event)}" />
<f:actionListener binding="#{testDeviceGroupController.prepareCreate(event)}" />
</p:commandButton>
Run Code Online (Sandbox Code Playgroud)
nodeListener和prepareCreate方法的事件为null
怎么做对吗?