Instantiating and configuring the server component – PB Docs 126

Instantiating and configuring the server component

You can write code to create an instance of the Web DataWindow
server component, and you can call its methods to create a Web DataWindow application.

For information on the types of Web DataWindow server components,
see “The Web DataWindow server
component and client control”
.

Two sets of methods

Two
sets of methods are available on the generic Web DataWindow server component:

  • Methods that are available for other DataWindow
    controls

  • Methods used to configure the component and generate
    HTML

DataWindow control methods

DataWindow control methods supported by the generic server
component include sorting, filtering, validation, and get and set
methods. When you call one of these methods on the server component,
the server reloads the page in the browser.

Methods with more than one syntax have a different form for
each syntax to overcome restrictions on the use of overloading.
For example, the ClearValues method takes a string as an argument
and the ClearValuesByColNum method takes a number.

For a complete list of supported DataWindow control methods,
see the DataWindow Reference or the online
Help.

note.png Examining server component methods

You can view the generic EAServer component
methods on the Components page of the System Tree or in EAServer Manager.

Configuration and generation methods

Other methods are available to set up the component, retrieve
data, establish persistent values needed by your Web page, and generate
HTML.

If you use a custom server component, there are additional
configuration tasks. For more information, see “Using a custom server component”.

note.png Mixed case method names

The methods of the generic EAServer server
component use mixed case names and all the examples in this section
use mixed case. If you write your own server component, the methods
of the component you generate are all lowercase. (You can use the
sample PBDWRMT.PBL as a starting point if you want
the methods described here.)

Coding steps

In your server-side script, you will code these tasks:

  1. Instantiate the component.

  2. Load the DataWindow object.

  3. Control what HTML is generated (for example, by
    specifying what functionality to include and what browser to target).

  4. Specify the database connection and retrieve data.

  5. Pass page-specific data to the reloaded page.

  6. Pass user action information to the server component.

  7. Insert the generated HTML in the page template.

Sample code for some of these tasks follows. For detailed
information about the methods used in the examples, see the DataWindow
Reference
or the online Help.


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x