To create an EGL Web application from a single relational database table,
do as follows:
- Select File > New >Other....
A dialog is displayed for selecting a wizard.
- Expand EGL and double-click EGL
Data Parts and Pages. The EGL Data Parts and Pages dialog is
displayed.
- Enter an EGL Web project name, or select an existing project from the
drop-down list. The EGL parts will be generated into this project.
- Select an existing database connection from the drop-down list or establish
a new database connection--
- To establish a new database connection, click Add and
follow the directions in the help topic Database connection page, which
you can access by pressing F1
- For details on editing or deleting a database connection, see Creating,
editing, or deleting a database connection for the EGL wizards
When a connection is made to the database, a list of database tables
is displayed.
- If you do not want to accept the default EGL file name for data items,
type a new file name.
- In the Select your data field, click on the
name of the database table of interest.
- In the Record name field, either specify the
name of the EGL record to be created or accept the default name.
- If you want to include the library part and SQL record parts in the same
file, select the check box.
- To set additional fields to non-default values, click Next;
otherwise, click Finish. The remaining steps assume
that you clicked Next.
- Select the key field to use when reading, updating, and deleting individual
rows, then click the right arrow. To select multiple key fields, hold down
the Ctrl key while clicking on different field names.
To remove a key field from the list on the right, highlight the field name
and click the left arrow.
- Choose the selection condition field to use when selecting a set of rows,
then click the right arrow. To select multiple fields, hold down the Ctrl key
while clicking on different field names. To remove a field from the list on
the right, highlight the field name and click the left arrow.
- To customize the implicit SQL statements, see Customizing SQL statements
in the EGL wizards. This option is not available for the EGL delete statement.
- Click Next.
- If you want to apply a template to the new Web pages, follow these steps:
- Select the Select page template check box.
- Select a page template type by clicking either Sample page
template or User-defined page template.
- Click on the page template you want to use. You can either select a thumbnail
or browse to the location of the template by clicking the Browse button.
- Click Next.
- To customize the Web pages, see Defining Web pages in the EGL Data
Parts and Pages wizard.
- Click Next.
- The Generate the Web application screen is displayed, including (at the
bottom) a list of the files and Web pages that will be produced:
- To change the name of the EGL Web project that will receive the EGL parts,
type a project name in the EGL Web project name field
or select a project from the related drop-down list.
- To specify the EGL and Java™ packages for a specific type of part
(PageHandler, data, or library), type a package name in the related field
or select a name from the related drop-down list.
- To change the name of the JSP and EGL files that are produced for a given
Web page, click on the appropriate entry under Web pages and
type the new name. Each file name includes any letters or numbers that you
type, but excludes spaces and other characters.
Type or select packages for the PageHandler parts, data parts, and
library parts.
- Click Finish.