SetAction – PB Docs 150

SetAction method (DataWindows)

Description

Accepts action and context information about user interaction
with the Web DataWindow client control in a Web browser so that
generated HTML reflects any requested changes.

Controls

DataWindow type

Method applies to

Web

Server component

Syntax

[Web DataWindow server component]

Argument

Description

dwcomponent

A reference to a Web DataWindow server
component.

action

A string describing an action associated
with a button click or method call in a Web DataWindow client control
on a Web page. The value of action is stored in a page parameter
called HTMLGenObjectName_action.

context

A string describing the context of action in
the Web DataWindow client control. The string is generated by a
Web DataWindow script and the value is stored in a page parameter called HTMLGenObjectName_context.

The format is not documented and subject to change.

Return Values

Returns 1 if it succeeds and one of these negative values
if an error occurs:

  • -1

    Reloading the current context failed

  • -2

    The action was attempted but it failed

  • -3

    The action could not be performed (for example, the action
    was InsertRow but the DataWindow has no editable fields for entering new
    data)

  • -4

    The action was aborted by the HTMLContextApplied event

Usage

When the user clicks a button in the Web DataWindow client
control, the JavaScript for the control stores the action in a page
parameter called HTMLGenObjectName_action,
and it stores the context in a page parameter called HTMLGenObjectName_context.
These parameters are passed to the page server which uses them to
call the SetAction method for the server component.

The SetAction method uses the SetHTMLAction method
of the DataWindow.

Call GetLastError and GetLastErrorString to
get information about database errors that cause SetAction, Update, Retrieve,
and RetrieveEx to return –1.

For information about using the Web DataWindow, see the DataWindow Programmers
Guide
.

Examples

This JSP example calls SetAction for
the server component called dwGen:

See Also


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