5.4. Use

The following sections describe each tab in the DevGui tool.

5.4.1. Web Application Tab

  • Location of Webapp: The JSP files generated by DevGui's XSL transformations will be written into this directory.

  • Web-URL of Webapp: URL which can be used to access the application.

5.4.2. Database Tab

  • JDBC Driver Class: The name of java class which implements java.sql.Driver and which will be used to connect to the database.

    Examples

    • com.databasename.jdbc.Driver
    • org.freedb.jdbc.type4driver.MainDriver

    See your driver's documentation.

  • JDBC URL: URL to connect to database. Refer to driver documentation.

    Examples:

    • jdbc:foo:bar://host123:876/myveryimportantdb
    • jdbc:abcd://host2.dom1.dom2.dom3/database=db3;option1=yes

  • Username: Username for DB connection.
  • Password: Password for DB connection.
  • Test Connection button: Can (and should) be used to check if above entries are ok.

5.4.3. XML Config Tab

  • DbForms-Config File: Name of XML file which contains config for dbforms. An initial version of this file can be automatically generated by DevGui by reading meta data from the database. This file is also used as input for XSL transfortations in tab 'XSL Transformation'.

    File name should be something like:

       <location-of-webapp>/WEB-INF/dbforms-config.xml
              
  • Examine tables, views, system tables checkboxes: Select which table types and table descriptions should be generated into the configuration file.
  • Catalog name filter: It depends on the database system, whether it supports catalogs and how it maps this general term to a database specific term. Often a catalog is mapped to a 'database'.

    The easiest thing is always to select 'all catalogs', but if needed, you may try to restrict the set of examined tables by entering a catalog name and selecting the corresponding radio button.

    Be aware that several database systems that map 'catalog' to 'database' do not allow for reading information about tables in a database other than that one currently in use.

  • Schema name filter: It depends on the database system, whether it supports schemas and how it maps this general terms to a specific term. Often a schema is mapped to 'table owner'.

    The easiest thing is always to select radio button 'all schemas', but if needed, you may try to restrict the set of examined tables by entering a schema name pattern and selecting the corresponding radio button.

    While you always have to enter a complete catalog name, the field for schema name may contain a schema pattern with '%' as pattern for an arbitrary (maybe empty) string.

    Examples:

    • 'foo%' would select all tables in a schema with a name that begins with substring 'foo'.

    • '%nix%' would select all tables in a schema with a name that contains a substring 'nix'.

  • 'Load' button: You can try to load the set of available catalog and schema names into the corresponding combo boxes by clicking the 'Load' button. You must have completed the database tab before pressing this button.
  • Table name filter: Select tables with arbitrary names or with a name that matches a certain name pattern. See comments about patterns above.
  • Use autocommit mode: Should normally be checked, was inserted as a workaround for a bug of a special driver.
  • Write standard type names for unknown field types: If not checked, DevGui will write the names for column types exactly as it gets them from the database. Sometimes this may lead to problems, if the DBMS uses a type that could be handled by DbForms but has a name unknown to DevGui. E.g. there are a lot of different names for various 'integer' types. If this option is checked, DevGui will try to write a standard name for all unknown types into the generated configuration file.
  • Foreign key detection: Devgui can use meta data methods to determine foreign key relationships between tables and write corresponding tags into the generated config file. This can surely only work if the used database system as well as the JDBC driver supports this feature. You have two alternative method available:
    • Using method getImportedKeys() within a loop. This should always work and is the default
    • Using method getCrossReferences() once. This might not work with all databases but, if it does, it will probably be much faster than the first method above. Simply try it out!
  • Include catalog or schema name in table name: If checked, DevGui tries to include catalog and/or schema name in the generated XML file like 'admin.table1' instead of just 'table1'.
  • Set date format to: As of DbForms 2.5, this is obsoleted by the format attributes. Ignore this field.
  • Generate XML button: After you've supplied all of the information described above, click this button. DevGui then tries to read database meta data and generate a DbForms configuration file in XML format. The result is shown in the editor pane.
  • Save File: Save the configuration in the editor pane to a file.

5.4.4. XSL Transformation

This tab can be used to automatically generate Java Server Pages that use the DbForms tag library by applying XSL stylesheets to a DbForms configuration file. To do that, you must have generated (or loaded) a dbforms configuration file, then you select the name of a style sheet and select button 'start transformation'.

  • Stylesheet Directory: Location of the directory that contains your stylesheets that you wish to use.

    Defaults to:

    <DBFORMS_HOME>/xsl-stylesheets/
              
  • Use JavaScript Calendar: If checked, the generated pages will include a JavaScript calendar for editing of date fields. See Chapter 18, JavaScript Calendar Application for more info. Unfortunately this calendar only seems to work with Internet Explorer, so by default this option is not checked.

Generated pages are written to the web application directory.