This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSF & style sheets (css)

 
Santosh Ramachandrula
Ranch Hand
Posts: 252
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any takers for this question ?
 
Hans Bergsten
Author
Ranch Hand
Posts: 106
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Hans!!

As JSF uses tag I had a double it can take the stylesheet arrtibute.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic