简体   繁体   中英

Component library with JSF project

I am looking forward to using a component library(perhaps richfaces or primefaces) with JSF for developing the frontend of a social application.

I need to know:

1.) how far is it possible to customize the look of each individual component independently besides choosing a single theme for all components. Is it possible to use CSS with these components.

2.) Can I use multiple component libraries (depending on what components I need) in a single project?

3.) Any suggestions on choosing a component library also welcomed!

EDIT

4.) Are there any visual editors for developing UI with these libraries? I currently use netbeans 6.9 IDE.

  1. I know it's possible with RichFaces
  2. Yes, it's possible. Most probably you have to customize at least one of them to get a consistent layout. For some libraries there exist already such themes, eg you find some themes for Primefaces with Richfaces look and feel.
  3. We decided to use RichFaces which provides various well documented components. Look at the examples of your library candidates and decide if they might fit your needs.

I use primefaces, and customizing each component is pretty easy and fun. They have samples in their user-guide on how to customize each component (css). Primefaces relies heavily on jQuery(I noticed by looking at the source generated), but also uses other javascript libraries like YUI. Sometimes it could be very Javascript intensive on the client, but so far, it does what is says it do very well.

I am not sure about the multiple components, never tried it, and per my own recommendations, I think primefaces rocks.

AS from netbeans 7.0, primefaces is included in Netbeans, so you don't have to worry about configurations anymore.

I love Primefaces as they have a probably the largest and some of the most feature rich components available. It takes a litle tweaking but you could use other component libraries with Primefaces as well.

Be prepared though for a lot of issues. There are a lot of bugs however if you are decently good with javascript and CSS and have above a beginners level understanding of JSF then you should have no problems working around them. Just be prepared to implement a couple of smelly hacks to meet some requirements.

Despite these problems I notice it becoming more and more stable with every release so it will only get better from here.

See that you got some answer already. I had more or less the same questions as you have. In the end I went for Richfaces, because the following points

  • Better integrated with the core JSF 2.0 libarary and has more or less the same monoculture.
  • No payload on bandwidth, when not using any Richfaces component, this will happens if you use Primefaces. Because the jquery and CSS will always load, whenever you using a component or not.
  • The documentations is bit more comprehensive. But the Primefaces forum is more active and you'll get a better feedback

The bandwidth was the key point for me, so I picked Richfaces. But I like the Primefaces library too, since the verity of components is greater.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM