Seam - Contextual Components

Seam - Contextual Components

A Framework for Java EE 5

Legal Notice

June, 2007

Abstract

This book is a Reference Guide for Seam


Introduction to JBoss Seam
1. Seam Tutorial
1.1. Try the examples
1.1.1. Running the examples on JBoss AS
1.1.2. Running the examples on Tomcat
1.1.3. Running the example tests
1.2. Your first Seam application: the registration example
1.2.1. Understanding the code
1.2.2. How it works
1.3. Clickable lists in Seam: the messages example
1.3.1. Understanding the code
1.3.2. How it works
1.4. Seam and jBPM: the todo list example
1.4.1. Understanding the code
1.4.2. How it works
1.5. Seam pageflow: the numberguess example
1.5.1. Understanding the code
1.5.2. How it works
1.6. A complete Seam application: the Hotel Booking example
1.6.1. Introduction
1.6.2. Overview of the booking example
1.6.3. Understanding Seam conversations
1.6.4. The Seam UI control library
1.6.5. The Seam Debug Page
1.7. A complete application featuring Seam and jBPM: the DVD Store example
1.8. A complete application featuring Seam workspace management: the Issue Tracker example
1.9. An example of Seam with Hibernate: the Hibernate Booking example
1.10. A RESTful Seam application: the Blog example
1.10.1. Using "pull"-style MVC
1.10.2. Bookmarkable search results page
1.10.3. Using "push"-style MVC in a RESTful application
2. The contextual component model
2.1. Seam contexts
2.1.1. Stateless context
2.1.2. Event context
2.1.3. Page context
2.1.4. Conversation context
2.1.5. Session context
2.1.6. Business process context
2.1.7. Application context
2.1.8. Context variables
2.1.9. Context search priority
2.1.10. Concurrency model
2.2. Seam components
2.2.1. Stateless session beans
2.2.2. Stateful session beans
2.2.3. Entity beans
2.2.4. JavaBeans
2.2.5. Message-driven beans
2.2.6. Interception
2.2.7. Component names
2.2.8. Defining the component scope
2.2.9. Components with multiple roles
2.2.10. Built-in components
2.3. Bijection
2.4. Lifecycle methods
2.5. Conditional installation
2.6. Logging
2.7. The Mutable interface and @ReadOnly
2.8. Factory and manager components
3. Configuring Seam components
3.1. Configuring components via property settings
3.2. Configuring components via components.xml
3.3. Fine-grained configuration files
3.4. Configurable property types
3.5. Using XML Namespaces
4. Events, interceptors and exception handling
4.1. Seam events
4.1.1. Page actions
4.1.2. Component-driven events
4.1.3. Contextual events
4.2. Seam interceptors
4.3. Managing exceptions
4.3.1. Exceptions and transactions
4.3.2. Enabling Seam exception handling
4.3.3. Using annotations for exception handling
4.3.4. Using XML for exception handling
5. Conversations and workspace management
5.1. Seam's conversation model
5.2. Nested conversations
5.3. Starting conversations with GET requests
5.4. Using <s:link> and <s:button>
5.5. Success messages
5.6. Using an "explicit" conversation id
5.7. Workspace management
5.7.1. Workspace management and JSF navigation
5.7.2. Workspace management and jPDL pageflow
5.7.3. The conversation switcher
5.7.4. The conversation list
5.7.5. Breadcrumbs
5.8. Conversational components and JSF component bindings
6. Pageflows and business processes
6.1. Pageflow in Seam
6.1.1. The two navigation models
6.1.2. Seam and the back button
6.2. Using jPDL pageflows
6.2.1. Installing pageflows
6.2.2. Starting pageflows
6.2.3. Page nodes and transitions
6.2.4. Controlling the flow
6.2.5. Ending the flow
6.3. Business process management in Seam
6.4. Using jPDL business process definitions
6.4.1. Installing process definitions
6.4.2. Initializing actor ids
6.4.3. Initiating a business process
6.4.4. Task assignment
6.4.5. Task lists
6.4.6. Performing a task
7. Seam and Object/Relational Mapping
7.1. Introduction
7.2. Seam managed transactions
7.2.1. Enabling Seam-managed transactions
7.3. Seam-managed persistence contexts
7.3.1. Using a Seam-managed persistence context with JPA
7.3.2. Using a Seam-managed Hibernate session
7.3.3. Seam-managed persistence contexts and atomic conversations
7.4. Using the JPA "delegate"
7.5. Using EL in EJB-QL/HQL
7.6. Using Hibernate filters
8. JSF form validation in Seam
9. The Seam Application Framework
9.1. Introduction
9.2. Home objects
9.3. Query objects
9.4. Controller objects
10. Seam and JBoss Rules
10.1. Installing rules
10.2. Using rules from a Seam component
10.3. Using rules from a jBPM process definition
11. Security
11.1. Overview
11.1.1. Which mode is right for my application?
11.2. Requirements
11.3. Authentication
11.3.1. Configuration
11.3.2. Writing an authentication method
11.3.3. Writing a login form
11.3.4. Simplified Configuration - Summary
11.3.5. Handling Security Exceptions
11.3.6. Login Redirection
11.3.7. Advanced Authentication Features
11.4. Authorization
11.4.1. Core concepts
11.4.2. Securing components
11.4.3. Security in the user interface
11.4.4. Securing pages
11.4.5. Securing Entities
11.5. Writing Security Rules
11.5.1. Permissions Overview
11.5.2. Configuring a rules file
11.5.3. Creating a security rules file
11.6. SSL Security
11.7. Implementing a Captcha Test
11.7.1. Configuring the Captcha Servlet
11.7.2. Adding a Captcha to a page
12. Internationalization and themes
12.1. Locales
12.2. Labels
12.2.1. Defining labels
12.2.2. Displaying labels
12.2.3. Faces messages
12.3. Timezones
12.4. Themes
12.5. Persisting locale and theme preferences via cookies
13. Seam Text
13.1. Basic fomatting
13.2. Entering code and text with special characters
13.3. Links
13.4. Entering HTML
14. iText PDF generation
14.1. Using PDF Support
14.2. Creating a document
14.2.1. p:document
14.3. Basic Text Elements
14.3.1. p:paragraph
14.3.2. p:text
14.3.3. p:font
14.3.4. p:newPage
14.3.5. p:image
14.3.6. p:anchor
14.4. Headers and Footers
14.4.1. p:header and p:footer
14.4.2. p:pageNumber
14.5. Chapters and Sections
14.5.1. p:chapter and p:section
14.5.2. p:title
14.6. Lists
14.6.1. p:list
14.6.2. p:listItem
14.7. Tables
14.7.1. p:table
14.7.2. p:cell
14.8. Document Constants
14.8.1. Color Values
14.8.2. Alignment Values
14.9. Configuring iText
14.10. iText links
15. Email
15.1. Creating a message
15.1.1. Attachments
15.1.2. HTML/Text alternative part
15.1.3. Multiple recipients
15.1.4. Multiple messages
15.1.5. Templating
15.1.6. Other Headers
15.2. Receiving emails
15.3. Configuration
15.3.1. mailSession
15.4. Tags
16. Asynchronicity and messaging
16.1. Asynchronicity
16.1.1. Asynchronous methods
16.1.2. Asynchronous events
16.2. Messaging in Seam
16.2.1. Configuration
16.2.2. Sending messages
16.2.3. Receiving messages using a message-driven bean
16.2.4. Receiving messages in the client
17. Caching
17.1. Using JBossCache in Seam
17.2. Page fragment caching
18. Remoting
18.1. Configuration
18.2. The "Seam" object
18.2.1. A Hello World example
18.2.2. Seam.Component
18.2.3. Seam.Remoting
18.3. Client Interfaces
18.4. The Context
18.4.1. Setting and reading the Conversation ID
18.5. Batch Requests
18.6. Working with Data types
18.6.1. Primitives / Basic Types
18.6.2. JavaBeans
18.6.3. Dates and Times
18.6.4. Enums
18.6.5. Collections
18.7. Debugging
18.8. The Loading Message
18.8.1. Changing the message
18.8.2. Hiding the loading message
18.8.3. A Custom Loading Indicator
18.9. Controlling what data is returned
18.9.1. Constraining normal fields
18.9.2. Constraining Maps and Collections
18.9.3. Constraining objects of a specific type
18.9.4. Combining Constraints
18.10. JMS Messaging
18.10.1. Configuration
18.10.2. Subscribing to a JMS Topic
18.10.3. Unsubscribing from a Topic
18.10.4. Tuning the Polling Process
19. Spring Framework integration
19.1. Injecting Seam components into Spring beans
19.2. Injecting Spring beans into Seam components
19.3. Making a Spring bean into a Seam component
19.4. Seam-scoped Spring beans
20. Configuring Seam and packaging Seam applications
20.1. Basic Seam configuration
20.1.1. Integrating Seam with JSF and your servlet container
20.1.2. Seam servlet filters
20.1.3. Integrating Seam with your EJB container
20.1.4. Using facelets
20.1.5. Don't forget!
20.2. Configuring Seam in Java EE 5
20.2.1. Packaging
20.3. Configuring Seam in Java SE, with the JBoss Embeddable EJB3 container
20.3.1. Installing the Embeddable EJB3 container
20.3.2. Configuring a datasource with the Embeddable EJB3 container
20.3.3. Packaging
20.4. Configuring Seam in J2EE
20.4.1. Boostrapping Hibernate in Seam
20.4.2. Boostrapping JPA in Seam
20.4.3. Packaging
20.5. Configuring Seam in Java SE, with the JBoss Microcontainer
20.5.1. Using Hibernate and the JBoss Microcontainer
20.5.2. Packaging
20.6. Configuring jBPM in Seam
20.6.1. Packaging
20.7. Configuring Seam in a Portal
21. Seam annotations
21.1. Annotations for component definition
21.2. Annotations for bijection
21.3. Annotations for component lifecycle methods
21.4. Annotations for context demarcation
21.5. Annotations for transaction demarcation
21.6. Annotations for exceptions
21.7. Annotations for validation
21.8. Annotations for Seam Remoting
21.9. Annotations for Seam interceptors
21.10. Annotations for asynchronicity
21.11. Annotations for use with JSF dataTable
21.12. Meta-annotations for databinding
21.13. Annotations for packaging
22. Built-in Seam components
22.1. Context injection components
22.2. Utility components
22.3. Components for internationalization and themes
22.4. Components for controlling conversations
22.5. jBPM-related components
22.6. Security-related components
22.7. JMS-related components
22.8. Mail-related components
22.9. Infrastructural components
22.10. Special components
23. Seam JSF controls
24. Expression language enhancements
24.1. Configuration
24.2. Usage
24.3. Limitations
24.3.1. Incompatibility with JSP 2.1
24.3.2. Calling a MethodExpression from Java code
25. Testing Seam applications
25.1. Unit testing Seam components
25.2. Integration testing Seam applications
26. Seam tools
26.1. jBPM designer and viewer
26.1.1. Business process designer
26.1.2. Pageflow viewer
26.2. CRUD-application generator
26.2.1. Creating a Hibernate configuration file
26.2.2. Creating a Hibernate Console configuration
26.2.3. Reverse engineering and code generation
Index