2013-01-03 28 views
0

我有p:commandLink在xhtml页面使用P:commandLink值属性的问题

我给值属性和图像的值为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; 
} 

请帮我在这里。

+1

怎么样'值= “”'? – Daniel

回答

0

设置value属性为""

像这样:value=""

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