12.07.2015 Views

Beginning Java EE 6 with GlassFish 3, Second Edition

Beginning Java EE 6 with GlassFish 3, Second Edition

Beginning Java EE 6 with GlassFish 3, Second Edition

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 12 ■ PROCESSING AND NAVIGATIONSummaryThe preceding chapter examined the graphical aspect of JSF, and this chapter focused on its dynamicside. JSF follows the MVC design pattern, and its specification ranges from creating user interfaces <strong>with</strong>components to processing data <strong>with</strong> managed beans.Managed beans are at the heart of JSF as they are used to process business logic, call EJBs,databases, and so on, as well as navigating between pages. They have a scope and a life cycle(resembling stateless session beans), and they declare methods and properties that are bound to UIcomponents using expression language. Annotations and configuration by exception have greatlysimplified JSF 2.0, as most of the XML configuration is now optional.I then showed how conversion and validation is handled on any input component. JSF defines a setof converters and validators for most common cases, but it also allows you to easily create and registercustom ones.While the Ajax technique has been around for some years, JSF 2.0 brings standard support, allowingweb pages to invoke managed beans asynchronously. It defines a standard <strong>Java</strong>Script library, and thedeveloper doesn’t need to write scripts but instead uses functions to refresh portions of pages.The next three chapters will focus on how to interoperate <strong>with</strong> systems through messaging, SOAPweb services, and RESTful web services.376

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!