【问题标题】:Issue using P:commandLink value attribute使用 P:commandLink 值属性的问题
【发布时间】:2013-01-03 06:31:03
【问题描述】:

我在 xhtml 页面中有 p:commandLink

我已将 value 赋予 value 属性并将 image 赋予 styleClass 属性。 它在图像上显示价值。 (用值覆盖图像)

如何只显示图片?

XHTML 代码:

<p:commandLink actionListener="#{userController.createNewUser}"
               update=":userRightPaneForm" 
               styleClass="newButtonLnk"
               value="New">
</p:commandLink>

CSS 代码:

.newButtonLnk {  width: 40px; height: 17px;
                 background: url('../images/buttons/new_off.png')
                 no-repeat;
                 display: inline-block;
}
.newButtonLnk:hover{ width: 40px; height: 17px;
                     background: url('../images/buttons/new_on.png')
                     no-repeat;
}

请帮帮我。

【问题讨论】:

    标签: html css jsf user-interface primefaces


    【解决方案1】:

    value属性设置为""

    像这样:value=""

    <p:commandLink actionListener="#{userController.createNewUser}"
               update=":userRightPaneForm" 
               styleClass="newButtonLnk"
               value="">
    </p:commandLink>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-12-07
      • 2012-11-17
      • 1970-01-01
      • 2011-06-14
      • 2021-07-22
      • 1970-01-01
      • 2013-07-15
      • 1970-01-01
      相关资源
      最近更新 更多