Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

<verbatim>

 
Vadim Vararu
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Aurelian Tutuianu
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 18152
52
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic