Generate

Description

Generates the inline HTML for the Web DataWindow. As this method generates the HTML, it also generates inline connection and database errors. Page variables that you want to maintain need to be passed in.

Applies to

PSDataWindowClass and PSWebDataWindowClass objects

Syntax

DWObject.Generate(page[ ] variables)

Argument

Description

DWObject

A variable that contains a reference to an instance of PSDataWindowClass.

page

An array for passing page variables. For JSP targets, the page variables must be defined as String datatypes.

Returns

Integer. 1 indicates success, and -1 indicates failure.

Usage

At runtime, Generate performs the tasks required to generate the dynamic HTML including retrieving the action context and generating the HTML inline. Connection errors, including database error messages, are also generated inline.

The behavior is the same for ASP and JSP targets.

Examples

Example 1

In the following example, the DataWindow object htmlDwObj1 generates HTML and maintains the page variables called “MyParam1” and “MyParam2”:

htmlDwObj1.Generate("MyParam1", "MyParam2");