jQuery in Action, 2nd edition*
The moose likes JSF and the fly likes CommandButton with Image and Label Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "CommandButton with Image and Label" Watch "CommandButton with Image and Label" New topic
Author

CommandButton with Image and Label

Anu Sri
Greenhorn

Joined: May 19, 2008
Posts: 16
Hi,

Is it possible to have a background image and label (text) for a command button with JSF?
Venkat Sadasivam
Ranch Hand

Joined: May 10, 2008
Posts: 139
Not sure. Why don't you try with commandLink?


“Any fool can write code that a computer can understand. Good programmers write code that humans can understand. ”<br>
-Martin Fowler
nimo frey
Ranch Hand

Joined: Jun 28, 2008
Posts: 580
When I try it with commandLink:



then only the image is displayed and not the text "hello"
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: CommandButton with Image and Label