Web application forms are commonly used to view and update database data. The atg.repository.servlet
.RepositoryFormHandler
class provides methods and properties for working with repository items. You can use a component of this class to add, update, and delete repository items that use the same item descriptor. A RepositoryFormHandler can be used with any repository type: HTML, XML, LDAP, and SQL.
The ATG platform also provides the class atg.droplet.sql.SimpleSQLFormHandler
, which supports direct interaction with an SQL database. For more information about this form handler, see Appendix C, SimpleSQLFormHandler.
Note: Depending on the contents of your ATG software, your installation might include components that are based on a subclass of RepositoryFormHandler.
The RepositoryFormHandler
offers several benefits:
Requires only the repository item type for updates.
Supports all repository types: HTML, XML, LDAP, and SQL.
Caches repository data.
Optimizes data access.
Before reading this chapter, you should have a basic understanding of repositories, components, forms, and form handlers. The following table shows where you can review these topics:
Topic | Chapter | Manual |
---|---|---|
Repositories | Introduction | |
Components | Nucleus:OrganizingJavaBeanComponents | |
Form handlers, | FormHandlersandHandlerMethods |
You might use a RepositoryFormHandler in a customer service application that requires internal employees to manage inventory. For example, a Web site that sells music might have an administration interface for tracking in-stock items. The site accesses a music repository, which defines three item descriptors: CDs, Artists, and Songs. This site requires three RepositoryFormHandler components, one for each item descriptor.
This chapter covers the following topics: