This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
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

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "CommandButton with Image and Label" Watch "CommandButton with Image and Label" New topic

CommandButton with Image and Label

Anu Sri

Joined: May 19, 2008
Posts: 16

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"
I agree. Here's the link:
subject: CommandButton with Image and Label
Similar Threads
Images on JLabels
View Multiple images in a single window
Adding an Image to a Panel
Image on the right side of a JButton
WA #1.....word association