DbForms User's Guide

Version 2.5


Table of Contents

I. DbForms in a Nutshell
1. Introduction
1.1. About this document
1.2. Related documents
1.3. About DbForms
2. DbForms Concepts
2.1. Technical background
2.2. The Model-View-Controller Design paradigm
II. Installation
3. Compatibility notes
3.1. From Earlier Versions to DbForms 1.1.3
3.2. From Earlier Versions to DbForms 1.1.4pr1
3.3. From Earlier Versions to DbForms 1.1.4pr2
3.4. From Earlier Versions to DbForms 2.0
3.5. From Earlier Versions to Dbforms 2.3
3.6. From Earlier Versions to DbForms 2.4.rc1
4. Installation
4.1. Prerequisites
4.2. Running the examples
4.3. Building your own DbForms-capable applications
4.4. Optional configuration for large tables
5. DevGui
5.1. Introduction
5.2. Installation
5.3. Running
5.4. Use
5.5. Use from command line or within a Java program
5.6. Additional information
6. Jump-start a MS SQL Server
6.1. Introduction
6.2. Requirements
6.3. Installation
6.4. Use it
6.5. Conclusion
III. Basic Use Tutorial
7. Tutorial: A sample application
7.1. Application requirements
7.2. Defining the database model and database connection
7.3. Structure and screen flow of the application
7.4. Implementing the forms
7.5. Installing the tutorial application
IV. Advanced Use and Extensions
8. Configuration Files
8.1. Overview
8.2. Element dbforms-config
8.3. Element table
8.4. Element query
8.5. Element events
8.6. Element dbconnection
8.7. Element DOMFactoryClass
8.8. Element DefaultEscaperClass
8.9. Element interceptors
9. Security
9.1. Introduction
9.2. Security concept of DbForms
10. File uploads
10.1. Introduction
10.2. BLOB-fields
10.3. File-system approach
10.4. A working demo
11. Styling
11.1. First level: basic HTML and JSP - tags
11.2. Second level: <dbForms> - tags
11.3. Third Level: DbForms - templates
11.4. Why is the style-taglib still under construction?
12. Sorting, Filtering and Searching.
12.1. Sorting
12.2. Filter Tag
12.3. The filter attribute (in the dbform tag)
12.4. Searching
13. Query Support
13.1. Examples:
13.2. Use within dbforms-config.xml
14. Scripting Variables
14.1. tableName known at compile time
14.2. tableName determined at runtime
15. Application hook-ups (Interceptors)
15.1. Introduction
15.2. Interface DbEventInterceptor
15.3. Class Diagram
15.4. Method parameters
15.5. Installing Interceptors
15.6. Example
15.7. Accumulating error messages
15.8. Changing Key Values in an Interceptor
16. Internationalization and i18n Support
16.1. Specifying a charset
16.2. Defining Resource Bundles
16.3. Setting up DbForms
16.4. Using i18n within DbForms
16.5. Setting the Pattern Attribute
16.6. Additional Information
17. Validation Framework
17.1. Commons-Validator framework
17.2. Setting up DbForms
17.3. Using validation within DbForms
17.4. Generating Validation.xml
17.5. Validation.xml Tags
17.6. Validation.xml file
17.7. Types of validation available
17.8. Validator-rules.xml
18. JavaScript Calendar Application
18.1. What is it?
18.2. How to use the calendar within dbforms
18.3. Support for more date formats
19. Foreign Key support within DbForms
19.1. Introduction
19.2. Foreign-Key tag within dbforms-config.xml
19.3. Support within XSL Stylesheets
19.4. Simplified Reference with New Attributes for table tag:
19.5. Detection of references within DevGui
20. Connection Support
20.1. ConnectionFactory
20.2. Connection pool properties
20.3. The ConnectionProvider class
20.4. How To code your own connection provider class
21. Multiple Database Connections
22. Pluggable events
22.1. Introduction
22.2. Default events
22.3. Registration of the event classes
22.4. Override the default event classes
22.5. Override the event classes on a table-by-table basis
23. EJBs and JBoss
23.1. The Easy Way
23.2. Example
23.3. JBoss dbconnection configuration -JNDI name
24. JasperReports
25. Using XML for Data input
25.1. Introduction
25.2. xml data file example
25.3. definig a xml table in dbforms-config.xml
26. Navigation
26.1. Introduction
26.2. Datalist navigation
26.3. Classic navigation
26.4. ToDo
26.5. Classic Configuration in Dbforms-config.xml
V. Additional Information
27. Additional Tools and Useful How To Examples
27.1. Wiki
27.2. Changing Select Box Value From Another Select Box
27.3. Tabbed Selector
27.4. Printing a JasperReport
27.5. Create an Excel Worksheet
27.6. Use the Custom Formatter
27.7. Tool to Merge dbforms-config.xml Files.
27.8. How To Use DbForms With JSTL
27.9. How To Add Row Count Support
27.10. How To Monitor SQL Statements
28. DbForms Custom Tag Library
29. Description of fields send to/retrieved from html page
30. Client Side Unit Testing
VI. UML diagrams
31. Class diagrams
31.1. org.dbforms.event package
31.2. org.dbforms.event.datalist package
31.3. org.dbforms.event.datalist.dao package
31.4. org.dbforms.conprovider package
32. Sequence diagrams
32.1. The controller
32.2. The dbform JSP tag
32.3. The Goto event
32.4. The NavNextEvent
32.5. The InsertEvent
VII. Appendices
A. Changes
B. To Do List
C. Acknowledgements of Joachim Peer
D. Authors
E. References

List of Figures

2.1. Architecture of DbForms
2.2. Main components of a typical view
2.3. Example of a nested form
7.1. Conceptual diagram of the database
7.2. Screen flow of our application
7.3. Main menu (menu.jsp)
7.4. Managing services (services.jsp)
7.5. Defining priority levels (priorities.jsp)
7.6. List of customers (customer_list.jsp)
7.7. Underlying data for customer_orders.jsp
7.8. Managing customers and their orders on a single page (customer_orders.jsp)
7.9. Underlying data for customer_complaints.jsp
7.10. Managing customers and their complaints on a single page (customer_complaints.jsp)
10.1. Physical representation of our example
10.2. our little BLOB-App in action
11.1. The login box without styling templates
11.2. The same login box using 2 styling templates
12.1. DbForms built in sorting mechanism in action
15.1. UML diagram of the DbEventInterceptor interface and some of its implementations
26.1. Class diagram of datalist navigation
26.2. Class diagram of classic navigation

List of Tables

7.1. Core requirements for our sample application
7.2. Additional features for our sample application
10.1. define a table capable of Blobs (depends on SQL dialect implemented by RDBM vendor)
12.1. filter operators
12.2. search naming system
12.3. search behavior selection
12.4. extended mode searches
13.1. Excerpts in DTD style of dbforms-config.xml
14.1. List of scripting variables
15.1. Parameters available in methods of DbEventInterceptor
17.1. Validation Tag Details
29.1. description of internally used data fields
32.1. initialization parameters and their meaning
32.2. navigation event parameters generated by a form
32.3. initialization parameters and their meaning
32.4. insert event parameters generated by a main form
32.5. insert event parameters generated by a subform
E.1. References

List of Examples

2.1. Defining the model
2.2. Defining the database connection (1)
2.3. Defining the database connection (2)
2.4. Defining the database connection (3)
4.1. Structure of a typical DbForm application
7.1. SQL code for creating the database tables
7.2. Defining tables in dbforms-config.xml
7.3. Code for menu.jsp
7.4. Code for services.jsp
7.5. Code for priorities.jsp
7.6. Code for customer_list.jsp
7.7. Code for customer_orders.jsp
7.8. Code for customer_complaints.jsp
7.9. Defining a query with data from more than one table in dbforms-config.xml
7.10. Displaying data from more than one table in a single form (customers_all.jsp)
11.1. Instantiating a standard button
11.2. Instantiating an image button
11.3. Instantiating a HTML4 button
12.1. Instantiating a sort - tag
12.2. Preparing tables for sorting: define sortable fields
12.3. An example for static filtering
12.4. Example for dynamic filtering
15.1. Methods defined in interface DbEventInterceptor
15.2. interceptor in dbforms-config.xml
15.3. Validation checking in interceptor
15.4. accumlating error messages