• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JSF & style sheets (css)

 
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi folks!!
1. How can we use css (cascading style sheets) with JSF?
If yes can anyone post a simple example?
2. Is it possbile to use java script with JSF?

 
Santosh Ramachandrula
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Any takers for this question ?
 
Author
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Santosh Ram:
Hi folks!!
1. How can we use css (cascading style sheets) with JSF?
If yes can anyone post a simple example?
2. Is it possbile to use java script with JSF?



Yes, you can use both CSS and JavaScript with JSF.

CSS is very easy. All JSF components render an HTML element with a "class" and/or "style" attribute that you define. For instance, using the JSP tag libraries:

Just the define the styling you want for the class in a regular style sheet, included or referenced from the page.

JavaScript can either be created manually and included or referenced from the page, or generated automatically by JSF component renderers.

You may want to read the spec, or a book (hint, hint), to learn more. There are also plenty of articles and tutorials online. Good places to start are:

http://java.sun.com/j2ee/javaserverfaces/
http://jamesholmes.com/JavaServerFaces/

You may also get quicker responses to your JSF questions in Sun's JSF forum:

http://forum.java.sun.com/forum.jsp?forum=427
 
Santosh Ramachandrula
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Hans!!

As JSF uses tag I had a double it can take the stylesheet arrtibute.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic