aspose file tools*
The moose likes JSF and the fly likes Looking for samples in css3 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Looking for samples in css3" Watch "Looking for samples in css3" New topic
Author

Looking for samples in css3

Mario Gimenez
Ranch Hand

Joined: Mar 23, 2010
Posts: 38
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

Joined: Jun 25, 2001
Posts: 16250
    
  21

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
Alan Smith
Ranch Hand

Joined: Oct 19, 2011
Posts: 162

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

Joined: Jun 25, 2001
Posts: 16250
    
  21

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

Joined: Oct 19, 2011
Posts: 162

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.
 
subject: Looking for samples in css3