<p:commandbutton>图像在按钮图像上显示ui按钮</p:commandbutton>

时间:2013-05-30 07:11:16

标签: css jsf-2 primefaces

我想将按钮显示为图像。所以我写得像:

<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-button”。 我怎样才能获得图像? 使用它显示很好,因为我想在我选择的整个部分上执行一些操作并添加了process =“@ this”。任何解决方案?

1 个答案:

答案 0 :(得分:0)

这不会更容易吗? p:commandLink就像p:commandButton一样提交POST。

<h:form>
    <p:commandLink ...>
        <h:graphicImage ... />
    </p:commandLink>
</h:form>
相关问题