【发布时间】:2017-09-29 13:49:22
【问题描述】:
在p:dataTable 中,我有一些 ajax 事件,当我编辑某些内容时会显示 FacesMessages
<p:ajax event="cellEdit" listener="#{userRegistrationController.cellEditAction}"
update=":currentUserForm:currentUsersFormMessages"/>
<p:ajax event="colResize" listener="#{userRegistrationController.colResizeAction}"
update=":currentUserForm:currentUsersFormMessages"/>
<p:ajax event="colReorder" listener="#{userRegistrationController.colReorderAction}"
update=":currentUserForm:currentUsersFormMessages"/>
唯一不起作用的是“colReorder”,当我调用方法时,我有 javax.el.MethodNotFoundException: Method not found: com.mycompany.primeautosales.jsf.UserRegistrationController@476d042d.colReorderAction( javax.faces.event.AjaxBehaviorEvent) 。
这是colResizeAction 和colReorderAction 的方法,我不明白为什么一个有效而另一个无效。
public void colResizeAction(ColumnResizeEvent event){
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(
"the width of column "+event.getColumn()+" is now "+event.getWidth()
));
}
public void colReorderAction(ReorderEvent event){
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(
"reordered "+event.getComponent().toString()));
}
ReorderEvent 类有什么问题吗?
【问题讨论】:
标签: jsf primefaces