【问题标题】:<p:commandButton> image shows ui-button over the button image<p:commandButton> 图像在按钮图像上显示 ui 按钮
【发布时间】:2013-05-30 07:11:16
【问题描述】:

我想将一个按钮显示为图像。所以我把它写成这样:

<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".any 解决方案?

【问题讨论】:

    标签: css jsf-2 primefaces


    【解决方案1】:

    这不是更容易吗? p:commandLinkp:commandButton 一样提交 POST。

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

    【讨论】:

    • @NGH 不客气。由于您还没有发现如何根据您的历史接受答案:您应该通过单击答案左侧的标记来“接受”答案,以防您觉得它解决了您的问题。这有助于未来的读者确定问题的正确解决方案(这也适用于您之前的问题)。
    • 我试过了,伙计..但说我必须等到 2 分钟,所以要花时间..:)
    • 没问题,看到你也接受了其他问题的答案! :)
    猜你喜欢
    • 1970-01-01
    • 2012-07-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-05-07
    • 2013-06-19
    • 1970-01-01
    • 2013-05-20
    相关资源
    最近更新 更多