I have started working of JSF+Primefaces latest version for my website is this somehow possible i can make my design responsive with these technology. I do not want to use Primefaces mobile or i do not want to create two different page for same functionality
Welcome to JSF Primefaces tutorial. JavaServer Faces is one of the leading framework that is used these days for implementing Java web application user interface.
PrimeFaces 6.x has responsive design updates, including a Responsive Grid. The grid is not a JSF component, it's a simple div with a ui-grid classes. In real case scenarios having only a grid won't fill the requirements so you should usually use some frameworks like bootstrap or foundation.
Primefaces Mobile Primefaces Mobile (PFM) provides a UI kit to create Primefaces applications for mobile devices. For this reason, PFM supports responsive design adjusted for mobile devices. 5.1. Configuration To begin with, we need to enable mobile navigation support inside our faces-config.xml:
The JSF specification is formalized through the Java Community Process and is a standardized display technology. More about JSF in Spring environment can be found here. 2.2. Primefaces Built on top of JSF, Primefaces supports rapid application development by providing pre-built UI components which can be added to any project.
PrimeFaces 6.x has responsive design updates, including a Responsive Grid.
The grid is not a JSF component, it's a simple div with a ui-grid
classes.
Example of 3 column layout:
<div class="ui-grid">
<div class="ui-grid-col-4">Col1</div>
<div class="ui-grid-col-4">Col2</div>
<div class="ui-grid-col-4">Col2</div>
</div>
In real case scenarios having only a grid won't fill the requirements so you should usually use some frameworks like bootstrap or foundation.
Both frameworks provide CSS/Javascript rules, they can be applied easily on the JSF components, for example if you have a button:
<h:commandButton styleClass="btn" value="Button">
</h:commandButton>
btn is a bootstrap CSS class.
You might run into some components which won't accept such styles, like the table of Primefaces, in these cases you should write your own CSS media queries/Javascript in order to maintain the responsiveness.
See more
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With