• No results found

Deploying the Web ActiveX

DataWindow methods that deal with specific data types, such as

GetItemDecimal, are not available for the Web ActiveX. Instead, you use the method that handles the more general data type, such as GetItemNumber.

Date data types PowerBuilder has several date and time data types, but in JScript these all map to the Date object.

Enumerated data

types PowerBuilder enumerated data types have named values, but in JScript, each value is a number. The list of numbers (and their meaning) is documented in the DataWindow Reference for each enumerated data type.

Setting event return codes

The event return codes documented for DataWindow events are also valid for the Web ActiveX. However, JScript does not support return values for events.

Instead, to specify a return code, you call the SetActionCode method as the last line in the event script.

For example, the return code of the onItemError event allows you to determine what happens when user-entered data fails a validation rule. By specifying a return code of 3, you cause the Web ActiveX to reject the data but allow focus to change. This statement would be the last line of the onItemError event script:

This.SetActionCode(3);

Deploying the Web ActiveX

CAB file for

deployment The PowerBuilder Setup program installs the PSDWC90.CAB file in the Sybase\Shared\PowerBuilder directory. This CAB file contains all files and information the client Web browser (Internet Explorer) needs for installing the Web ActiveX and the Transaction Object control. The CAB file includes:

• An Open Software Distribution information file

• DLLs for the controls

• Java class files for the JDBC driver

The browser manages installation of the ActiveX controls using the

information in the CAB file. It installs the controls in the system registry and maintains its Java class path. You need only to tell the browser how to find the CAB file.

To make the Web ActiveX and Transaction Object control available to users:

1 Put the CAB file on your Web server.

2 Refer to the CAB file on the Web page in the CODEBASE attribute of the Object element.

In a Web target, you can accomplish both goals by:

• Including the CAB file in your project and deploying it to the Web server along with your other project files.

• Specifying a value for Network Code Base in the ActiveX object property sheet. The value is the name and relative path for the CAB file, plus the version number. If the CAB file is part of your PowerBuilder Web target, use the browse button to display the Choose URL dialog box. You can then select the CAB file on the Project page of this dialog box.

For information about specifying the correct value for CODEBASE, see

“HTML for inserting the controls on a Web page” on page 168.

Deploying a new

version The version number in the value of the CODEBASE attribute determines whether the browser downloads and installs a new version of the ActiveX controls. The browser compares the version number in the CODEBASE value with the version of the controls that are installed in the system registry. If the version numbers do not match, the browser downloads the CAB file again and installs it.

To deploy the new CAB file when you get a new version of PowerBuilder:

1 Find the new version number by checking the version number of any PowerBuilder DLL (as described in “HTML for inserting the controls on a Web page” on page 168).

2 Edit the Web pages that refer to the CAB file. Change the version number in the CODEBASE attribute to match the new number.

3 Replace the CAB file on the Web server with the new version.

Deploying the Web ActiveX

A

absolute positioning, Netscape browser 118 accent marks, Web DataWindow 114 action codes 38

aggregation functions, Web DataWindow 113 applications

architectures 5

using DataWindow objects in 11

B

bitmaps, dynamically adding and removing 66 buffers

DataStore 82 DataWindow 27, 41

Button controls, Web DataWindow 115

C

CAB file, Web control for ActiveX 180 Case function, Web DataWindow 113 character set, foreign language 114 Clicked events in graphs 101 client control, Web DataWindow 109 client/server applications 5

CODEBASE HTML attribute, Web ActiveX 168 column status in DataWindow controls 41 COMMIT statement and SetTransObject 21 communication with databases 18

CONNECT statement and SetTransObject 21 connection caches, defining in EAServer 122 controls, supported in Web DataWindow 110 create capability for Modify 66

Create method 67

CreateComponent method, example 140 CrosstabDialog function 50

crosstabs

modifying during execution 51 users redefining during execution 50 using in applications 49

viewing underlying data 49 custom DataStore objects 80

D

data

retrieving and updating 23 saving in graphs 97 sharing 83 updating 24

Web control for ActiveX 178 Web DataWindow 111, 143 data sources

external 26, 82 types 3 database connections

about 18

Web control for ActiveX 177 Web DataWindow 143

retrieving, presenting, and manipulating data 2, 23 snapshot connections 20

transaction management 21 updating 24

DataModified status 41

DataObject property of DataWindow controls 16 DataStore objects

about 2

accessing data 82

Index

buffers 82 custom 80

importing data from external sources 82 methods 83

sharing data 83 DataWindow controls

about 1, 5, 8, 12

accessing a specified item 32 accessing the current text 30 action codes 38

and graphs 94

assigning transaction objects to 68

associating with objects during execution 16, 17 buffers 27, 41

column status 41 creating reports with 45 data management in 27 DataObject property 16 DBError event 38

displaying PSR files in 17, 18, 19 handling errors 37

importing data from external sources 26 ItemChanged event 31

ItemError event 32 methods 34 names 13 naming in code 14 placing in windows 12 processing entries 29 row status 41

updating, use of row/column status when 41 using crosstabs 49

using graph methods 98

DataWindow execution time errors 39 DataWindow objects

about 1

associating with controls 14, 16, 17 basic use of 11

creating dynamically 67 creating reports with 45 data sources 3

defining 2

designing for Web DataWindow 110 displaying data 18

dynamic use of 65 editing 15

generating HTML from 52 graphs in 91

HTML preview 121 names 13

overview 2 preparing to use 11 presentation styles 3

printing multiple on a page 47 properties of 35

PSR file for Web DataWindow 141 SRD file for Web DataWindow 141 Web DataWindow, set in script 141 Web DataWindow, set on server 152 DataWindow painter

about 11

editing DataWindow object 15 working in 11

DataWindow plugin 2, 7 DataWindow technology 1, 4 DataWindowObject property

Web control for ActiveX 174

DataWindowObject property, Web control for ActiveX 17

DBError event 38 Delete buffer

DataStore 82 DataWindow 27

Describe method 35, 66, 68, 69 destroy capability for Modify 66

DISCONNECT statement and SetTransObject 21 display formats in Web DataWindow 111 distributed applications 5

providing query mode 70 specifying create syntax 68, 69

E

EAServer

database connection caches 122 installing custom component 152

instantiating custom component 156 locked PBL 151

maintaining state for Web DataWindow 157 EAStudio

HTML generator components 107 edit controls

in DataStore objects 83

in DataWindow controls 28, 30, 31 edit styles

overriding in query mode 73 Web DataWindow 111 EditChanged event 30 Error event 39

errors, following database retrieval or update 37 events

Web control for ActiveX 179, 180 Web DataWindow client control 128 execution

accessing graphs 92

associating DataWindow objects with controls 16, 17

modifying DataWindow objects 66

expressions, assigning DataWindow property values 66

External data source, importing data 26, 82 external functions in Web DataWindow 113

F

files as data source 3 Filter buffer 27, 82 fonts, using in reports 46

foreign language character set 114

G

Generate method, example 150 GenerateHTMLForm method 60

graphics, adding to DataWindow objects 66 graphs

about 91 data properties 94

getting information about 95 internal representation 93

modifying data properties in DataWindow control 99

modifying display of data 97 modifying during execution 92 properties of 93

saving data 97

grAxis subobject of graphs 93 grDispAttr subobject of graphs 93

H

Help, providing in dynamic DataWindow objects 74 HTML

appending to a control 115 generating forms 60 including in a control 114 saving DataWindow data as 52

HTML DataWindow see Web DataWindow 105 HTML Preview 121

I

InfoMaker Report painter 2 instance pooling, EAServer 151 ItemChanged event 30, 31 ItemError event 30, 32

items in DataWindow controls 28

Index

J

java PowerDynamo object, example 140 JavaScript caching, Web DataWindow 118 JConnect 178

JSP targets class path 135

custom tag libraries 137

L

language, character sets 114 libraries

for DataWindow objects 10, 11 locked by EAServer 151 Web control for ActiveX 173 LibraryExport function 69

Web control for ActiveX, listed in System Tree 171 Web DataWindow client control 129

Web DataWindow server component 138 Modify method

basic usage 35, 66 using query mode 70 using with graphs 93 with crosstabs 51

multiple Web DataWindows on a page 130

N

names of DataWindow controls and DataWindow objects 13

nested reports

creating during execution 48 destroying during execution 48 using in applications 47

Netscape browser, absolute positioning 118 New status 41

NewModified status 41 NotModified status 41

O

Object element, Web control for ActiveX 168 OneTrip method, Web DataWindow 156

P

painters 11

Param elements, Web control for ActiveX 169 PBD files see libraries 10

PBL files see libraries 10

Picture button in Web DataWindow 116 Picture controls in Web DataWindow 117 plugin, DataWindow 7

point and click, in graphs 101

PowerBuilder libraries see libraries 10 PowerDynamo targets

instantiating custom server component 156 writing scripts for Web DataWindow 138 Powersoft reports

about 2, 11

DataWindow plugin 7

displaying in DataWindow controls 17 displaying in Web control for ActiveX 18 no database connection needed 19 Web application 7

presentation styles list 3

supported in Web control for ActiveX 173 supported in Web DataWindow 110 Primary buffer 27, 82

Print method 46 printing

multiple DataWindow objects on a page 47 reports 46

programs, using DataWindow objects in 11 properties

DataWindow object 35

retrieving current values of 66, 68, 69

PSR files see Powersoft reports

Q

query mode clearing 73 forcing equality 74 providing to users 70 sorting in 73

quotation marks in self-link expressions 146

R

reports

see also Powersoft reports 2 creating with DataWindow objects 45 nested 47

printing 46 Retrieve method

handling errors 37 using 23

Web DataWindow example 144 RetrieveEx method, example 144

ROLLBACK statement and SetTransObject 21 rows

providing user-specified retrieval 70 status in DataWindow controls 41 runtime libraries see libraries 11

S

saving data in graphs 97 scripts, modifying graphs in 92

SELECT statements, modifying at execution time 72 selection criteria see query mode 70

self-link arguments, Web DataWindow 145 server component

accessing from server-side scripts 138 properties 153

Web DataWindow 135

server component, Web DataWindow 107 server-side validation for Web DataWindow 159 service classes for Web DataWindow 159

SetAction method, example 149 SetBrowser method, example 143 SetDWObject method, example 141 SetHTMLObjectName method, example 142 SetItem method 32

SetText method 30 SetTrans method

about 20

Web DataWindow example 143 SetTransObject method 21 SetWeight method, example 142 ShareData method 47

sorting in query mode 73 SourceFileName property

Web control for ActiveX 17, 174 SRD file for Web DataWindow 141 status of DataWindow rows or columns 41 SyntaxFromSQL method 68

T

text controls in DataWindow objects 66 text in DataWindow edit control 28 transaction objects

reassociating DataWindow controls with 68 Web control for ActiveX 175

U

Update method handling errors 37 using 24

URLs

Web control for ActiveX 174

user events, for graphs in DataWindow controls 98 user objects, inherited from DataStore objects 80

V

validation rules in Web DataWindow 111 validation, server-side 159

Index

W

Web applications and DataWindow technology 5, 6, 105, 165

Web browsers

DataWindow plugin 7 Web control for ActiveX 166 Web DataWindow 117, 143 Web control for ActiveX

about 7, 165

CODEBASE HTML attribute 168 database connections 177 DataWindow objects 173

DataWindowObject property 17, 174 deployment 180

event return codes 180 libraries 173

library versions 174

Object element in HTML 168 retrieving data 178

setting DataWindow object during execution 175 SourceFileName property 17, 174

transaction objects 175 version number of CAB 168 Web browsers 166

Web target 166, 170 writing scripts 179 custom server component 152 data manipulation 115 database connections 143 DataWindow objects 110 design-time control 126 EAServer connection cache 122 events for client control 128 expressions 113

foreign language text 114 generating HTML 150

HTML generator components 107 HTML version 117

installing custom component 152 instantiating custom component 156

instantiating server component 140 JavaScript caching 118

JavaScript Generator wizard 118 locked PBL 151

maintaining state 157 methods for client control 129 multiple, on a page 130 navigation 115 object name 142 OneTrip method 156 page parameters 145, 149 picture button 116 process 106

programming for server component 138 PSR file 141

reloading page 145 retrieving data 144

self-link information in scripts 145 self-link properties 116

server component properties 153 server component, about 135 server-side scripts 138 service classes 159

setting DataWindow object during execution 141 size of generated code 142

SRD file 141 user actions 149 where to install 133

Web DataWindow Container wizard 123 Web Target object model 126

Window painter, placing DataWindow controls 12 wizards

Web DataWindow Container 123

Web DataWindow JavaScript Generator 118