DataWindow objects for the Web ActiveX
The DataWindow Web control for ActiveX requires either of
these:
- A DataWindow object stored in a PBL
- A PSR that was saved with data
Properties for the Web ActiveX identify the DataWindow object
that you want to display in the control.
This section describes considerations for:
- Defining
DataWindow objects - Building libraries
- Identifying the DataWindow object or PSR by setting
Web page properties
What the DataWindow object can include
You can define DataWindow objects in PowerBuilder or the DataWindow Builder.
The Web ActiveX supports all DataWindow presentation styles except RichText.
You can use all edit styles, including DropDownDataWindow.
Properties can have conditional expressions (written in PowerScript)
and computed fields can use any of the functions available to a
standard DataWindow.
In the Web page, you can include scripts (written in JScript
or other ECMAScript-compatible scripting languages) to manipulate
DataWindow presentation and data.
Managing DataWindow objects in PowerBuilder libraries
Types of libraries
The Web ActiveX can use DataWindow objects that are stored
in PBLs or PBDs.
When to use a PBD
The Web browser downloads the library specified for the Web
ActiveX and stores it in a temporary cache. If you do not want your
DataWindow object source code to be available to the user (who could
copy it from the cache), convert a PBL to a PBD before deploying
it.
Because the library will be downloaded, you should make it
as small as possible–another good reason to convert a PBL
to a PBD.
PowerBuilder or DataWindow Builder version PBLs must be migrated to Version 8 or later. Either PowerBuilder
or DataWindow Builder can be used to migrate libraries.
Grouping DataWindow objects into libraries
A PBL or PBD is downloaded in its entirety from the Web server;
therefore, you should make sure your library includes only those
objects needed on your Web pages. You can group DataWindow objects
that are used on different Web pages in a single library; however,
you should avoid forcing users to download objects used on pages
they will not view.When choosing how to group DataWindow objects
into libraries, make the set of objects in the library correspond
to the typical set of pages the user will view. Although a single
download saves a lot of communications overhead, it is worthwhile
only for users if they view the pages that use the objects.
Using other resources in the DataWindow object
A DataWindow object can use external resources such as bitmaps
or cursors. You can use a resource file when you build a PBD to
include these resources in the library. You can also store these
resources on the Web server. A relative path in the DataWindow object
can point to the file’s location on the Web server. The
browser retrieves the resource as needed.
A DataWindow object can use other DataWindow objects, such
as dropdown DataWindows. Make sure these objects are included in
the downloaded library.
Specifying a DataWindow object for the control
To identify the DataWindow object you want to display in the
control, you specify values for two properties:
- SourceFileName
- DataWindowObject
You enter their values on the General page of the Web ActiveX
property sheet.
About SourceFileName
The value for SourceFileName is the name of the library that
contains the DataWindow object for the control. It can be a URL
or a file path. These examples illustrate some typical variations:
- Absolute
URL:1http://www.domain.com/dwlibraries/financedws.pbd - Relative URLs:
1financedws.pbd1dwlibraries/financedws.pbd
- Absolute file path (can be useful while developing
pages):1d:/web project/dwlibraries/financedws.pbd
In the Web ActiveX property sheet, when you use the Browse
button to look for the library, you browse the file system, not
URLs. After the full path is inserted in the field, you probably
should edit it so that it is valid when your Web pages are deployed.
Web targets If you are working in a PowerBuilder Web target, it is a good idea
to include both the library and the Web page in the workspace. If
you do, SourceFileName can be a relative path that is valid in both
your design and deployment environments.
Changing SourceFileName during execution You can change the value of SourceFileName in a script. If
you do, you also have to specify a value for DataWindowObject that
is valid in the new library. You must also call SetTransObject again
if you are using a separate transaction object.
About DataWindowObject
The value for DataWindowObject is the name of a DataWindow
object that is in the library specified in SourceFileName.
If the library is accessible in the development environment
(for example, it is part of the PowerBuilder workspace and you specify
a relative URL), then the property sheet displays a dropdown list
of the DataWindow objects contained in the library.
Displaying Powersoft reports To display a PSR file instead of a DataWindow object, specify
its URL as the value for the DataWindowObject and leave the SourceFileName
blank.