Previewing, debugging, and exporting templates

Previewing a template lets you check how the template looks in a browser and identify problems that you need to correct. You can then export or save the Generator template as a Generator template (SWT) file.

You can debug templates by examining the log shown in the Output window. The log provides information on how the template was processed. You can specify the level of detail you'd like shown in the report. When Generator processes the template, you can check for errors and determine where you need to correct the template.

Server debugging can be accomplished in a similar manner using the Generator.log file and adjusting the log detail level with JRun Admin utility.

For more troubleshooting tips, see the TechNotes in the Generator Support center.


 
Debugging and testing suggestions

Develop and test in Flash using Control > Test Movie and the Output window.
Create text file data sources to stand in for database or URL data sources. Verify that the templates work as expected using static data before attempting to integrate dynamic data. This also ensures a thorough knowledge of the template's data source requirements.
Examine the output of database queries or URL results using a browser or the Output window to ensure that the expected result is returned.

To preview a template:

1 Choose File > Publish Settings, then select Generator Template.
2 If desired, define variables in the Parameters text box using Name/Value pairs. (This lets you preview the template as if you were defining variables on the command line or through a URL. It is also convenient if you plan on using an external data source but haven't created it yet.) Click OK.
3 Choose Control > Test Movie to preview the template.
The Output window appears to display any error, warning, or verbose message. If the debug level is set to None, then the output window does not appear.

When previewing a template, Flash 4 also exports a template (SWT file) and creates a Flash player movie (SWF file) that is a version of the previewed template.

To export a template:

1 Choose File > Export Movie.
2 Specify the template name.
3 Choose Generator Template (*.swt) from the Save as Type pop-up menu.
4 Click Save to export the movie.

To generate and view a debugging report:

1 Choose File > Publish Settings, then select Generator in the Format tab.
2 To display the Output window, choose Window > Output.
The Options menu allows you to copy and clear the window. It also allows you to save the log to a file. You can also set the level of detail for the log.
3 To set the log detail level, choose Options > Debug Level, then choose the level of errors you want reported: Errors lists only errors, Warnings lists both errors and warnings, and Verbose lists all Generator operations.
4 Choose Control > Test Movie to preview the template.