Pet*_*ter 3 jsf jsp primefaces
当我单击每行中出现的数据表中的命令按钮时,我收到以下错误.通过查看示例,我了解到一旦单击了commandbutton,就会首先执行以下代码
<f:setPropertyActionListener value="#{detailRow}" target="#{tableBeanDetail.selectedEntry}" />
Run Code Online (Sandbox Code Playgroud)
然后是与以下bean方法关联的代码
<p:commandButton id="detailsButton" actionListener="#{tableBeanDetail.onRowSelect}" icon="ui-icon-
search" title="View Details">
Run Code Online (Sandbox Code Playgroud)
在我的onRowSelect中我试图做以下事情:
public String onRowSelect(ActionEvent event) throws Exception {
// Get key fields from row data and set the parameters that needs to be passed w
.....
}
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
该actionListener
方法应具有以下特征:
public void someMethodName(ActionEvent event) {
// ...
}
Run Code Online (Sandbox Code Playgroud)
这里ActionEvent
是javax.faces.event
包(因此不java.awt
包!).
然而,你回来了String
,目前尚不清楚你ActionEvent
的包装是否合适.但你似乎想要执行导航.您应该使用action
而不是actionListener
删除该ActionEvent
参数.
public String onRowSelect() {
// ...
}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
6695 次 |
最近记录: |