使用P:commandLink值属性发出问题

时间:2022-11-05 20:01:34

I have p:commandLink in xhtml page

我在xhtml页面中有p:commandLink

I have given the value to value attribute and image to styleClass attribute. It displays value on image. (Overriding the image with value)

我已将value属性和图像的值赋给styleClass属性。它在图像上显示值。 (用值覆盖图像)

How to display only image on it?

如何仅显示图像?

XHTML code:

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

CSS Code:

.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;
}

Please help me out here.

请帮帮我。

1 个解决方案

#1


0  

Set the value attribute into ""

将value属性设置为“”

Like this : value=""

像这样:value =“”

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

#1


0  

Set the value attribute into ""

将value属性设置为“”

Like this : value=""

像这样:value =“”

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