Book Image

Digital Java EE 7 Web Application Development

By : Peter Pilgrim
Book Image

Digital Java EE 7 Web Application Development

By: Peter Pilgrim

Overview of this book

Digital Java EE 7 presents you with an opportunity to master writing great enterprise web software using the Java EE 7 platform with the modern approach to digital service standards. You will first learn about the lifecycle and phases of JavaServer Faces, become completely proficient with different validation models and schemes, and then find out exactly how to apply AJAX validations and requests. Next, you will touch base with JSF in order to understand how relevant CDI scopes work. Later, you’ll discover how to add finesse and pizzazz to your digital work in order to improve the design of your e-commerce application. Finally, you will deep dive into AngularJS development in order to keep pace with other popular choices, such as Backbone and Ember JS. By the end of this thorough guide, you’ll have polished your skills on the Digital Java EE 7 platform and be able to creat exiting web application.
Table of Contents (21 chapters)
Digital Java EE 7 Web Application Development
Credits
About the Author
Acknowledgment
About the Reviewers
www.PacktPub.com
Preface
Index

Page navigation


After JSF 2, it is very easy to provide navigation in a controller. In the BasicFlow controller from the earlier JSF example, we relied on implicit page navigation. The developer can specify the next page to render simply by returning a simple string.

Here is the controller class again:

@Named @RequestScoped
public class BasicFlow {
    public String serveResponse() {
        return "endState.xhtml";
    }
}

In JSF 1, the page navigation was determined explicitly in a Faces Configuration XML file: /WEB-INF/faces-config.xml, which made the development harder because of the enforced cognitive indirection. The purpose of faces-config.xml is to define the configuration for a JSF web application. The developer can define the navigation rules, inject bean properties, define the properties file, and declare the resource bundles and locales. They can register the converters, validators, and renderer components.

Explicit page navigation is useful for the defined information architecture...