Passing user actions to the server component – PB Docs 126

Passing user actions to the server component

SetAction

When the user clicks a DataWindow button, action information
is passed back to the page server as context and action page parameters.
Your server-side script needs to access those page parameters and
call SetAction so the server component can apply the action to the
generated HTML.

The names of the parameters use the object name specified
in the SetHTMLObjectName method, for example: dw_1_action
and dw_1_context. You can also specify the object
name on the Web Generation tab page in the DataWindow painter.

You can include buttons for scrolling to other pages of data
and for retrieving and updating data and inserting and deleting
rows. When these button actions occur, the change is sent back to
the server component and the change is made in the DataWindow buffer.
If the user clicks an update button, the update method is called
in the component without any other scripting needed.

note.png No need to call methods

You can call server component methods directly for retrieving
data, updating, inserting and deleting rows, and so forth. However,
remember that button clicks invoke the actions. You do not need
to call the methods too.

This code checks whether parameters have been defined (meaning
that the page is a reloaded page) and if so, calls SetAction to
send the action information to the server component:


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