如何将图像值添加到h:commandlink?

时间:2015-04-22 19:39:13

标签: jsf richfaces

有人可以告诉我如何将图像值添加到此代码而不是文本值吗?

<h:commandLink 
    action="#{gridHandlerXml.removeLinesFromGroups}"
    render="quote-table, totalPanel, revisionTabs" execute="@this"
    disabled="#{currentQuote.convertInProgress}" 
    onclick="#{rich:component('fcprocessing:processingpopup')}.show()" 
    oncomplete="#{rich:component('fcprocessing:processingpopup')}.hide()" />

1 个答案:

答案 0 :(得分:1)

非常简单:只需在命令链接中嵌入一个h:graphicImage

<h:commandLink action="#{gridHandlerXml.removeLinesFromGroups}">
    <h:graphicImage url="resources/path/to/your/image"/>
</h:commandLink>