This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes JSF and the fly likes <verbatim> Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "<verbatim>" Watch "<verbatim>" New topic


Vadim Vararu
Ranch Hand

Joined: Jan 03, 2009
Posts: 147
I'm studying JSF technology now and i'm looking through some examples. Here is one with <outputLink>:

why do they use <verbatim> tag? isn't it ok just to write plain text as outputLink's direct child? why do they use intermediar <verbatim> tag?

If you think you've done too much, usually it means you've done too few.
Aurelian Tutuianu
Ranch Hand

Joined: May 13, 2004
Posts: 86
It depends on what content do you want to put into the outputLink. In your example, there is no need to include verbatim. But if you want to include html code, of jstl or other things, you have to you verbatim. You can think to verbatim like a container which helps you to put something into the JSF control hierarchy something which is not JSF.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17421

Failure to use the verbatim tag can result in the items in question either being rendered in the wrong place on the page or not at all. Since the JSF page is constructed from a directed graph of elements, the verbatim tag provides an "element" where one would otherwise not exist.

The need for the verbatim tag is reduced in more recent versions of JSF and when you're using the Facelets framework, but it's still occasionally necessary.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: <verbatim>
It's not a secret anymore!