Home » Tag Archives: JSF (page 10)

Tag Archives: JSF

Integrating Spring & JavaServer Faces : Improved Templating

With the release of version 2.0 Facelet templating became a core part of the JSF specification. Using <ui:composition> and <ui:decorate> tags it becomes pretty easy to build up complicated pages whilst still keeping your mark-up clean. Templates are particularly useful when creating HTML forms but, unfortunately, do tend to cause repetition in your xhtml files, breaking the DRY (Don’t Repeat ...

Read More »

Lazy JSF Primefaces Datatable Pagination – Part 2

The page code is very simple and there is no complication. Check the “index.xhtml” code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org/ui"> <h:head> </h:head> <h:body> <f:view> <h:form> <p:dataTable id="lazyDataTable" value="#{playerMB.allPlayers}" var="player" paginator="true" rows="10" selection="#{playerMB.player}" selectionMode="single" paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}" rowsPerPageTemplate="5,10,15" style="width: 80%;margin-left: 10%;margin-right: 10%;"> <p:ajax event="rowSelect" update=":playerDialogForm" oncomplete="playerDetails.show()" /> <p:column> ...

Read More »

Lazy JSF Primefaces Datatable Pagination – Part 1

Today we will do JSF datatable pagination with a Lazy List with a view scoped managed bean. What all those words/expressions mean? There are several JSF frameworks today that provide datatables with a ready pagination, columns sorter and others functionalities. Today we will use the Primefaces datatable. Usually the datatables will put the displayed List, with the entities, inside the ...

Read More »

JSF 2, PrimeFaces 3, Spring 3 & Hibernate 4 Integration Project

This article shows how to integrate JSF2, PrimeFaces3, Spring3 and Hibernate4 Technologies. It provides a general project template for Java developers. Also if Spring is not used for Business and Data Access layer, JSF – PrimeFaces & Hibernate Integration Project can be offered. Used Technologies : JDK 1.6.0_31 Spring 3.1.1 JSF 2.1 Hibernate 4.1.0 Primefaces 3.1.1 MySQL Connector 5.1.17 MySQL ...

Read More »

5 useful methods JSF developers should know

The aim of this post is a summary about some handy methods for JSF developers they can use in their day-to-day work. An utility class is a good place to put all methods together. I would call such class FacesAccessor. The first method is probably the most used one. It returns managed bean by the given name. The bean must ...

Read More »

Spring & JSF integration: MVC Nuts and Bolts

I have attempted to integrate JSF with Spring MVC in the past, and whilst my first attempt worked, it was far from ideal. This time around I decided to take a few key decisions to help focus my efforts: Drop backwards compatibility. There is just too much work involved with supporting JSF 1.2 and too much good stuff coming up ...

Read More »

Spring & JSF integration: Navigation

This is the first in what I hope will be a series of blogs about my efforts to provide deep integration between Spring and JavaServer Faces. Everything mentioned here is a “work in progress” so if you checkout the code please be aware that it is a moving target; expect some rough edges and don’t be surprised if it’s sometimes ...

Read More »

Choosing Between Vaadin and JSF

With the recent release of Primefaces 3.0, JSF finally reaches an unprecedent level of maturity and utility that puts it face to face with other popular Rich Internet Applications (RIA) options, such as Google Web Toolkit (GWT), ExtJS, Vaadin, Flex and others. This open source project also proved to be very active and in constant growing path. I have been ...

Read More »

JSF and the “immediate” Attribute – Command Components

The immediate attribute in JSF is commonly misunderstood. If you don’t believe me, check out Stack Overflow. Part of the confusion is likely due to immediate being available on both input (i.e.. <h:inputText />) and command (i.e. <h:commandButton />) components, each of which affects the JSF lifecycle differently. Here is the standard JSF lifecycle: For the purposes of this article, ...

Read More »