aspose file tools*
The moose likes JSF and the fly likes is it need to use verbatim to enclosed all non-jsf tag? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "is it need to use verbatim to enclosed all non-jsf tag?" Watch "is it need to use verbatim to enclosed all non-jsf tag?" New topic
Author

is it need to use verbatim to enclosed all non-jsf tag?

peter tong
Ranch Hand

Joined: Mar 15, 2008
Posts: 240
it seems very trouble if we need to enclosed all non jsf tag (like html) with verbatim tag in jsp!!
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Yes, but if you can use Facelets as your view renderer, you can get rid of these verbatim tags.


[My Blog]
All roads lead to JavaRanch
peter tong
Ranch Hand

Joined: Mar 15, 2008
Posts: 240
so terrible?!! need to write <f:verbatim/> each time I write html inside jsf tags!!!?

how difficult to learn facelets? I need to start my project using jsf by now!!
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15632
    
  15

Actually, it's not really effective JSF if you are even using non-JSF tags.

JSF is intended to be a semantic framework with a decoupled rendering mechanism. In practical terms, that means things like being (potentially) to use the same application code on both standard HTML and WAP page-based systems, to be able to render raw graphics without any the need for HTML at all, and to be able to render items in a mixed mode such as HTML/JavaScript (AJAX).

If you go around dropping chunks of HTML in the abstract page definition, you defeat that intention. It may not bite you today, and it probably won't even bite you to morrow. But there may come a time when you'll wish you hadn't.


Customer surveys are for companies who didn't pay proper attention to begin with.
Bart Kummel
author
Ranch Hand

Joined: Nov 30, 2007
Posts: 81
You should learn Facelets! It is fairly simple to use, in fact easier to use than JSP. I agree with Tim that ideally you should not have any (X)HTML code in your JSF page definition. But I know it may be a good pragmatic solution sometimes. A good compromise may be to use Facelets templates. You can keep the actual page definitions strictly abstract JSF page definitions then and only add some (X)HTML to your Facelets template(s).


SCJP 1.4 | SCJD 1.6 | Visit my website | Author of the book Apache MyFaces 1.2 Web Application Development
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: is it need to use verbatim to enclosed all non-jsf tag?
 
Similar Threads
JSF rendering the whole page : Even the basic html tags
<verbatim>
Conditional wrapping with tag
How to include an applet in JSF
JSF and Layouts