Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Good or evil , Mixing JSF components with HTML elements ?

 
clojure forum advocate
Posts: 3479
Mac Objective C Clojure
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ?
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Saloon Keeper
Posts: 25459
180
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Every plan is a little cooler if you have a blimp. And a tiny ad.
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic