Seam - Contextual Components

A Framework for Enterprise Java

2.0.1.GA


Table of Contents

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.1.1. The entity bean: User.java
1.2.1.2. The stateless session bean class: RegisterAction.java
1.2.1.3. The session bean local interface: Register.java
1.2.1.4. The Seam component deployment descriptor: components.xml
1.2.1.5. The web deployment description: web.xml
1.2.1.6. The JSF configration: faces-config.xml
1.2.1.7. The EJB deployment descriptor: ejb-jar.xml
1.2.1.8. The EJB persistence deployment descriptor: persistence.xml
1.2.1.9. The view: register.xhtml and registered.xhtml
1.2.1.10. The EAR deployment descriptor: application.xml
1.2.2. How it works
1.3. Clickable lists in Seam: the messages example
1.3.1. Understanding the code
1.3.1.1. The entity bean: Message.java
1.3.1.2. The stateful session bean: MessageManagerBean.java
1.3.1.3. The session bean local interface: MessageManager.java
1.3.1.4. The view: messages.jsp
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. An example of Seam with Hibernate: the Hibernate Booking example
1.9. A RESTful Seam application: the Blog example
1.9.1. Using "pull"-style MVC
1.9.2. Bookmarkable search results page
1.9.3. Using "push"-style MVC in a RESTful application
2. Getting started with Seam, using seam-gen
2.1. Before you start
2.2. Setting up a new Eclipse project
2.3. Creating a new action
2.4. Creating a form with an action
2.5. Generating an application from an existing database
2.6. Generating an application from existing JPA/EJB3 entities
2.7. Deploying the application as an EAR
2.8. Seam and incremental hot deployment
2.9. Using Seam with JBoss 4.0
2.9.1. Install JBoss 4.0
2.9.2. Install the JSF 1.2 RI
3. The contextual component model
3.1. Seam contexts
3.1.1. Stateless context
3.1.2. Event context
3.1.3. Page context
3.1.4. Conversation context
3.1.5. Session context
3.1.6. Business process context
3.1.7. Application context
3.1.8. Context variables
3.1.9. Context search priority
3.1.10. Concurrency model
3.2. Seam components
3.2.1. Stateless session beans
3.2.2. Stateful session beans
3.2.3. Entity beans
3.2.4. JavaBeans
3.2.5. Message-driven beans
3.2.6. Interception
3.2.7. Component names
3.2.8. Defining the component scope
3.2.9. Components with multiple roles
3.2.10. Built-in components
3.3. Bijection
3.4. Lifecycle methods
3.5. Conditional installation
3.6. Logging
3.7. The Mutable interface and @ReadOnly
3.8. Factory and manager components
4. Configuring Seam components
4.1. Configuring components via property settings
4.2. Configuring components via components.xml
4.3. Fine-grained configuration files
4.4. Configurable property types
4.5. Using XML Namespaces
5. Events, interceptors and exception handling
5.1. Seam events
5.1.1. Page actions
5.1.1.1. Page parameters
5.1.1.2. Navigation
5.1.1.3. Fine-grained files for definition of navigation, page actions and parameters
5.1.2. Component-driven events
5.1.3. Contextual events
5.2. Seam interceptors
5.3. Managing exceptions
5.3.1. Exceptions and transactions
5.3.2. Enabling Seam exception handling
5.3.3. Using annotations for exception handling
5.3.4. Using XML for exception handling
5.3.5. Some common exceptions
6. Conversations and workspace management
6.1. Seam's conversation model
6.2. Nested conversations
6.3. Starting conversations with GET requests
6.4. Using <s:link> and <s:button>
6.5. Success messages
6.6. Natural conversation ids
6.6.1. Creating a natural conversation
6.6.2. Redirecting to a natural conversation
6.7. Workspace management
6.7.1. Workspace management and JSF navigation
6.7.2. Workspace management and jPDL pageflow
6.7.3. The conversation switcher
6.7.4. The conversation list
6.7.5. Breadcrumbs
6.8. Conversational components and JSF component bindings
6.9. Concurrent calls to conversational components
6.9.1. RichFaces Ajax
7. Pageflows and business processes
7.1. Pageflow in Seam
7.1.1. The two navigation models
7.1.2. Seam and the back button
7.2. Using jPDL pageflows
7.2.1. Installing pageflows
7.2.2. Starting pageflows
7.2.3. Page nodes and transitions
7.2.4. Controlling the flow
7.2.5. Ending the flow
7.2.6. Pageflow composition
7.3. Business process management in Seam
7.4. Using jPDL business process definitions
7.4.1. Installing process definitions
7.4.2. Initializing actor ids
7.4.3. Initiating a business process
7.4.4. Task assignment
7.4.5. Task lists
7.4.6. Performing a task
8. Seam and Object/Relational Mapping
8.1. Introduction
8.2. Seam managed transactions
8.2.1. Disabling Seam-managed transactions
8.2.2. Configuring a Seam transaction manager
8.2.3. Transaction synchronization
8.3. Seam-managed persistence contexts
8.3.1. Using a Seam-managed persistence context with JPA
8.3.2. Using a Seam-managed Hibernate session
8.3.3. Seam-managed persistence contexts and atomic conversations
8.4. Using the JPA "delegate"
8.5. Using EL in EJB-QL/HQL
8.6. Using Hibernate filters
9. JSF form validation in Seam
10. Groovy integration
10.1. Groovy introduction
10.2. Writing Seam applications in Groovy
10.2.1. Writing Groovy components
10.2.1.1. Entity
10.2.1.2. Seam component
10.2.2. seam-gen
10.3. Deployment
10.3.1. Deploying Groovy code
10.3.2. Native .groovy file deployment at development time
10.3.3. seam-gen
11. The Seam Application Framework
11.1. Introduction
11.2. Home objects
11.3. Query objects
11.4. Controller objects
12. Seam and JBoss Rules
12.1. Installing rules
12.2. Using rules from a Seam component
12.3. Using rules from a jBPM process definition
13. Security
13.1. Overview
13.1.1. Which mode is right for my application?
13.2. Requirements
13.3. Disabling Security
13.4. Authentication
13.4.1. Configuration
13.4.2. Writing an authentication method
13.4.2.1. Identity.addRole()
13.4.2.2. Special Considerations
13.4.3. Writing a login form
13.4.4. Simplified Configuration - Summary
13.4.5. Handling Security Exceptions
13.4.6. Login Redirection
13.4.7. HTTP Authentication
13.4.7.1. Writing a Digest Authenticator
13.4.8. Advanced Authentication Features
13.4.8.1. Using your container's JAAS configuration
13.5. Error Messages
13.6. Authorization
13.6.1. Core concepts
13.6.2. Securing components
13.6.2.1. The @Restrict annotation
13.6.2.2. Inline restrictions
13.6.3. Security in the user interface
13.6.4. Securing pages
13.6.5. Securing Entities
13.6.5.1. Entity security with JPA
13.6.5.2. Entity security with Hibernate
13.7. Writing Security Rules
13.7.1. Permissions Overview
13.7.2. Configuring a rules file
13.7.3. Creating a security rules file
13.7.3.1. Wildcard permission checks
13.8. SSL Security
13.9. CAPTCHA
13.9.1. Configuring the CAPTCHA Servlet
13.9.2. Adding a CAPTCHA to a form
13.9.3. Customising the CAPTCHA algorithm
13.10. Security Events
13.11. Extending the Identity component
14. Internationalization and themes
14.1. Locales
14.2. Labels
14.2.1. Defining labels
14.2.2. Displaying labels
14.2.3. Faces messages
14.3. Timezones
14.4. Themes
14.5. Persisting locale and theme preferences via cookies
15. Seam Text
15.1. Basic fomatting
15.2. Entering code and text with special characters
15.3. Links
15.4. Entering HTML
16. iText PDF generation
16.1. Using PDF Support
16.1.1. Creating a document
16.1.2. Basic Text Elements
16.1.3. Headers and Footers
16.1.4. Chapters and Sections
16.1.5. Lists
16.1.6. Tables
16.1.7. Document Constants
16.1.7.1. Color Values
16.1.7.2. Alignment Values
16.1.8. Configuring iText
16.2. Charting
16.3. Bar codes
16.4. Rendering Swing/AWT components
16.5. Further documentation
17. Email
17.1. Creating a message
17.1.1. Attachments
17.1.2. HTML/Text alternative part
17.1.3. Multiple recipients
17.1.4. Multiple messages
17.1.5. Templating
17.1.6. Internationalisation
17.1.7. Other Headers
17.2. Receiving emails
17.3. Configuration
17.3.1. mailSession
17.3.1.1. JNDI lookup in JBoss AS
17.3.1.2. Seam configured Session
17.4. Meldware
17.5. Tags
18. Asynchronicity and messaging
18.1. Asynchronicity
18.1.1. Asynchronous methods
18.1.2. Asynchronous methods with the Quartz Dispatcher
18.1.3. Asynchronous events
18.2. Messaging in Seam
18.2.1. Configuration
18.2.2. Sending messages
18.2.3. Receiving messages using a message-driven bean
18.2.4. Receiving messages in the client
19. Caching
19.1. Using JBossCache in Seam
19.2. Page fragment caching
20. Web Services
20.1. Configuration and Packaging
20.2. Conversational Web Services
20.2.1. A Recommended Strategy
20.3. An example web service
21. Remoting
21.1. Configuration
21.2. The "Seam" object
21.2.1. A Hello World example
21.2.2. Seam.Component
21.2.2.1. Seam.Component.newInstance()
21.2.2.2. Seam.Component.getInstance()
21.2.2.3. Seam.Component.getComponentName()
21.2.3. Seam.Remoting
21.2.3.1. Seam.Remoting.createType()
21.2.3.2. Seam.Remoting.getTypeName()
21.3. Evaluating EL Expressions
21.4. Client Interfaces
21.5. The Context
21.5.1. Setting and reading the Conversation ID
21.5.2. Remote calls within the current conversation scope
21.6. Batch Requests
21.7. Working with Data types
21.7.1. Primitives / Basic Types
21.7.1.1. String
21.7.1.2. Number
21.7.1.3. Boolean
21.7.2. JavaBeans
21.7.3. Dates and Times
21.7.4. Enums
21.7.5. Collections
21.7.5.1. Bags
21.7.5.2. Maps
21.8. Debugging
21.9. The Loading Message
21.9.1. Changing the message
21.9.2. Hiding the loading message
21.9.3. A Custom Loading Indicator
21.10. Controlling what data is returned
21.10.1. Constraining normal fields
21.10.2. Constraining Maps and Collections
21.10.3. Constraining objects of a specific type
21.10.4. Combining Constraints
21.11. JMS Messaging
21.11.1. Configuration
21.11.2. Subscribing to a JMS Topic
21.11.3. Unsubscribing from a Topic
21.11.4. Tuning the Polling Process
22. Seam and the Google Web Toolkit
22.1. Configuration
22.2. Preparing your component
22.3. Hooking up a GWT widget to the Seam component
22.4. GWT Ant Targets
23. Spring Framework integration
23.1. Injecting Seam components into Spring beans
23.2. Injecting Spring beans into Seam components
23.3. Making a Spring bean into a Seam component
23.4. Seam-scoped Spring beans
23.5. Using Spring PlatformTransactionManagement
23.6. Using a Seam Managed Persistence Context in Spring
23.7. Using a Seam Managed Hibernate Session in Spring
23.8. Spring Application Context as a Seam Component
23.9. Using a Spring TaskExecutor for @Asynchronous
24. Hibernate Search
24.1. Introduction
24.2. Configuration
24.3. Usage
25. Configuring Seam and packaging Seam applications
25.1. Basic Seam configuration
25.1.1. Integrating Seam with JSF and your servlet container
25.1.2. Using facelets
25.1.3. Seam Resource Servlet
25.1.4. Seam servlet filters
25.1.4.1. Exception handling
25.1.4.2. Conversation propagation with redirects
25.1.4.3. Multipart form submissions
25.1.4.4. Character encoding
25.1.4.5. RichFaces
25.1.4.6. Identity Logging
25.1.4.7. Context management for custom servlets
25.1.4.8. Adding custom filters
25.1.5. Integrating Seam with your EJB container
25.1.6. Don't forget!
25.2. Configuring Seam in Java EE 5
25.2.1. Packaging
25.3. Configuring Seam in J2EE
25.3.1. Boostrapping Hibernate in Seam
25.3.2. Boostrapping JPA in Seam
25.3.3. Packaging
25.4. Configuring Seam in Java SE, without JBoss Embedded
25.5. Configuring Seam in Java SE, with JBoss Embedded
25.5.1. Installing Embedded JBoss
25.5.2. Packaging
25.6. Configuring jBPM in Seam
25.6.1. Packaging
25.7. Configuring Seam in a Portal
25.8. Configuring SFSB and Session Timeouts in JBoss AS
26. Seam on OC4J
26.1. Installation and operation of OC4J
26.2. The jee5/booking example
26.2.1. Booking Example Dependencies
26.2.1.1. Core Seam dependencies
26.2.1.2. Extra dependencies
26.2.2. Configuration file changes
26.2.3. Building the jee5/booking example
26.3. Deploying the Seam application to OC4J
26.4. Deploying an application created using seam-gen to OC4J
26.4.1. Generating a basic seam-gen application
26.4.2. Changes needed for deployment to OC4J
26.4.2.1. Configuration file changes
26.4.2.2. Extra jar dependencies
26.4.3. Building and deploying the seam-gen'd application to OC4J
26.4.4. Extending example with reverse engineered CRUD and Drools
26.4.4.1. Have seam-gen generate your CRUD applications
26.4.4.2. Hook up drools authentication using your new CRUD application
26.5. Finishing up
27. Seam on BEA's Weblogic
27.1. Installation and operation of Weblogic
27.1.1. Installing 10.3.TP
27.1.2. Creating your Weblogic domain
27.1.3. How to Start/Stop/Access your domain
27.2. The jee5/booking example
27.2.1. EJB Blockers with Weblogic
27.2.1.1. Secondary issue with the Tech Preview
27.2.2. The jee5/booking example
27.2.2.1. Setting up the hsql datasource
27.2.2.2. Configuration and Build changes
27.2.2.3. Deploying the Application
27.3. The jpa booking example
27.3.1. Building and deploying jpa booking example
27.3.1.1. Setting up the datasource
27.3.1.2. Building the example
27.3.1.3. Deploying the example
27.3.2. What's different with Weblogic 10.x
27.4. Deploying an application created using seam-gen on Weblogic 10.x
27.4.1. Running seam-gen setup
27.4.2. What to change for Weblogic 10.X
27.4.2.1. Configuration file changes
27.4.2.2. Library changes
27.4.2.3. seam-gen development profile issue
27.4.3. Building and Deploying your application
27.4.3.1. Setting up the data source
27.4.3.2. Building the application
27.4.3.3. Deploying the example
28. Seam on IBM's Websphere
28.1. Websphere environment and deployment information
28.1.1. Installation versions and tips
28.1.2. Required custom properties
28.2. The jee5/booking example
28.2.1. Configuration file changes
28.2.2. Building the jee5/booking example
28.2.2.1. New libraries dependencies
28.2.2.2. Updating the build.xml file
28.2.3. Deploying the application to Websphere
28.3. The jpa booking example
28.3.1. Building the jpa example
28.3.2. Deploying the jpa example
28.3.3. Whats different for Websphere 6.1
28.4. Deploying an application created using seam-gen on Websphere 6.1.0.13
28.5. Changes needed for deployment to Websphere
28.5.1. Configuration file changes
28.5.2. Creating the AuthenticatorAction EJB
28.5.3. Extra jar dependencies and other changes to the build.xml
28.5.4. Building and deploying the seam-gen'd application to Websphere
29. Seam annotations
29.1. Annotations for component definition
29.2. Annotations for bijection
29.3. Annotations for component lifecycle methods
29.4. Annotations for context demarcation
29.5. Annotations for use with Seam JavaBean components in a J2EE environment
29.6. Annotations for exceptions
29.7. Annotations for Seam Remoting
29.8. Annotations for Seam interceptors
29.9. Annotations for asynchronicity
29.10. Annotations for use with JSF
29.10.1. Annotations for use with dataTable
29.11. Meta-annotations for databinding
29.12. Annotations for packaging
29.13. Annotations for integrating with the servlet container
30. Built-in Seam components
30.1. Context injection components
30.2. Utility components
30.3. Components for internationalization and themes
30.4. Components for controlling conversations
30.5. jBPM-related components
30.6. Security-related components
30.7. JMS-related components
30.8. Mail-related components
30.9. Infrastructural components
30.10. Miscellaneous components
30.11. Special components
31. Seam JSF controls
31.1. Tags
31.2. Annotations
32. JBoss EL
32.1. Parameterized Expressions
32.1.1. Usage
32.1.2. Limitations and Hints
32.2. Projection
33. Testing Seam applications
33.1. Unit testing Seam components
33.2. Integration testing Seam components
33.2.1. Using mocks in integration tests
33.3. Integration testing Seam application user interactions
33.3.1. Configuration
33.3.2. Integration Testing with Mock Data
33.3.3. Integration Testing Seam Mail
34. Seam tools
34.1. jBPM designer and viewer
34.1.1. Business process designer
34.1.2. Pageflow viewer
35. Dependencies
35.1. Project Dependencies
35.1.1. Core
35.1.2. RichFaces
35.1.3. Seam Mail
35.1.4. Seam PDF
35.1.5. JBoss Rules
35.1.6. JBPM
35.1.7. GWT
35.1.8. Spring
35.1.9. Groovy
35.2. Dependency Management using Maven