PSDataWindowClass

Creates a new object for a Web DataWindow control. This object lets you add a Web DataWindow object (that you create in PowerBuilder or InfoMaker) to your page.

Adding a Sybase Web DataWindow DTC to an HTML page creates an object of type PSDataWindowClass. If the page is 4GL-enabled, an object of type PSWebDataWindowClass is created instead.

Syntax

PSDataWindowClass(pageContext, request, objectName, ServerSideStateManagement, jaguarConnection, sourceLocation, dbConnection, {lPageSize})

Constructors

PSDataWindowClass constructor

Datatype

Description

pageContext

PageContext

Implicit object created by the JSP server to handle page requests.

request

HttpServletRequest

Object created by servlet container for HTTP requests.

objectName

String

The name of the client-side control. If you do not specify a name, htmlDW is used as the default object.

ServerSideStateManagement

boolean

Specifies where the database state is managed. Values are:

  • true The server manages the database state. A reference to the server component is saved and retrieved from the session object (based on the name of the Web DataWindow object).

  • false (default) The client manages the database state.

jaguarConnection

String

The connection information needed to connect to EAServer.

sourceLocation

String

The location of the DataWindow object. If this property is null (default), the server component must encapsulate the identity of the source.

dbConnection

String

The database connection properties. If this property is null (default), the server component must encapsulate the database connection properties.

lPageSize (Optional)

String

The size of the page:

  • 0 Indicates that all rows retrieved from the database will be generated.

  • -1 (default) Indicates that the size of the page is specified in the definition for the Web DataWindow control.

  • Any positive integer Specifies the number of rows that will be passed to, and therefore contained in, the Web DataWindow control.

Properties

PSDataWindowClass property

Datatype

Description

Component

Object

Represents a reference to a server component for a Web DataWindow control. For information about the server component, see the DataWindows Programmer's Guide.

RetrievalArgs [ ]

String

An array of arguments used to retrieve data from the database. You can specify these retrieval arguments or use the FillRetrievalArgs method to do so.

Methods

PSDataWindowClass method

Description

FillRetrievalArgs

Fills in the array that stores the retrieval arguments.

Generate

Generates the DataWindow as HTML.

GenerateXHTML

Generates the DataWindow as XHTML.

GenerateXMLWeb

Generates the DataWindow as XML.

SetColumnLink

Establishes a link for a column that is passed to the Web DataWindow control.

SetWeight

Identifies the type of functionality included on your HTML page. (As you include more functionality on your page, the size of the control increases.)

Examples

Example 1

The following example shows how to define a new Web DataWindow object named webDW. The Web DataWindow object uses a client-side control named webDW, and a previously defined EAServer connection object named jagConn:

PSJaguarConnection jagConn = new PSJaguarConnection("my-desktop:9000", "jagadmin", "", "DataWindow/HTMLGenerator110", false);

PSDataWindowSourceClass dwSource = new PSDataWindowSourceClass("d:\\test\\appl.pbl", "dw_dept");	

PSConnectionParmsClass  dbConn = new PSConnectionParmsClass("ConnectString='DSN=EAS Demo DB V11;UID=dba;PWD=sql',ConnectOption='SQL_DRIVER_CONNECT,SQL_DRIVER_NOPROMPT'" );

PSDataWindowClass webDW = new PSDataWindowClass (pageContext, request, "webDW", false, jagConn, dwSource, dbConn, 10);