2015-04-22 209 views
0

有人可以告訴我如何將圖像值添加到此代碼而不是文本值?如何將圖像值添加到h:commandlink?

<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

非常簡單:

<h:commandLink action="#{gridHandlerXml.removeLinesFromGroups}"> 
    <h:graphicImage url="resources/path/to/your/image"/> 
</h:commandLink> 
:在命令鏈路只是嵌入一個 h:graphicImage