For information about the Web Target object model See “About the Web target object model”.
When you use the Web Target object model, the name of the object model file imported depends on which application server you deploy to:
Application server |
Object model file imported |
---|---|
ASP |
OBJMOD.JS |
JSP |
JSPOBJECT100.JAR |
The deployment controller converts basic objects (but not the 4GL classes and objects) of the Web Target object model to equivalent objects for the server to which you deploy your pages. The 4GL objects in the Web Target object model are designed for deployment to JSP only.
The object model file includes the following Web target classes:
Class |
Description |
---|---|
PSCommandClass |
Defines a SQL statement or stored procedure that can be reused multiple times on the same page |
PSCursorClass |
Represents a result set that is the output of a database retrieval operation |
PSDocumentClass |
Describes the current document |
PSConnectionClass |
Allows you to connect to a database |
PSServerClass |
Represents the application server environment in which Web pages run |
PSSessionClass |
Describes information that needs to persist for the duration of a particular session between a Web client and a Web site |
PSErrorClass |
Provides access to errors captured by the application server |
Pre-instantiated objects The Web Target object model automatically creates unique instances of the following objects:
Class |
Pre-instantiated object name |
---|---|
PSDocumentClass |
psDocument |
PSServerClass |
psServer |
PSSessionClass |
psSession |
In your scripts, you always refer to these objects. You do not need to instantiate PSDocumentClass, PSServerClass, and PSSessionClass.
Object comparison Web target objects are converted to different objects depending on the platform to which you deploy your Web page:
Web target class |
ASP object |
JSP object |
---|---|---|
PSCommandClass |
Command |
— |
PSConnectionClass |
Connection |
Connection |
PSCursorClass |
RecordSet |
ResultSet |
PSDocumentClass |
Request, Response |
request, response |
PSErrorClass |
Error |
— |
PSServerClass |
Server, Application |
pageContext |
PSSessionClass |
Session |
session |
Typically you use the Web DataWindow DTC to integrate DataWindows into your Web application. The Web Target object model also supplies objects that enable you to instantiate and manipulate Web DataWindow controls. The following table lists the classes you can instantiate in a script to set up access to a Web DataWindow. For details about these objects, see the Web and JSP Target Reference.
Class |
Description |
---|---|
PSConnectionParmsClass |
Specifies the database connection parameters required for a Web DataWindow control to connect to a database. The object does not connect to the database. |
PSDataWindowClass |
Creates a new object for a Web DataWindow control. This object lets you add a DataWindow control (that you create in DataWindow Builder, PowerBuilder, or InfoMaker) to your page. |
PSDataWindowSourceClass |
Creates a new source parameter object. The object specifies an existing definition of a Web DataWindow control. |
PSJaguarConnection |
Specifies the connection information required to connect to a server component on EAServer. This component provides interoperability between the Web DataWindow control and page servers that support ActiveX or Java. |
PSNamedConnectionParmsClass (not available to JSP targets) |
Specifies the database connection information required to connect to a named (cached or profiled) database. The object does not connect to the database. |
A psPage server object is created for each 4GL-enabled Web page you create.
Objects that you place on a 4GL-enabled Web page are assigned the PSSERVERSCRIPTABLE attribute by default. This attribute allows you to write server-side scripts (in addition to client-side scripts) to access properties, methods, and events for these objects.
References to controls require a psPage prefix References to controls must be prefixed with psPage for server-side processing. Using a prefix was unnecessary in earlier versions of PowerBuilder. The change is needed now to make the pages thread safe.
4GL pages rely on the psPage server object and the following classes for each supported object:
Object |
Description |
---|---|
psPage |
Represents a 4GL Web page on the server, encapsulates the other server objects available to 4GL Web pages, and controls page processing |
PSButtonClass |
Represents a client-side button on the server |
PSCheckBoxClass |
Represents a client-side check box control on the server |
PSDropDownListClass |
Represents a client-side drop-down list control on the server |
PSImageClass |
Represents a client-side image on the server |
PSLinkClass |
Represents a client-side hyperlink (anchor element) on the server |
PSPasswordClass |
Represents a client-side text box control on the server |
PSRadioGroupClass |
Represents a client-side group of radio button controls on the server |
PSStaticTextClass |
Lets you manipulate the specified text from a server script |
PSTextAreaClass |
Represents a client-side multiline text box control on the server |
PSTextClass |
Represents a client-side single-line text box control on the server |
PSWebDataWindowClass |
Represents a Web DataWindow control on the server |