Home » Tag Archives: JSF

Tag Archives: JSF

NetBeans Java EE Tip #9: Create JSF Application from Database

netbeans-logo

Do you need to create an database front-end very quickly?  The NetBeans IDE allows one to develop a JSF application front end for a set of database tables very quickly, and with very little coding.  Now this tutorial is an oldie, but a goodie…and it is worth mentioning again for those who are not aware of it. First, create your ...

Read More »

DynamicReports and JasperReports with JSF, Servlet and CDI

jsf-logo

In this example, I will show how to integrate DynamicReport and JasperReports with Servlet and CDI. Tools: TIBCO Jaspersoft Studio-6.0.4.final. Eclipse  Luna Service Release 2 (4.4.2). WildFly 8.x application server. This is a screenshot from the project hierarchy on Eclipse.     The pom.xml file contains the required dependencies for the Servlets + JSF + CDI + DynamicReports. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ...

Read More »

Creating JSF/CDI Maven project on Eclipse

eclipse-logo

While I was working on a JSF and CDI example, I thought it would be useful to mention the steps required to create JSF and CDI Maven project. You can find the bellow steps to do so. Tools Eclipse Luna that’s shipped with the M2E plugin by default. So no need to install the plugin yourself. WildFlye 8.x.     ...

Read More »

A Look at the Upcoming JSF 2.3 Push Support

jsf-logo

As mentioned in previous posts, there are a number of enhancements being added to the next release of JavaServer Faces (Mojarra).  JSF 2.3 is slated to be released with Java EE 8 in 2017, but you can get your hands on some of the enhancements and updates to JSF for testing purposes now by building from source or running a ...

Read More »

How view parameters are obtained/attached from/to the URL query string (examples) ?

jsf-logo

Let’s dissect several simple use cases and see how view parameters works (view parameters names are not mandatory to match the request parameters passed via URL query string, but in this post we will focus on this case): CASE 1 In index.xhtml page we have: <f:metadata> <f:viewParam name="playernameparam" value="#{playersBean.playerName}"/> <f:viewParam name="playersurnameparam" value="#{playersBean.playerSurname}"/> </f:metadata> ... <h:form> Enter name:<h:inputText value="#{playersBean.playerName}"/> Enter surname:<h:inputText ...

Read More »

JSF Scopes Tutorial – JSF/CDI Session Scope

jsf-logo

The session scope lives across multiple HTTP request-response cycles (theoretical unlimited).                     The request scope is very useful in any web application when you need a single interaction per HTTP request-response cycle. However, when you need objects visible for any HTTP request-response cycle that belongs to a user session, then you ...

Read More »

Programmatically caching PrimeFaces charts via OmniFaces Cache component

primefaces-logo

In this post, you will see how to combine PrimeFaces and OmniFaces to obtain cacheable charts. In order to keep the things simple, we will use a PrimeFaces Line Chart. For this kind of chart we can use <p:chart/> tag in page and a simple managed bean. So, in page we can have: <p:chart id="someChartId" type="line" model="#{chartView.lineModel}" style="height:300px;width:600px;"/> The ChartView ...

Read More »

JSF 2.2 Create a custom Hello World component in 30 seconds

jsf-logo

Let’s jump directly to the cool stuff and say that in JSF 2.0 a custom component was made available to page authors by configuring it in a Facelet tag library (*taglib.xml). Moreover, when the component is mapped in a JAR, a special entry in web.xml is needed to point to the *taglib.xml file. As of JSF 2.2, we don’t need ...

Read More »

JSF: Validation at the right phase (understanding the life cycle)

jsf-logo

Hi everyone! Although the title emphasises the word validation, this article is actually about the JSF life cycle. That’s because I believe that one of the easiest ways to truly understand the life cycle is by making something we do all the time: validating user input. In general, understanding the so called JSF Life Cycle is what sets apart junior ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Spring Interview QnA
  • Multithreading & Concurrency QnA
  • JPA Minibook
  • JVM Troubleshooting Guide
  • Advanced Java
  • Java Interview QnA
  • Java Design Patterns