JSF Custom Error Pages

JSF-Thumbnail

When you run an application in the development project stage and you encounter an error, you get an error message in an undesirable form. You probably don’t want your users to see that message in such that ugly way. To substitute a better error page, use error-page tag in the web.xml file, in that you can specify either […]

JSF + Scala Integration

JSF-Thumbnail

Scala is a popular programming language for the Java Virtual Machine (JVM). Like Java, it is strongly typed and object-oriented, but it also supports functional programming. Many developers are attracted to Scala because it requires less boilerplate for common constructs, such as properties. Scala does support calling a code in the Java Library from it, so it’s possible to integrate […]

JSF + Groovy Integration

JSF-Thumbnail

Groovy is another popular programming language for the Java Virtual Machine. Groovy is dynamically typed, and groovy code can be more concise than the equivalent Java because you can omit types of variables and parameters. Almost any Java code is legal groovy, that’s make it simple and easier for getting started using it. Ultimately, using the Groovy […]

JSF SystemEventListener – UIComponent Events Example

JSF-Thumbnail

You’ve already examined the events that could be fired from both of Application and UIViewRoot. But those aren’t only the events that might be handled. The UIComponent – UIComponent is the base class for all user interface components in JavaServer Faces. The set of UIComponent instances associated with a particular request and response are organized into a component tree under […]

JSF 2 SystemEventListener – UIViewRoot Events Example

JSF-Thumbnail

As mentioned previously in the introduction of the JSF2 System Events – Application Events, there are many kinds of System events that could be listening for. UIViewRoot component – is the UIComponent that represents the root of the UIComponent tree – also does considered one of the component that has fired a system event. UIViewRoot has fired three main types […]

JSF 2 SystemEventListener Example

JSF-Thumbnail

The System Events are normally specified in the JavaServer Faces Specification 2.2 under “System Events” Subject. This concept expands on the idea of lifecycle PhaseEvents. With the PhaseEvents, it is possible to have an application scoped PhaseListeners that are given the opportunity to act on the system before and after each phase in the lifecycle. System events provide a […]

JSF 2 DataTable Delete Row Example

JSF-Thumbnail

In JSF 2.2 the manipulation of Data Table has been never easier and specifically when it comes to finding out which row the user selected for removal. In JSF 2.2 the removing happened without using of passed parameters or binding the DataTable component into its corresponding Java Object – Like HTMLDataTable – for being manipulated from there. Simply what you have […]

JSF 2 @FlowScoped Example

JSF-Thumbnail

With JSF 2.2, the JavaServer Faces technology allows you to create a set of pages with the new scope FlowScoped, that scope is greater than request scope and less than session scope. The FlowScoped scope depends on the concept of procedure where is declared a well defined entry point and a return value. The entry point should […]

JSF 2 @ConversationScoped Example

JSF-Thumbnail

JavaServer Faces has been coming with different kinds of scopes; scopes that already used for defining the Managed Beans. Most of the JSF developers were familiar with scopes like Request, View, Session & Application, but newly added scopes such Conversation, View, Custom and newly for JSF 2.2 Flow haven’t gained a widely range of discussion on the internet […]

JSF 2 ViewScoped Example

JSF-Thumbnail

View scope was added in the JSF 2.0. A bean in view scope persists while the same JSF view (page) is re displayed. Once the user has navigated into another view the viewscoped bean goes out of scope. If your application has a page has been getting re displayed, then you can put the data […]