JBoss.orgCommunity Documentation

Chapter 5. Resources

5.1. <a4j:keepAlive>
5.1.1. Basic usage
5.1.2. Non-Ajax requests
5.1.3. Reference data

This chapter covers those components used to handle and manage resources and beans.

The <a4j:keepAlive> component allows the state of a managed bean to be retained between Ajax requests.

Managed beans can be declared with the request scope in the faces-config.xml configuration file, using the <managed-bean-scope> tag. Any references to the bean instance after the request has ended will cause the server to throw an illegal argument exception (IllegalArgumentException). The <a4j:keepAlive> component avoids this by maintaining the state of the whole bean object for subsequent requests.