• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Good or evil , Mixing JSF components with HTML elements ?

 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17995
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic