Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Primefaces and Bootstrap in JSF

Even now I used JSF+Primefaces in my projects and this give me a lot of new components (from primefaces) to work.

But my new customer required a good layout for the Administrator Panel (Responsive + Clean + Beatiful). Searching in http://themeforest.net/ i found a lot of great layouts but almost everything is for bootstrap.

So, my doubt is: Can i continue using primefaces (take advantage of powerfull components) and using a layout for bootstrap ? Is there some limitation ?

like image 622
Tux Avatar asked Dec 12 '14 17:12

Tux


People also ask

Can we use bootstrap in JSF?

Yes you can use Bootstrap together with JSF. We do so in most of our JSF projects. You can use the standard JSF styleClass attribute to style JSF components with Bootstrap CSS rules (this is equivalent to class in normal HTML.

What is PrimeFaces in JSF?

PrimeFaces for JSF PrimeFaces is a popular open source framework for JavaServer Faces featuring over 100 components, touch optimized mobilekit, client side validation, theme engine and more. GET STARTED.

What is the difference between JSF and PrimeFaces?

PrimeFaces is a JSF component library. It was one of the first which supports JSF 2.0 from top to bottom. It contains large set of rich components which utilizes jQuery and jQuery UI under the covers. It supports the jQuery UI ThemeRoller CSS framework.

What is PrimeFaces used for?

PrimeFaces, a popular JavaServer Faces (JSF) UI framework, can be used to quickly develop sophisticated applications for the enterprise or for standard websites. This article focuses on how to efficiently build data-driven applications for the enterprise using PrimeFaces.


2 Answers

I recommend using BootsFaces along with the Bootstrap theme of PrimeFaces (see http://showcase.bootsfaces.net/integration/PrimeFaces.jsf). BootsFaces reduces the boiler plate code needed to write a Bootstrap page. Plus, it offers a couple of widgets that fit better into a Bootstrap page than their PrimeFaces counterpart. We've designed BootsFaces as a plug-in to PrimeFaces, so you can safely use both together.

like image 97
Stephan Rauh Avatar answered Oct 20 '22 05:10

Stephan Rauh


I have started a project called AdminFaces. It integrates Primefaces and Bootstrap into a new theme, called admin. This theme integrates some bootstrap style into primefaces components like panels, buttons, messages, datatable, tab view and so on. It also brings a template based on the famous Admin LTE bootstrap admin template.

You can have a look at showcase here: https://adminfaces.github.io/admin-showcase/

The project is in early development stage (e.g: only snapshots are available) so any feedback or contribution is really welcomed. Version 1.0.0 was released, see details on the project blog here.

like image 44
rmpestano Avatar answered Oct 20 '22 04:10

rmpestano