Accepts action and context information about user interaction with the Web DataWindow client control in a Web browser so that newly generated HTML can reflect any requested changes.
DataWindow type |
Method applies to |
---|---|
PowerBuilder |
DataWindow control, DataStore object |
integer dwcontrol.SetHTMLAction ( string action, string context )
Argument |
Description |
---|---|
dwcontrol |
A reference to a DataWindow control or DataStore. |
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 is stored in a page parameter called HTMLGenObjectName_action. action must be a valid action and cannot be an empty string or the value none. |
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. |
Returns 1 if it succeeds and one of these negative values if an error occurs:
-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.
SetHTMLAction triggers the HTMLContextApplied event after restraining the context but before performing the action. You can use the event to perform data validation using methods of a server component.
If you write your own server component in PowerBuilder instead of using the generic Web DataWindow server component, you use this method to update the generated HTML to reflect user actions.
For information about building your own server component, see the DataWindow Programmers Guide.