File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes Spacing issue before h:commandLink 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 "Spacing issue before h:commandLink" Watch "Spacing issue before h:commandLink" New topic

Spacing issue before h:commandLink

Chris Stewart
Ranch Hand

Joined: Sep 29, 2001
Posts: 124
So I'm running into a weird issue with spacing before a command link. Here's my code:

It should render as "Home - Administration - Logout". However, it's actually rendering as "Home - Administration -Logout". Notice the missing space before Logout. Is there something I'm missing here?
Darryl Nortje
Ranch Hand

Joined: Jun 11, 2002
Posts: 140
Howzit Chris,

I just pasted this line into a test jsp, and it spaced correctly. Using MyFaces.

What I was thinking a solution could be was to put the " - " into a <hutputText ../> tag, with escape set to false. Perhaps you can try that and let us know if it solved the problem.
Venkat Sadasivam
Ranch Hand

Joined: May 10, 2008
Posts: 139
You can also use   to provide space.

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

Joined: May 10, 2008
Posts: 139
sorry, html character is not visible in my previous reply.

Venkat Sadasivam
Ranch Hand

Joined: May 10, 2008
Posts: 139
Again the same problem. I think JavaRanch has to provide preview option for reply message.

You can use &#160; to provide space.
I agree. Here's the link:
subject: Spacing issue before h:commandLink
Similar Threads
object dies when redirect=true
PropertyNotFound in EL
Call a backing bean's method through href
Simple list table
Navigation using h:commandLink