Generate – PB Docs 126

Generate method (DataWindows)


Creates HTML syntax for the Web DataWindow.


DataWindow type

Method applies to


Server component


[Web DataWindow server component]

Return Values

Returns an HTML rendering of the current page of the DataWindow
if the method succeeds and an empty string if an error occurs.


Call this method to create HTML syntax from the DataWindow
defined for the server component. The Generate method
is usually called by a server-side script running on a page server.
The page server creates the complete Web page by combining the return
value with other appropriate HTML elements.

The contents of the page of data can be affected by user actions
in the client control. The page server calls the SetAction method
before calling Generate to apply the user’s

The Generate method causes DataWindow columns
to be rendered as HTML INPUT elements with the following exceptions:

  • A column to which you assign a hyperlink. The hyperlink
    is valid only if the column tab order is set to 0, its Protect property
    is set to 1, or if it has an Edit.DisplayOnly property that is set
    to “yes”. A column with a valid hyperlink is rendered
    in an <A HREF> tag.

  • A column for which the ValueIsHTML property is set
    to true. The column value can be plain text or
    some combination of HTML tags and plain text. The column value is
    included unchanged within the generated HTML page.

  • A column with a DropDownListBox or DropDownDW edit
    style. Columns with these edit styles are always be rendered in <SELECT> tags.

  • Computed fields that are not dynamically calculated
    on the client. Computed fields are rendered as HTML INPUT elements
    only if the ClientComputedFields property for the DataWindow is
    set to “yes”. Otherwise they are rendered as

If the column has a validation rule, it is translated to JavaScript
if possible. Parts of the DataWindow object included in the generated
HTML are:

  • Columns, computed fields, text controls

  • Pictures (picture format should be GIF or JPEG)

  • Buttons

  • Page headers and footers

  • Group headers and trailers

  • Summary bands

  • Display formats, validation rules, edit styles (EditMasks
    are converted to display formats)

DataWindow features that will not be rendered into HTML include:

  • Graph, OLE, and RichText presentation styles and

  • Drawing controls (lines, circles, rectangles)

  • Client-side expressions that include aggregate functions.
    Such expressions will be computed on the server

  • Resizable and movable controls

  • Sliding of controls to fill empty space

  • Autosizing of height or width


The following example generates a DataWindow object
in HTML:

See Also

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