• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Looking for samples in css3

 
Mario Gimenez
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi. Can you tell me or give me some example about css3 with jsf 2 ???
Thanks in advance.

PD: and some example with jquery and jsf 2!!
thanks!!
 
Tim Holloway
Saloon Keeper
Posts: 18304
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not much to say. CSS3 is CSS3. JSF permits assigning CSS to various rendered components and sub-components, but it doesn't actually worry about which version of CSS you're using.

As far as jQuery goes, it's a little trickier. Some of the third-party extension tag libraries use jQuery internally, so sometimes you can have jQuery without even asking for it!

There are a few considerations, however. You shouldn't use the "$" jQuery shortcut, because this gets confused with JSF's EL processor. Use the "jQuery." notation instead.

Also, if you are using an extension that pulls in its own copy of jQuery, such as RichFaces, you may have to exercise some care. RichFaces 3 isn't nearly as dead as Red Hat/JBoss wants to pretend it is, and the jQuery version that it brings in is fairly old. So if you want/need more recent features, you may have to do a little fancy dancing.
 
Alan Smith
Ranch Hand
Posts: 185
Firefox Browser Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Holloway wrote:Not much to say. CSS3 is CSS3. JSF permits assigning CSS to various rendered components and sub-components, but it doesn't actually worry about which version of CSS you're using.


Is using CSS with JSF as simple as using it with HTML? Create an id and/or class attribute for your component ie. <h:panelGroup layout="block" id="leftSideBar"> and then use regular CSS to position it, style it, etc?

Thanks,
Alan
 
Tim Holloway
Saloon Keeper
Posts: 18304
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Alan Smith wrote:

Is using CSS with JSF as simple as using it with HTML? Create an id and/or class attribute for your component ie. <h:panelGroup layout="block" id="leftSideBar"> and then use regular CSS to position it, style it, etc?

Thanks,
Alan


Pretty much. It helps to know what HTML tags the JSF renders as and where your styling information will end up, but that's about the extent of it.
 
Alan Smith
Ranch Hand
Posts: 185
Firefox Browser Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Holloway wrote:
Pretty much. It helps to know what HTML tags the JSF renders as and where your styling information will end up, but that's about the extent of it.


I'm using Netbeans and the javadoc when you mouse over the components let you know what the JSF tags render in HTML, dead handy I'm going to stick with using only JSF tags in my views instead of mixing HTML with them, like you suggested. I was just making sure that the majority of JSF tags render to straight up HTML tags so there would be no oddities when using CSS with them. I am well used to CSS so I would hate to have to learn a workaround if JSF was incompatible (which it isn't it seems). Another plus for JSF in my book

Thanks,
Alan
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic