Win a copy of Cloud Native Transformation: Practical Patterns for InnovationE this week in the Cloud/Virtualization forum
or The Go Workshop in the Go 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Knute Snortum
  • Henry Wong
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Joe Ess
  • salvin francis

Customizing JSF components with CSS?

Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Here I am again asking for your help, unfortunately I believe there are many people who have prejudice with JSF, especially in the forums of discussions as JUG.

I am currently on a project and we're having enough trouble mess in visual programming, I am referring you part of JSF, unfortunately I can not spend all my knowledge to them, I'm like Back-End and my two partners are as Frond- End the project, made several attempts to seek sources of information that shows JSF models with CSS, their problem is not to implement the components, because besides there are many good examples of components in PrimeFaces the site, OmniFaces, ICEFaces and RichFaces, the problem is customize the CSS components, power modifies them, this is a most needs them, but if I try to solve all the difficulties in visual programming, ie, Frond-End, not be able to realize the Back- programming problems End, and to create a Java Web project unfortunately will need a team, I can not do it alone.

We are all a team of programmers who can not work in the labor market, and somo inexperienced, and even made several research to help them, but things I found was only explanations of how to implement a page components, and does not actually is what we need, what we need is customize the JSF components with CSS so that the system does not seem like a desktop program but a Web page as any other page, do not know if could understand.

I know it is to apply ManagerBean with JSP and I did not find this research sources.
If anyone know a good site suggestion that shows how to customize the JSF components with CSS or suggestions of websites that show how to combine ManagerBean with JSP.
I am grateful for any help.
Saloon Keeper
Posts: 21422
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSF and CSS have always worked together from the beginning. One of the design decisions for JSF is that the appearance of objects should be up to CSS and not due to special attributes in the elements the way HTML did before CSS was invented.

There are 2 levels to consider. When you are using the core JSF tags (from the "h" tagset), you are generally using wrappers around HTML and their styleClass and style attributes correspond to the underlying HTML style and class elements (JSF uses "styleClass" because "class" is a reserved word in Java, as well as to accentuate the fact that it's style-related.

When you're are using compound controls - for example controls from the PrimeFaces tagset, then the framework (PrimeFaces) will generally have custom style classes for the different compound control sub-components. You can override these classes either with explicit CSS applied to the sub-components or by creating your own override classes for the standard PrimeFaces CSS. The PrimeFaces documentation should list the names and uses of these pre-defined classes.

If you take things to the extreme, you can define one or more "skins", which are collections of CSS styles that can be swapped in and out to change the appearance of the entire site. Again, the PrimeFaces documentation should have information on this.
roses are red, violets are blue. Some poems rhyme and some are a tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!