jsf - <f :setPropertyActionListener> Parent is not of type ActionSource

标签 jsf parent setpropertyactionlistener

我想在单击表格行时传递值:

<h:outputLink id="lnkHidden" value="DatacenterProfile.html" style="text-decoration:none; color:white;">
    <f:setPropertyActionListener target="#{DatacentersController.selectedId}" value="#{item.componentStatsId}" />
</h:outputLink>

我收到此错误:

<f:setPropertyActionListener> Parent is not of type ActionSource, type is: javax.faces.component.html.HtmlOutputLink@aa25b91

是否有任何合适的 JSF 标签可用于替换 <h:outputLink>

最佳答案

f:setPropertyActionLister 仅适用于 ActionSource诸如 h:commandLinkh:commandButton 之类的组件。如果您想这样做,您应该使用其中之一。另请参阅

关于jsf - <f :setPropertyActionListener> Parent is not of type ActionSource,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15599191/

相关文章:

java - 如何使用 JSF 1.1 标签设置 jsp 页面的标题

jsf - 类 '...' 没有该属性

jsf - Primefaces dataTable 在单列中的多个字段上应用过滤器

java - 如何在 WAS 6.0 上运行我的 JSF 1.1 应用程序

c++ - 如何在 C++ 中访问 vector 中的子实例

css - 在悬停时显示信息 SCSS/CSS

javascript - 使用 jQuery 删除父元素

JSF NumberFormatException 与 f :setPropertyActionListener