Home » Tag Archives: JSF

Tag Archives: JSF

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 »

Java EE7 and Maven project for newbies – part 8

java-interview-questions-answers

Part #1, Part #2, Part #3, Part #4, Part #5, Part #6, Part #7  Part #8 It’s been a long time since my last post, for this series of  tutorials. Its time to resume and add new features on our simple project. As I have mentioned in previous posts, this series of posts is targeting mostly Maven and JavaEE7 newcomers, ...

Read More »

RESTful Charts with JAX-RS and PrimeFaces

jsf-logo

Oftentimes, it is useful to utilize a chart for providing a visual representation of your data. PrimeFaces supplies charting solutions that make it easy to add visual representations of your data into web and mobile applications. If we couple the use of PrimeFaces charting components with RESTful web service data, we can create custom charts that scale well for both ...

Read More »

A JSF List Example

jsf-logo

This is an example list application built using JSF 2.0 (JavaServer Faces). The app is a list of todo (to do) items. This app has functions to add, edit or delete items in the list. The todo item has name and description properties. The completed app’s JSF page has:             A todo list implemented using ...

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:

  • Advanced Java Guide
  • Java Design Patterns
  • JMeter Tutorial
  • Java 8 Features Tutorial
  • JUnit Tutorial
  • JSF Programming Cookbook
  • Java Concurrency Essentials