With the Layout Manager you can manage the layouts for your projects. It provides for a mass (re)generation of layout definitions into corresponding HTML pages. You can also invoke the Layout Painter from the Layout Manager (for example, by opening an existing layout or by creating a new layout).
This document covers the following topics:
When you invoke the Layout Manager, the following dialog appears. It is initially empty.
To invoke the Layout Manager
In the Development Tools node of the navigation frame (which is visible when the button has previously been chosen), choose Layout Manager.
In the Layout Manager, you first have to specify the project for which you want to manage the layouts.
To display the layout definitions for a project
From the Application Project drop-down list box, select the required project.
Note:
Do not use the projects that are delivered with Application Designer. This also
includes the first entry in the drop-down list box for which a name is not
shown.
The layout definitions for the selected project are shown. For example:
For each layout definition, the date and time of the last change of the XML file are shown, and (if available) the date and time when the latest HTML page has been generated. In the time, the number after the slash indicates a thousandth of a second.
Notes:
If there are many layout definitions inside your project, you can limit the number of layout definitions to those starting with specific characters.
To search for layout definitions
Choose the Search tab at the top of the dialog.
In the Prefix text box, enter the first characters of the layout definition(s) that you want to display.
Note:
Do not enter a wildcard character such as the asterisk
(*).
Choose the
button.If the corresponding layout definitions can be found in the current project, they are listed at the bottom of the dialog.
To redisplay the layout definitions
Choose the Application tab at the top of the dialog.
Choose the
button.All layout definitions for the selected project are shown at the bottom of the dialog.
In order to generate HTML pages or to remove HTML and/or XML files (see below), you first have to select the required entries in the Layout Definitions area at the bottom of the dialog.
You can select the layout definitions in different ways:
You can select a single layout definition by selecting the corresponding row.
You can use the CTRL or SHIFT key to select (or deselect) more than one row.
You can click the small asterisk (*) at the top left of the table to select (or deselect) all rows.
You can choose one of the following commands in the
menu:Command | Description |
---|---|
Selects all layout definitions. | |
Selects all layout definitions for which an HTML page has not yet been generated, or for which the time stamp of the HTML file is earlier than the last time stamp of the corresponding XML file. | |
Deselects all selected layout definitions. |
For each XML layout definition, you can generate the HTML page. When an HTML page does not yet exist, it is generated. When an HTML page already exists, it is regenerated using the latest information from the XML layout definition.
See also: Java API for HTML Page Mass Regeneration.
To generate or regenerate HTML pages
Select the layout definition(s) as described above.
From the
menu, choose .You can either remove the HTML page(s) for the selected XML layout definition(s), or you can remove both the XML layout definition(s) and the corresponding HTML page(s).
To remove the HTML pages
Select the layout definition(s) as described above.
From the
menu, choose .For all selected XML layout definitions, the HTML pages are deleted from the file system. You are not asked to confirm the deletion.
To remove the XML layout definition and the corresponding HTML pages
Select the layout definition(s) as described above.
Note:
If you want to choose the command from the context menu (see
below), it is only possible to select a single layout definition.
From the
menu, choose .Or:
Invoke the context menu and choose the command.
A dialog box appears asking whether you really want to remove the selected XML layout definitions.
Choose the
button.All selected XML layout definitions are removed from the system together with their corresponding HTML pages. They are no longer shown in the Layout Definitions area at the bottom of the dialog.
The Layout Manager provides different commands for invoking the Layout Painter.
To create a layout in the currently selected project
From the
menu of the Layout Manager, choose .Or:
Choose the following button from the toolbar of the Layout Manager.
The Layout Painter is invoked and the dialog appears in which you have to enter the name of the file that is to contain your layout definition. See also Creating a Layout in the description of the Layout Painter.
Enter a file name and select the template that you want to use.
To open a layout in the Layout Painter
Select the layout definition in the table at the bottom of the dialog.
Invoke the context menu and choose the Open in Layout Painter command.
The Layout Painter is invoked and the content of the HTML Preview tab is shown. See Defining the XML Layout for further information.
To invoke the Code Assistant
Select the layout definition in the table at the bottom of the dialog.
Invoke the context menu and choose the Generate Adapter Code command.
The Layout Painter is invoked and the content of the Code Assistant tab is shown. See Using the Code Assistant for further information.
Note:
The Code Assistant can only be invoked, if the Java source
directory has been defined. See the description of the
Configuration
dialog.
To invoke the Literal Assistant
Select the layout definition in the table at the bottom of the dialog.
Invoke the context menu and choose the Maintain Literals command.
The Layout Painter is invoked and the content of the Literal Assistant tab is shown. See Using the Literal Assistant for further information.
You can display the paths to the resource directories in the file system.
Information is shown for the following directories:
Directory Type | Description |
---|---|
HTML Directory | The HTML pages are always located in the root of your the application project directory. This location cannot be changed. |
XML Directory | All development tools read/write the XML layout definitions from/to this directory. By default, this directory is set to <your-project>/xml. If you do not want to have the layouts within your application project, you can define another directory somewhere outside of your project (see below). |
Java Source Directory | Shows the Java source directory of the currently selected project. By default, this directory is not defined. If you want to use the Code Assistant, you must first define the Java source directory (see below). |
To define a different XML or Java source directory
Choose the Directories tab at the top of the dialog.
Choose the pencil which is shown to the left of the corresponding text box.
A Configuration dialog box appears for the selected type of directory. Example for the XML directory:
Specify the path to the directory.
Choose the
button.Application Designer provides a Java API for regenerating all pages of a given
application project. Call the method main
of class
HTMLGeneratorWholeDirectory
(package
com.softwareag.cis.gui.generate
) with the following
argument list:
Argument | Description |
---|---|
1. XML Files Directory | Directory in which the XML layout files are kept. |
2. HTML Files Directory | Directory in which the generated HTML pages are to be output. |
3. Log Directory | Directory in which the log files are to be output. |
4. Accesspath Directory | Directory in which the generated Accesspath files are to be output. |
For more details, see the Java API documentation (JavaDoc).