Creating help files with GUI Builder is simple. On the properties panel for the file you are working with, set "Generate help" to true.
Figure 1: Setting the Generate Help property on the GUI Builder Properties panel
The GUI Builder creates an HTML framework called a Help Document, which you can edit.
In order to be used at runtime, the topics within the PDML file need to be separated into individual HTML files. When you run Help Document to HTML Processing, the topics are broken into individual files and put into a subdirectory named after the Help Document and PDML file. The runtime environment expects the individual HTML files to be in a subdirectory with the same name as the Help Document and PDML file. The Help Document to HTML Processing dialog gathers the information needed and calls the HelpDocSplitter program to do the processing:
Figure 2: Help Document to HTML Processing dialog
The Help Document to HTML Processing is started from a command prompt by typing:
jre com.ibm.as400.ui.tools.hdoc2htmViewer
Running this command requires that your classpath be set up correctly.
To use the Help Document to HTML Processing, you first select the Help Document that has the same name as the PDML file. Next, you specify a subdirectory with the same name as the Help Document and PDML file for output. Select "Process" to complete the processing.
You can split up the help document from the command line with the following command:
jre com.ibm.as400.ui.tools.HelpDocSplitter "helpdocument.htm" [output directory]
This command runs the processing that breaks up the file. You provide the name of the Help Document as input along with an optional output directory. By default, a subdirectory of the same name as the Help Document is created and the resulting files are put in that directory.
This is an example of what a help file may look like:
Figure 3: GUI Builder help file example