2013-05-30 50 views
0

我要顯示一個按鈕,我已經寫一個image.So它喜歡:<P:的commandButton>圖像顯示了在按鈕圖像UI按鈕

<p:commandButton styleClass="edit_button_image" actionListener="#{userLeaveBean.editAppliedLeave}" title="Edit" process="@this"/> 

和用於獲取按鈕圖像的CSS:

.edit_button_image{ 
background: url(edit.JPG) no-repeat !important; 

}

它顯示的圖像很好,但也顯示出文本「UI按鈕」在圖像上。 我怎樣才能獲得圖像? 使用它顯示得很好,因爲我想對整個部分執行一些操作,因爲我選擇並添加了process =「@ this」.any解決方案嗎?

回答

0

難道這不會更容易嗎? A p:commandLink就像p:commandButton一樣提交POST。

<h:form> 
    <p:commandLink ...> 
     <h:graphicImage ... /> 
    </p:commandLink> 
</h:form> 
+0

它適用於我..謝謝:) – NDeveloper

+0

@NGH不客氣。由於您沒有發現如何根據您的歷史記錄接受答案,您應該點擊答案左側的標記以「接受」答案,以防您認爲答案能夠解決您的問題。這有助於未來的讀者找到問題的正確解決方案(這也適用於您以前的問題)。 – Aquillo

+0

我試過好友..但說我必須等到2分鐘,所以要花時間.. :) – NDeveloper