wood burning stoves*
The moose likes JSF and the fly likes Good or evil , Mixing JSF components with HTML elements ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Good or evil , Mixing JSF components with HTML elements ?" Watch "Good or evil , Mixing JSF components with HTML elements ?" New topic
Author

Good or evil , Mixing JSF components with HTML elements ?

Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3476

Hi.
As we all know, we can built our entire pages using JSF components only, there is no need to use HTML tags.
But what about the performance ? (since JSF maintaines a tree of components, create a new whole page if needed) ?
In JSF's best practice world ? is it ok to use ordinary HTML elements if we don't need to access the components at the server-side ?
(like using table element instead of dataGrid component or using <c ut> instead of outputText component).
Any ideas ?
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Mixing JSF components and pure HTML can sometimes produce undesireable results in that the components will get rendered outside of the HTML you thought they should be inside of. It's more of a layout issue than anything else. JSF 1.2 is supposed to resolve this. That's about the only issue I know of other than just being consistent across all your pages.


GenRocket - Experts at Building Test Data
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15952
    
  19

If you must mix HTML and JSF, use the verbatim tag to reduce the infighting.

In general, JSF is supposed to be a markup language in its own right, somewhat more abstracted than HTML is - meaning easier to link to alternative, non-HTML rendering engines.

In reality, mostly we're expecting to render only to HTML web browsers, so the purist JSF approach can be a right royal pain, but there it is.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Good or evil , Mixing JSF components with HTML elements ?
 
Similar Threads
future of JSF
JSF and HTML
[ANNOUNCE] Interview with Exadel's Max Katz about JSF and AJAX
JSF and Swing
f:facet & f:view tag