SetWeight

Description

Identifies the type of functionality included on your HTML or JSP page. As you include more functionality on your page, the size of the control increases. The largest (heaviest) but most feature-rich objects would support both client-side scripting and client-side formatting.

Applies to

PSDataWindowClass object

Syntax

PSDataWindowClassObject.SetWeight(bAllowForm, bClientValidation, bClientEvents, bClientScriptable, bClientFormatting)

Argument

Description

bAllowForm

Boolean indicating whether or not the object supports data input:

  • true (default) The object supports data input.

  • false The object does not support data input. The object will provide only navigation.

bAllowForm must be set to true to set the bClientValidation and bClientFormatting arguments to true.

bClientValidation

Boolean indicating whether or not the client validates the the syntax of the data entered by the user. Client-side validation can determine if the data is in a valid format for the database.

The bAllowForm argument must be set to true to use client-side validation:

  • true (default) The client validates the syntax of the entries that users make.

  • false The client does not support syntax validation for entries that users make.

bClientEvents

Boolean indicating whether or not the object supports invoking client-side events:

  • true (default) Invoking client-side events is supported.

  • false Invoking client-side events is not supported.

bClientScriptable

Boolean indicating whether or not you can add scripts to manipulate the Web DataWindow control on the client.

The scripts that you add would run on the client system.

  • true Client-side scripting is supported.

  • false (default) Client-side scripting is not supported.

bClientFormatting

Boolean indicating whether or not display formats are applied to newly entered data.

The bAllowForm argument must be set to true to apply formatting:

  • true Newly entered data will be formatted.

  • false (default) Newly entered data will not be formatted.

Returns

1 indicates success, -1 indicates failure.

Usage

At runtime SetWeight determines the weight (or size) of the control by the functionality included for a Web target page.

The behavior is the same for ASP and JSP Web targets.

Examples

Example 1

In the following example, the Web DataWindow object named “htmlDwObj1” supports validation of the syntax for entries that users make in the object:

htmlDwObj1.SetWeight(true,true);